# Andrew S. Tanenbaum (OS) Edition 4 Exercise 3 Question 27 (Page No. 256 - 257)

0 votes
79 views

Suppose that the virtual page reference stream contains repetitions of long sequences of page references followed occasionally by a random page reference. For example, the sequence$: 0, 1, \dots, 511, 431, 0, 1, \dots , 511, 332, 0, 1, \dots$ consists of repetitions of the sequence $0, 1, \dots , 511$ followed by a random reference to pages $431$ and $332.$

1. Why will the standard replacement algorithms $(\text{LRU, FIFO, clock})$ not be effective in handling this workload for a page allocation that is less than the sequence length?
2. If this program were allocated $500$ page frames, describe a page replacement approach that would perform much better than the $\text{LRU, FIFO, or clock}$ algorithms.

## Related questions

0 votes
0 answers
1
78 views
A student has claimed that ‘‘in the abstract, the basic page replacement algorithms (FIFO, LRU, optimal) are identical except for the attribute used for selecting the page to be replaced.’’ What is that attribute for the FIFO algorithm? LRU algorithm? Optimal algorithm? Give the generic algorithm for these page replacement algorithms.
0 votes
0 answers
2
192 views
Suppose that the $\text{WSClock}$ page replacement algorithm uses a $\tau$ of two ticks, and the system state is the following: where the three flag bits $V, R,$ and $M$ ... to a read request to page $4.$ Show the contents of the new table entries. Explain. (You can omit entries that are unchanged.)
0 votes
1 answer
3
93 views
In the $\text{WSClock}$ algorithm of Fig. $3-20(c),$ the hand points to a page with $R = 0.$ If $\tau = 400,$ will this page be removed? What about if $\tau = 1000?$
0 votes
0 answers
4
55 views
Give a simple example of a page reference sequence where the first page selected for replacement will be different for the clock and $LRU$ page replacement algorithms. Assume that a process is allocated $3=\text{three}$ frames, and the reference string contains page numbers from the set $0, 1, 2, 3.$