For the figure below, using the Clock policy of page replacements, show the figure after each of the following page requests: 3, 2, 1, 5. ----- | >5 | | 4* | | 2 | -----
Here 5 is the first page which was loaded into memory and page 4 has been referred more than once. Thus it would be given priority when a page has to be chosen for replacement.
Ref. | Initial | 3 | 2 | 1 | 5 |
Frame#1 | >5 | 3 | 3 | 1 | 1 |
Frame#2 | 4* | >4* | >4* | >4 | 5 |
Frame#3 | 2 | 2 | 2* | 2* | >2 |
Hit/Fault | - | F | H | F | F |
When page 3 was brought into frame, FIFO replacement technique was used. When page 2 was brought, ideally 4 should have been replaced, but since it has been referred more than once in past, it will be given one more chance and page 3 will be choosen as victim page.
Here total # of fault =3
If you have any questions comment down. Please don't simply downvote and leave. If you are satisfied with answer, please? upvote thanks
Get Answers For Free
Most questions answered within 1 hours.