COMP 3150Operating Systems

Module 3 of 5

Memory Management

How the operating system gives every process the illusion of its own large, contiguous address space — and how it keeps that illusion cheap. From the memory hierarchy and address binding through paging, page tables, the TLB, page replacement, and the control of thrashing.

2 units · 13 lessons Labs 7–8 CLO4 · CLO8 ≈ 3 weeks at recommended pace
Virtual to physical address translation A virtual address split into a virtual page number and an offset is translated through a page table into a physical frame number, producing a physical address that selects a frame in RAM. Virtual address VPN · 20 off page number offset 32-bit · 4 KiB pages Page table VPN 2 → PFN 7 VPN 5 → PFN 3 VPN 9 → PFN 1 indexed by VPN Physical address PFN · 8 off frame number offset offset unchanged select frame PHYSICAL MEMORY · FRAMES frame 0 frame 1 frame 2 frame 3 frame 7 frame 5 frame 3 frame 6
2UnitsPhysical · Virtual
13Lessons6 + 7
2LaboratoriesLabs 7–8
2CLOsCLO4 · CLO8
≈3WeeksAt recommended pace

Module overview

The memory abstraction

Every process believes it owns a large, private, contiguous address space. Nothing about that belief is true at the hardware level: memory is physical, finite, and shared. The gap between the illusion and the reality is bridged by the memory-management subsystem, and this module explains how.

Unit 8 builds the physical side — the hierarchy, address binding, contiguous allocation, fragmentation, and segmentation. Unit 9 builds the virtual side — paging, page tables, the TLB, demand paging, page replacement, and thrashing. Together they give you the vocabulary and the analytical tools to reason about performance in any modern system.

Module learning outcomes

What you will be able to do

After Module 3 you will be able to

  • Describe the memory hierarchy and the role of address binding.
  • Analyse contiguous allocation, internal and external fragmentation, and segmentation.
  • Explain paging, page tables, and the translation lookaside buffer.
  • Trace a virtual address through translation to a physical frame.
  • Compare demand paging and page-replacement policies (FIFO, LRU, optimal, clock).
  • Diagnose and mitigate thrashing through working-set and page-fault-frequency control.
  • Implement and measure a virtual-memory simulator.

Course outcomes addressed

  • CLO4 — Explain memory and virtual-memory management techniques.
  • CLO8 — Design and implement software components related to operating-system functionality.

Units

Units in this module

Laboratory & assessment

How Module 3 is assessed

Laboratories

LabTopicUnit
Lab 7Memory ManagementUnit 8
Lab 8Virtual MemoryUnit 9

Lab 8 feeds directly into the Virtual Memory Simulator option in Assignment 2.

Quizzes, discussion, and the midterm

  • Unit 8 quiz — hierarchy, binding, allocation, fragmentation, segmentation.
  • Unit 9 quiz — paging, TLB, demand paging, replacement, thrashing.
  • Two discussion activities.
  • Midterm examination — covers Modules 1–3, including memory management.

Analytical focus

Much of this module is quantitative: page-fault rates, effective access times, and replacement-policy hit ratios. Work through the worked examples carefully.

👤