Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following query. (The user is trying to read P1 from disk, then read P2, Write P3, ..., commit at the end.) Read
Consider the following query. (The user is trying to read P1 from disk, then read P2, Write P3, ..., commit at the end.) Read P1, Read P2, Write P3, Write P4, Write P5, Read P5, Read P2, Read P4, Commit. Every time when reading or writing a page that is not in the buffer pool, the page needs to be fetched from the disk first. Assume that writing a page follows the same rule as reading a page. The only difference is, if a page that has been written in the buffer pool is going to be replaced, then it has to be written to disk before replacement. Each fetch from disk or write to disk is considered as an equal-cost disk access. Assume there are 3 buffers in the buffer pool. 1. Sketch the process of how blocks are replaced in the Least Recently Used (LRU) policv. What is the number of page fault and disk access? Justify your answer. 2. Sketch the process of how blocks are replaced in the Most Recently Used (MRU) policy. What is the number of page fault and disk access? Justify your answer. 3. Between the LRU and MRU policies above, which one performs better in the given query? Justify you answer.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
To analyze the LRU Least Recently Used and MRU Most Recently Used buffer replacement policies well simulate the process step by step for the given que...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started