Information Technology Reference
In-Depth Information
6. Suppose I have a disk such as the 320GB SATA drive described in Fig-
ure 12.9 on page 381 and I have a workload consisting of 10000 reads to
sectors randomly scattered across the disk. How long will these 10000
request take (total) assuming the disk services requests in FIFO order?
7. Suppose I have a disk such as the 320GB SATA drive described in Fig-
ure 12.9 on page 381 and I have a workload consisting of 10000 reads to
10000 sequential sectors on the outer-most tracks of the disk. How long
will these 10000 request take (total) assuming the disk services requests
in FIFO order?
8. Suppose I have a disk such as the 320GB SATA drive described in Fig-
ure 12.9 on page 381 and I have a workload consisting of 10000 reads to
sectors randomly scattered across the disk. How long will these 10000 re-
quest take (total) assuming the disk services requests using the SCAN/El-
evator algorithm.
9. Suppose I have a disk such as the 320GB SATA drive described in Fig-
ure 12.9 on page 381 and I have a workload consisting of 10000 reads
to sectors randomly scattered across a 100MB file, where the 100MB file
is laid out sequentially on the disk. How long will these 10000 request
take (total) assuming the disk services requests using the SCAN/Elevator
algorithm?
10. Write a program that creates a 100MB file on your local disk and then
measures the time to do each of four things:
(a) Sequential overwrite. Overwrite the file with 100MB of new data
by writing the file from beginning to end and then calling fsync()
(or the equivalent on your platform).
(b) Random buffered overwrite. Do the following 50,000 times:
choose a 2KB-aligned offset in the file uniformly at random, seek
to that location in the file, and write 2KB of data at that position.
Then, once all 50,000 writes have been issued, call fsync() (or the
equivalent on your platform).
(c) Random buffered overwrite.Do the following 50,000 times: choose
a 2KB-aligned offset in the file uniformly at random, seek to that lo-
cation in the file, write 2KB of data at that position, and call fsync()
(or the equivalent on your platform) after each individual write.
(d) Random read. Do the following 50,000 times: choose a 2KB-
aligned offset in the file uniformly at random, seek to that location
in the file, and read 2KB of data at that position.
Explain your results.
Search WWH ::




Custom Search