OCR A-Level Computer Science H446
Processors: Structure, Performance and Types
Input, Output and Storage
Systems Software
Applications Generation
Software Development
Types of Programming Language
Exchanging Data
Networks
Web Technologies
Data Types and Number Representation
Data Structures
Boolean Algebra
Legal, Moral, Cultural and Ethical Issues
Elements of Computational Thinking
Problem Solving and Programming
Algorithms
Systems Software
Memory management: paging, segmentation and virtual memory
- 3 things to know
- Component 01
Overview
Recall questions on memory management, paging, segmentation and virtual memory, page tables, page faults, disk thrashing, calculating frames and wasted space, external fragmentation, combining paging with segmentation, and memory protection.
What you need to know
Answer each one before you reveal it.
What is disk thrashing?
Why does segmentation suffer from external fragmentation while paging does not?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is memory management?
Model answer
The operating system function that decides how RAM is divided up between the operating system and running processes: where each process's code and data are placed, how much each gets, how they are kept separate from one another, and how memory is reclaimed when a process ends. It also moves data between RAM and secondary storage when RAM is not big enough.
- 2
What is paging?
Model answer
Dividing memory into fixed-size blocks. The physical memory is divided into frames and the process is divided into pages of exactly the same size; any page can be loaded into any free frame. A page table records which frame each page is currently in, so the pages of one process need not be next to each other in RAM.
- 3
What is segmentation?
Model answer
Dividing a program into variable-size blocks called segments that correspond to the logical structure of the program - for example one segment for a subroutine, one for an array, one for the main program. Each segment is as big as the thing it holds, and a segment table records where each segment starts and how long it is.
- 4
State three differences between paging and segmentation.
Model answer
Paging uses fixed-size divisions; segmentation uses variable-size divisions. Paging divides memory physically, with no regard to what the code means; segmentation divides the program logically, along the boundaries of its own structure. Paging can leave a little wasted space inside the last page of a process (internal fragmentation); segmentation instead tends to leave awkward gaps between segments (external fragmentation). Paging is handled entirely by the operating system; segmentation reflects how the programmer structured the program.
- 5
What is virtual memory?
Model answer
A technique in which a section of secondary storage is used as though it were RAM. Pages that are not currently needed are written out to this area, freeing real RAM for the pages that are needed, so programs larger than physical memory can run and more programs can be open at once than would otherwise fit.
- 6
Paging, segmentation and virtual memory are three different things. Say in one sentence each what makes them different.
Model answer
Paging is a way of splitting memory into equal fixed-size blocks so that a process need not occupy one continuous run of RAM. Segmentation is a way of splitting a program into variable-size blocks that match its logical structure. Virtual memory is the use of secondary storage to extend the apparent size of RAM. Virtual memory is normally implemented using paging, but paging can be used without virtual memory and the three ideas are not interchangeable.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Systems Software, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.