(Usage hints for this presentation)
IT Systems, Summer Term 2024
Dr. Jens Lechtenbörger (License Information)
Under-specified term
When (thread of) process opens file, file can be mapped into virtual address space
page 2
in big picturePage accesses in that file trigger page faults
Upon write, MMU triggers interrupt, OS makes page writable and remembers it as dirty (changed from clean)
Popular alternatives
Demand paging
Prepaging
At least current instruction (and required data) necessary in main memory
Principle of locality
OPT: Hypothetical optimal replacement
FIFO: First In, First Out replacement
LRU: Least Recently Used replacement
“Figure 6.19 of cite:Hai17” by Max Hailperin under CC BY-SA 3.0; converted from GitHub
Frames arranged in cycle, pointer to next frame
If page hit
If page miss
Page miss
Perform the following task in Learnweb.
Apply the page replacement algorithms OPT, FIFO, LRU, and Clock
(Second Chance) for four frames of main memory to the following
stream of page references under demand paging: 1, 3, 4, 7, 1, 2, 4,
1, 3, 4
Verify your results against the previous slide
and raise any questions that you may have.
E.g., 32-bit addresses with page size of 4 KiB (212 B)
If 4 bytes per entry, then 4 MiB (222 B) per page table
Page table itself needs 210 pages/frames! Per process!
Much worse for 64-bit addresses
Two approaches to reduce page table sizes
Source files are available on GitLab (check out embedded submodules) under free licenses. Icons of custom controls are by @fontawesome, released under CC BY 4.0.
Except where otherwise noted, the work “Virtual Memory II”, © 2017-2024 Jens Lechtenbörger, is published under the Creative Commons license CC BY-SA 4.0.