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

Operating Systems WHAT PAGE FRAME# (1 through 6) WOULD BE REPLACED IF WE WERE US

ID: 3855381 • Letter: O

Question

Operating Systems

WHAT PAGE FRAME# (1 through 6) WOULD BE REPLACED IF WE WERE USING:

       A) LFU          REPLACEMENT STRATEGY: __

       B) LRU          REPLACEMENT STRATEGY: __

       C) FIFO         REPLACEMENT STRATEGY: __

       D) CLOCK POLICY REPLACEMENT STRATEGY: __

       E) WORKING SET REPLACEMENT STRATEGY: __

PAGE ENTERED LAST FRAME 001 002 003 004 005 006 PROCESSES IN MEMORY TDME 'A' 10:15 04:12 A. I 12:10 10:22 01:05 13:00 LAST USE USE COUNT POLICY 12:14 120 04:13 52 15:01 100 1 NEXT PTR 10:30 050 13:30 200 14:40 175

Explanation / Answer

PAGE FRAME# (1 through 6) that WOULD BE REPLACED according to the following policies used will be:

A) LFU REPLACEMENT STRATEGY: Page frame 004 because in LFU (Least frequently used) Replacement strategy, the page frame with least used count is replaced and in the given example,Page frame 004 has use count of 050 only.

       B) LRU REPLACEMENT STRATEGY: Page frame 002 because in LRU(Least Recently used) Replacement strategy, the page frame which has not been used recently in time is replaced and in the given example,Page frame 002 has not been used since 4:13 as the time of it's last used is given as 4:13.

      C) FIFO REPLACEMENT STRATEGY: Page frame 005 because in FIFO (First in First out) Replacement strategy, the page frame which entered first is replaced first and in the given example, Page frame 005 entered at 1:05 which is given in Time Entered column as 1:05.

D) CLOCK POLICY REPLACEMENT STRATEGY: Page frame 002 because in Clock Replacement strategy, all the page frames are kept on a circular list in the form of a clock and a hand points to the oldest page and when a page fault occurs , the page being pointed by the hand is inspected and if it's R bit is 0 i.e clock policy shows 0 it is replaced. Actually, Clock policy Replacement is LRU with clock ie. it replaces the page that is least recently used in past and it's clock is set to 0.

And since in above example, page frame 002 is the oldest page and it's clock policy is 0, it is replaced.

E) WORKING SET REPLACEMENT STRATEGY: Page frame 002 because in Working Set Replacement strategy, the page frame is checked as to whether it was referenced at the clock tick when page fault occured.It it was not referenced at that time it is assumed as not part of working set of currently executing process and is replaced. The clock policy keeps track of whether the page has referrence bit R set or not. If R =0 and if that page frame age is greatest (age is calculated by taking difference of current virtual time and last used time).

So , in above example page frame 002 will be replaced since it's clock policy column shows 0 i.e R=0 and it's age is greatest that is 15:02(current time given) - 4:13 (last used time) = 14:49 .