CS计算机代考程序代写 database algorithm assembly RMIT University

RMIT University
COSC2406/2407 Database Systems Tutorial Exercises
Note: Numbered homework exercises, and exercises marked “*”, are from Ramakrishnan and Gehrke.
Disks and files: Week 3
1. Every storage device has different characteristics. Consider an enterprise SSD (Solid State Drive) with the following characteristics (based on an actual drive available in 2014):
• read bandwidth (sequential): 0.75 GB/s • write bandwidth (sequential): 0.5 GB/s • capacity: 800 GB
• power: 3 W
• price $3,100
and compare it with an enterprise HDD (Hard Disk Drive) from the same manufacturer with
the following characteristics (based on actual drive available in 2014):
• read bandwidth (sequential): 0.2 GB/s • write bandwidth (sequential): 0.2 GB/s • capacity: 600 GB
• power: 1 W
• price $200
based on the following criteria:
(a) $/GB
(b) $/GB/s (based on sequential read bandwidth)
(c) power usage (W/GB) (d) power usage (W/GB/s)
2. The Washing Machine 999 disk drive has the following characteristics:
• 8 platters that provide 16 surfaces • 32,768 tracks per surface
• An average of 256 sectors per track • 4,096 bytes per sector
• Rotation speed of 7,200 RPM
• To start moving the head assembly takes 1 ms
• To stop moving the head assembly takes 1 ms
• Moving the head requires 1 ms per 800 cylinders
(a) What is the approximate unformatted capacity of the Washing Machine 999? (b) Give examples of valid block sizes. Is 2,048 a valid block size?
(c) What is the best-case retrieval time to read five sectors? (d) What is the worst-case retrieval time to read five-sectors?
COSC2406/2407 Tutorial Exercises 1

(e) The disk head is currently stopped and resting at cylinder 800. Consider the following stream of requests that arrive at the following times:
Cylinder Arrival time (ms from now) 600 0
12,000 0
400 0
300 4 500 4 13,000 12
Using the elevator algorithm, show the the order in which requests are serviced. Assume that reading requires 4 ms, including rotational latency and reading time.
(f) Repeat the last question, but assume a first-come-first-served algorithm. Which algo- rithm is faster? Why?
3. * When does the DBMS buffer manager write pages to disk?
4. * What does it mean to say that a page is pinned in the buffer pool? Who is responsible for pinning pages? Who is responsible for unpinning pages?
5. Homework: 8.1, 9.1, 9.3, 9.13, 9.14
COSC2406/2407 Tutorial Exercises 2