Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A process contains eight virtual pages on disk and is assigned a fixed allocatio

ID: 3688419 • Letter: A

Question

A process contains eight virtual pages on disk and is assigned a fixed allocation of four page frames in main memory. A trace of memory accesses shows the pages are accessed in the following order:

1,0,2,2,1,7,6,7,0,1,2,0,3,0,4,5,1,5,2,4,5,6,8,6,7,2,4,2,7,3,3,2,3

FIFO replacement policy: Show what pages reside in the four frames in memory assuming the FIFO replacement policy. Compute the hit ratio in main memory. Assume that the frames are initially empty.

LIFO replacement policy: Show what pages reside in the four frames in memory assuming the LRU replacement policy. Compute the hit ratio in main memory. Assume that the frames are initially empty.

Explanation / Answer

FIFO:

LIFO:

ENTER THE NUMBER OF PAGES:33

ENTER THE PAGE NUMBER :1 0 2 2 1 7 6 7 0 1 2 0 3 0 4 5 1 5 2 4 5 6 8 6 7 2 4 2 7 3 3 2 3
ENTER THE NUMBER OF FRAMES :   4
   1   -1   -1   -1
   1   2   -1   -1
   1   2   7   -1
   1   2   7   6
   1   0   7   6
   1   0   7   2
   1   0   3   2
   4   0   3   2
   4   0   3   5
   4   0   1   5
   4   2   1   5
   4   2   6   5
   4   8   6   5
   7   8   6   5
   7   8   6   2
   7   4   6   2
   7   4   3   2

The no of page faults is 17

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote