câu 36
Link will be apear in 30 seconds.
Well done! you have successfully gained access to Decrypted Link.
Question:
A computer has four page frames. The time of loading, time of last access, and the R and M bits for each page are as shown below (the times are in clock ticks):
(a) Which page will NRU replace?
(b) Which page will FIFO replace?
(c) Which page will LRU replace?
(d) Which page will second chance replace?
Answer:
(a) NRU: 2(
page 2, because R=0 and M=0)
(b) FIFO: 3(
page 3, because it was loaded first)
(c) LRU: 1(
page 0, becuase it hasn't been used for longest time.)
(d) Second Chance: 2(
1st candidate: page frame 3 (because it was loaded from
disk first). But! It's R bit is 1.
So 2nd chance allows it to stay.
2nd candidate: page frame 0 (because it was loaded from
disk next) It's R bit is 0, so page frame 0 is
chosen to be evicted.
)