Operating systems CMU 2. Consider the enhanced second-chance algorithm for page
ID: 3750457 • Letter: O
Question
Operating systems CMU
2. Consider the enhanced second-chance algorithm for page replacement. Consider a system with 4 pages (this is entirely unrealistic, we are using this to examine how the algorithm works). Since the list of pages is considered to be a circular queue, we will describe the status (reference bit, modify bit) of the pages in order from the page which is pointed to by the page reference. In your demonstrations, show any changes to page status which occur (a) Show how the algorithm chooses a victim with status of pages: (1,1), (1,1) (b) Show how the algorithm chooses a victim with status of pages: (1,1), (1,0), (c) Show how the algorithm chooses a victim with status of pages: (1,0), (1,1), (d) Show how the algorithm chooses a victim with status of pages: (1,0), (1,0),Explanation / Answer
a) In first pass look for (0,0). Second pass, replace (1,1) as (0,1). i.e (0,1), (0,1),(0,1),(0,1). The first (0,1) will be victim.
b) In first pass, look for (0,0), victim would be (0,0)
c) In first pass, look for (0,1), will be repalced.
d) In First pass, we look for (0,0) or (0,1).
In Pass 2, It replaces reference bit to 1. which will become
(0,0), (0,0),(0,0),(0,0). First (0,0) can be a victim.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.