Revise Computingrevisecomputing.co.uk
Free student revisionSee questionsFor schoolsSchool enquiry
Free revisionSee questionsFor schoolsSchool enquiry
Knowledge/A Level/H446/01 Computer systems/Systems Software/Memory management: paging, segmentation…

Memory management: paging, segmentation and virtual memory

Memory Management (paging, segmentation and virtual memory)

1.2.1 Systems Software

Practise exam questions

Systems Software — Note 2 of 8

Candidates need to understand how operating systems manage memory. They need to understand the need for, purpose and function of paging to divide memory into usable fixed-size pages and how this aids in the transfer of memory for example virtual memory. Candidates need to understand what is meant by segmentation and how memory is divided into segments to allow access to memory. Candidates need to understand what is meant by virtual memory and why this is needed in a computer system. Candidates need to understand how paging is used in virtual memory, and the benefits and drawbacks of having and using virtual memory in a computer system.

What you need to know

The operating system must share RAM between the OS and all running programs, keep each program's memory separate and make use of secondary storage when RAM is full. Paging, segmentation and virtual memory are the techniques used.

What to know

  • Paging divides memory PHYSICALLY into equal sizes; segmentation divides it LOGICALLY into units of different sizes.
  • Drawback: secondary storage is much slower than RAM, so swapping slows the system down.
  • Memory management also protects programs from overwriting each other's memory.

Key terms

Paging

Memory is divided into fixed-size blocks called pages. A program's pages can be stored in any free page frames in RAM, not necessarily next to each other. A page table maps each page to its physical location.

Segmentation

Memory is divided into variable-size logical blocks called segments, matching the structure of the program (e.g. a subroutine or a data structure).

Virtual memory

Part of secondary storage used as an extension of RAM. Pages not currently needed are swapped out to disk and swapped back into RAM when needed.

  • Benefits of virtual memory: more programs can be open than would fit in RAM; programs larger than RAM can run.
Disk thrashing

When the computer spends more time swapping pages between RAM and disk than executing instructions, causing it to slow down dramatically.

Exam technique

  • Tip:Explain how paging SUPPORTS virtual memory: because pages are a fixed size, a page can be swapped out to disk and swapped back into any free frame.
  • Mistake:Saying segments are a fixed size. Segments vary in size; pages are fixed.

Ready to test yourself?

Practise 1.2.1 questions
← Previous noteThe need for, function and purpose of operating systems1.2.1 Systems SoftwareNext note →Interrupts, Interrupt Service Routines (ISR) and their role in the FDE cycle1.2.1 Systems Software

Back to Systems Software

Systems Software

Note 2 of 8

  1. 1The need for, function and purpose of operating systems
  2. 2Memory management: paging, segmentation and virtual memory
  3. 3Interrupts, Interrupt Service Routines (ISR) and their role in the FDE cycle
  4. 4Scheduling: round robin, FCFS, multi-level feedback queues, SJF and SRT
  5. 5Distributed, embedded, multi-tasking, multi-user and real time operating systems
  6. 6BIOS
  7. 7Device drivers
  8. 8Virtual machines: executing intermediate code and running one OS within another
Topic overview