levo

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.

Your recallNot started
Key term

What is virtual memory?

Key term

What is disk thrashing?

Key term

Why does segmentation suffer from external fragmentation while paging does not?

Questions from this subtopic

Each one with the model answer underneath.

  1. 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. 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. 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. 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. 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. 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.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Processors: Structure, Performance and Types
Input, Output and Storage
Systems Software
Applications Generation

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

If it matches, the search .
succeedsfailsrestarts

Blank Blitz makes facts automatic

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

A0 + 0 gives 0.
B0 + 1 gives 1.
C1 + 1 gives 0 carry 1.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

A global variable means a variable reachable from anywhere in the program.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

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.