For a database application, assume it takes 10 ms to read a block from disk, 1 m
ID: 3824017 • Letter: F
Question
For a database application, assume it takes 10 ms to read a block from disk, 1 ms to search for a record in a block stored in memory, and that there is room in memory for a buffer pool of 5 blocks. Requests come in for records, with the request specifying which block contains the record. If a block is accessed, there is a 10% probability for each of the next ten requests that the request will be to the same block. What will be the expected performance improvement for each of the following modifications to the system?
(a) Get a CPU that is twice as fast.
(b) Get a disk drive that is twice as fast.
(c) Get enough memory to double the buffer pool size.
Explanation / Answer
In present situation, 1 in 10 request will be from the same block. The rest of the requests may require reading a block from the disk. So, for 10 requests, total time = 9*10 + 1*10 = 100 ms. Average read time per record = 10 ms.
a. if the CPU is twice as fast, then search will take 1/2 the original time = 0.5 ms. Rest will remain same. So, read time for 10 records will be 10*9 + 0.5*10 = 95 ms. Average read time per record = 9.5 ms.
b. If the buffer pool size is doubled, the probability of getting the same block request does not change. Hence, it may still require reading from the disk. The performance does not change.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.