

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Main points of this past exam are: Maximally Efficient Protocol, Appropriate Quadrant, Recovery Protocol, Special-Purpose, After-Image, Buffer Manager, Transaction Table, Dirty Page Table, Dependencies, Violate
Typology: Exams
1 / 3
This page cannot be seen from the preview
Don't miss anything!
Name_________________________________ Section You Usually Attend________________
This exam has four problems, each worth 25 points. There is also 10 points of extra credit available. Each problem is made up of multiple questions. You should read through the exam quickly and plan your time-management accordingly. Before beginning to answer a question, be sure to read it carefully and to answer all parts of every question!
You must write your answers on the answer sheets provided. You may use the sheets with questions as scratch paper. You also must write your name at the top of every page , and you must turn in all the pages of the exam. Do not remove pages from the stapled exam! Two pages of extra answer space have been provided at the back in case you run out of space while answering. If you run out of space, be sure to make a "forward reference" to the page number where your answer continues. Good luck!
To receive full credit for this problem you must write down relevant formulas and show your work.
We are trying to sort a file containing 250,000 blocks with only 250 buffers available in the buffer pool for sorting. The file contains fixed length tuples.
a) [5 points] How many initial runs will be generated if quicksort is used to sort tuples in memory?
b) [5 points] How many total I/O will the sort perform, including the cost of writing out the output?
In the following questions, assume that the average time to locate a random block (seek and rotational delay) takes 10 ms, while the time to transfer a block takes 5 ms.
c) [5 points] During our sort, if we merge runs a block at a time (in memory we set aside one buffer frame per input run for merging) what percent of the total disk bandwidth are we utilizing?
d) [5 points] Suppose we want to achieve a disk bandwidth utilization of 90%. How many buffer frames per run should we set aside in our buffer pool?
e) [5 points] What is the tradeoff in setting aside aside more buffer frames (i.e. higher disk bandwidth utilization) per run?
Name_________________________________ Section You Usually Attend________________exam #professor (e.g., 1
Hash Indexes
a) [5 points] Fill in the global depth and local depth for each bucket in the extendible hashing index shown to the right.
b) [5 points] What is the minimum number of entries that needed to be inserted to cause the creation of a new bucket?
c) [5 points] Give an example for such a sequence of entries.
B+ Tress
d) [5 points] What is the maximum height of a B+-tree with N data entries and fanout k?
e) [5 points] Consider the bulk-loading algorithm we studied in class. Assume there are N data entries, k entries fit on a leaf node, and the internal nodes have fanout k. Ignoring the effects of buffer management, explain briefly why bulk-loading is more or less efficient than building the tree via multiple insertions.
f) [Extra Credit: 10 points] In addition to range and equality selection queries, we would like to efficiently support queries of the form "how many tuples fall in the range of x to y ". Describe how you would augment a B+-tree to support such queries. Outline how these "count" queries would be evaluated in your tree. Also outline the steps involved in inserting a new entry. Your augmented B+-tree should be able to support such count queries at much lower cost than normal B+-tree.
a) [5 points] List the three major components of disk delay, organized from most to least time consuming.]
b) [5 points] We discussed two possible formats for variable-length records: one with delimiters, and another with pointers. Explain which one is preferable and why.
c) [5 points] Explain why you cannot have a sparse, unclustered index. You may want to illustrate with a example.
d) [5 points] Assume you have a buffer pool with 3 frames and a file with four pages (A, B, C, D). Assuming that the buffer pool starts out empty, give an access pattern of 8 page accesses that makes LRU do an I/O for each page access.