Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1. (20 points) Consider a database byffer manager that uses the algorithm explained in Section 13.5.1 of the textbook for a hard drive which

image text in transcribed
Problem 1. (20 points) Consider a database byffer manager that uses the algorithm explained in Section 13.5.1 of the textbook for a hard drive which takes 10 milliseconds per disk seek and can read 80MB per second. (a) (10 points) Assume that (i) the size of each disk block is 8KB, (ii) the probability that the buffer manager can handle a data request without accessing the disk (i.e., the probability that a requested block is already in the buffer) is 90%, (iii) only 10% of disk block accesses require a disk seek (i.e., 90% of the disk blocks are read consecutively without requring any disk seek), (iv) no disk blocks are updated (i.e., no need to write dirty blocks back to the hard drive), and (v) the time spent for reading/writing data in the main memory is negligible (considered 0 milliseconds). Under these assumptions, calculate the expected data access time (i.e., how much time it would on average take to obtain a disk block from the buffer manager). (b) (10 points) In contrast to the above scenario, assume that (i) the size of each disk block is 16KB, (ii) the probability that the buffer manager can handle a data request without accessing the disk (i.e., the probability that a requested block is already in the buffer) is 70%, and (iii) only 5% of disk block accesses require a disk seek (i.e., 95% of the disk blocks are read consecutively without requring any disk seek). Calculate the expected data access time as in (a). Also, based on the above calculations, explain whether it is more advantageous to use 8KB disk blocks or 16KB disk blocks. Problem 1. (20 points) Consider a database byffer manager that uses the algorithm explained in Section 13.5.1 of the textbook for a hard drive which takes 10 milliseconds per disk seek and can read 80MB per second. (a) (10 points) Assume that (i) the size of each disk block is 8KB, (ii) the probability that the buffer manager can handle a data request without accessing the disk (i.e., the probability that a requested block is already in the buffer) is 90%, (iii) only 10% of disk block accesses require a disk seek (i.e., 90% of the disk blocks are read consecutively without requring any disk seek), (iv) no disk blocks are updated (i.e., no need to write dirty blocks back to the hard drive), and (v) the time spent for reading/writing data in the main memory is negligible (considered 0 milliseconds). Under these assumptions, calculate the expected data access time (i.e., how much time it would on average take to obtain a disk block from the buffer manager). (b) (10 points) In contrast to the above scenario, assume that (i) the size of each disk block is 16KB, (ii) the probability that the buffer manager can handle a data request without accessing the disk (i.e., the probability that a requested block is already in the buffer) is 70%, and (iii) only 5% of disk block accesses require a disk seek (i.e., 95% of the disk blocks are read consecutively without requring any disk seek). Calculate the expected data access time as in (a). Also, based on the above calculations, explain whether it is more advantageous to use 8KB disk blocks or 16KB disk blocks

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

2 What supply is and what affects it.

Answered: 1 week ago