You are on page 1of 6

Lecture 9: Virtual Memory

Tutorial
Mr. Barongo
Question One
a) Virtual Memory
b) Demand Paging & Demand Segmentation
c) Steps on Handling page fault
d) Copy on Write (COW)
e) Page Replacement
f) Page and Frame Replacement Algorithms
g) Frame Allocation
 Fixed allocation
 Priority allocation
 Global and Local Allocation
Question Two
Under what circumstances do page faults
occur? Describe the actions taken by the
operating system when a page fault occurs.
Question Three
Consider the following page reference string:
1,2,3,4,2,1,5,6,1,2,3,7,6,3,2,1,2,3,6.
a) How many page faults would occur for the
LRU, FIFO, LFU and optimal page
replacement algorithms assuming three and
five Frames?
b) How many page faults would occur for the
following replacement algorithms, assuming
one, two, three, four, five, six, and seven
frames? Remember that all frames are
initially empty, so your first unique pages will
cost one fault each.
Question Four
For the following page reference calculate the
page faults that occur using FIFO, LRU and
Optimal for 3 and 4 page frames respectively,
5,4,3,2,1,4,3,5,4,3,2,1,5
Question Five
Consider the following page-replacement
algorithms. Rank these algorithms on a five-
point scale from “bad” to “perfect”
according to their page-fault rate. Separate
those algorithms that suffer from Belady’s
anomaly from those that do not.
a) LRU replacement
b) FIFO replacement
c) Optimal replacement
d) Second-chance replacement

You might also like