Skip to main content
EnglandComputer ScienceSyllabus dot point

How does the operating system manage memory, and what are paging, segmentation and virtual memory?

Memory management: how the operating system allocates and protects memory between processes, paging and segmentation, and virtual memory using secondary storage to extend the apparent size of main memory.

An Eduqas Component 2 answer on memory management: how the operating system allocates and protects memory between processes, the difference between paging and segmentation, and how virtual memory uses secondary storage to extend the apparent size of main memory.

Generated by Claude Opus 4.813 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

Eduqas wants you to explain how the OS allocates and protects memory between processes, distinguish paging from segmentation, and explain virtual memory, why it is used, and disk thrashing. This builds on the OS dot point and the memory hierarchy from section 3.1.

The answer

Allocating and protecting memory

Paging and segmentation

Virtual memory and disk thrashing

Examples in context

Memory management is why you can run many apps at once and why a misbehaving app rarely takes down the whole system (memory protection). Virtual memory is why a computer can open a file or run a program larger than its RAM, and why adding RAM speeds up a machine that was thrashing. Paging is the scheme used by virtually all modern operating systems. This dot point connects to the memory hierarchy (registers, cache, RAM, secondary storage) from section 3.1 and to the OS's process management in the previous dot point.

Try this

Q1. State the difference between paging and segmentation. [2 marks]

  • Cue. Paging divides memory into equal fixed-size blocks (frames/pages); segmentation divides a process into variable-size logical segments (code, data, stack).

Q2. What is virtual memory? [2 marks]

  • Cue. Using part of secondary storage as if it were extra main memory, swapping pages between disk and RAM so the apparent memory is larger than the physical RAM.

Q3. Why does disk thrashing slow a computer dramatically? [1 mark]

  • Cue. The OS spends most of its time swapping pages between RAM and disk (which is far slower than RAM) rather than executing instructions.

Exam-style practice questions

Practice questions written in the style of WJEC Eduqas exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Eduqas 20216 marksExplain the difference between paging and segmentation as methods of memory management.
Show worked answer →

Paging (up to 3 marks): main memory is divided into equal, fixed-size blocks called frames, and a process is divided into equal-size blocks called pages of the same size; pages are loaded into any available frames, which need not be contiguous. Because the divisions are a fixed size, paging can cause internal fragmentation (the last page may not be full).

Segmentation (up to 3 marks): a process is divided into logical, variable-size segments that reflect its structure (for example a code segment, a data segment, a stack segment); each segment is allocated a contiguous area of memory. Because segments vary in size, segmentation can cause external fragmentation (gaps between segments).

Markers reward the fixed-size-physical-blocks description of paging and the variable-size-logical-divisions description of segmentation, ideally with the fragmentation each can cause.

Eduqas 20225 marksExplain what virtual memory is, why it is used, and what is meant by disk thrashing.
Show worked answer →

Virtual memory (up to 2 marks): a technique where part of secondary storage (the hard disk or SSD) is used as if it were extra main memory; pages of a process not currently needed are moved out to this area, and pages that are needed are brought back into RAM, so the apparent amount of memory is larger than the physical RAM.

Why it is used (up to 1 mark): it allows programs larger than physical RAM to run, and lets more processes be held at once than RAM alone would allow.

Disk thrashing (up to 2 marks): if too many processes are running, the OS spends most of its time swapping pages between RAM and disk rather than executing instructions, because pages are constantly needed and evicted; performance collapses because disk access is far slower than RAM.

Markers reward the secondary-storage-as-extra-RAM definition, the run-larger-programs reason, and the excessive-swapping description of thrashing.

Related dot points

Sources & how we know this