• Home
  • Textbooks
  • Operating System Concepts Essentials
  • Mass-Storage Structure

Operating System Concepts Essentials

Abraham Silberschatz, Peter B. Galvin, Greg Gagne

Chapter 11

Mass-Storage Structure - all with Video Answers

Educators


Chapter Questions

Problem 1

Is disk scheduling, other than FCFS scheduling, useful in a single-user environment? Explain your answer.

Check back soon!
07:39

Problem 2

Explain why SSTF scheduling tends to favor middle cylinders over the innermost and outermost cylinders.

Shazia Naz
Shazia Naz
Numerade Educator
01:29

Problem 3

Why is rotational latency usually not considered in disk scheduling? How would you modify SSTF, SCAN, and C-SCAN to include latency optimization?

Adam Conner
Adam Conner
Numerade Educator

Problem 4

How would use of a RAM disk affect your selection of a disk-scheduling algorithm? What factors would you need to consider? Do the same considerations apply to hard-disk scheduling, given that the file system stores recently used blocks in a buffer cache in main memory?

Check back soon!

Problem 5

Why is it important to balance file system I/O among the disks and controllers on a system in a multitasking environment?

Check back soon!
01:29

Problem 6

What are the tradeoffs involved in rereading code pages from the file system versus using swap space to store them?

Jennifer Stoner
Jennifer Stoner
Numerade Educator
01:37

Problem 7

Is there any way to implement truly stable storage? Explain your answer.

Raghvendra Singh
Raghvendra Singh
Numerade Educator

Problem 8

The term "Fast Wide SCSI-II" denotes a SCSI bus that operates at a data rate of 20 megabytes per second when it moves a packet of bytes between the host and a device. Suppose that a Fast Wide SCSI-II disk drive spins at 7,200 RPM, has a sector size of 512 bytes, and holds 160 sectors per track.
a. Estimate the sustained transfer rate of this drive in megabytes per second.
b. Suppose that the drive has 7,000 cylinders, 20 tracks per cylinder, a head-switch time (from one platter to another) of 0.5 millisecond, and an adjacent-cylinder seek time of 2 milliseconds. Use this additional information to give an accurate estimate of the sustained transfer rate for a huge transfer.
c. Suppose that the average seek time for the drive is 8 milliseconds. Estimate the I/O operations per second and the effective transfer rate for a random-access workload that reads individual sectors that are scattered across the disk.
d. Calculate the random-access $1 / \mathrm{O}$ operations per second and transfer rate for $1 / \mathrm{O}$ sizes of 4 kilobytes, 8 kilobytes, and 64 kilobytes.
e. If multiple requests are in the queue, a scheduling algorithm such as SCAN should be able to reduce the average seek distance. Suppose that a random-access workload is reading 8-kilobyte pages, the average queue length is 10 , and the scheduling algorithm reduces the average seek time to 3 milliseconds. Now calculate the I/O operations per second and the effective transfer rate of the drive.

Check back soon!

Problem 9

More than one disk drive can be attached to a SCSI bus. In particular, a Fast Wide SCSI-II bus (see Exercise 11.8) can be connected to at most 15 disk drives. Recall that this bus has a bandwidth of 20 megabytes per second. At any time, only one packet can be transferred on the bus between some disk's internal cache and the host. However, a disk can be moving its disk arm while some other disk is transferring a packet on the bus. Also, a disk can be transferring data between its magnetic platters and its internal cache while some other disk is transferring a packet on the bus. Considering the transfer rates that you calculated for the various workloads in Exercise 11.8, discuss how many disks can be used effectively by one Fast Wide SCSI-II bus.

Check back soon!
02:34

Problem 10

Remapping bad blocks by sector sparing or sector slipping can influence performance. Suppose that the drive in Exercise 11.8 has a total of 100 bad sectors at random locations and that each bad sector is mapped to a spare that is located on a different track within the same cylinder. Estimate the number of $1 / \mathrm{O}$ operations per second and the effective transfer rate for a random-access workload consisting of 8kilobyte reads, assuming a queue length of 1 (that is, the choice of scheduling algorithm is not a factor). What is the effect of a bad sector on performance?

James Kiss
James Kiss
Numerade Educator
01:42

Problem 11

In a disk jukebox, what would be the effect of having more open files than the number of drives in the jukebox?

Prabhu Ramji
Prabhu Ramji
Numerade Educator

Problem 12

If magnetic hard disks eventually have the same cost per gigabyte as do tapes, will tapes become obsolete, or will they still be needed? Explain your answer.

Check back soon!

Problem 13

It is sometimes said that tape is a sequential-access medium, whereas a magnetic disk is a random-access medium. In fact, the suitability of a storage device for random access depends on the transfer size. The term streaming transfer rate denotes the rate for a data transfer that is underway, excluding the effect of access latency. By contrast, the effective transfer rate is the ratio of total bytes per total seconds, including overhead time such as access latency.
Suppose that, in a computer, the level- 2 cache has an access latency of 8 nanoseconds and a streaming transfer rate of 800 megabytes per second, the main memory has an access latency of 60 nanoseconds and a streaming transfer rate of 80 megabytes per second, the magnetic disk has an access latency of 15 milliseconds and a streaming transfer rate of 5 megabytes per second, and a tape drive has an access latency of 60 seconds and a streaming transfer rate of 2 megabytes per seconds.
a. Random access causes the effective transfer rate of a device to decrease, because no data are transferred during the access time. For the disk described, what is the effective transfer rate if an average access is followed by a streaming transfer of (1) 512 bytes, (2) 8 kilobytes, (3) 1 megabyte, and (4) 16 megabytes?
b. The utilization of a device is the ratio of effective transfer rate to streaming transfer rate. Calculate the utilization of the disk drive for each of the four transfer sizes given in part a.
c. Suppose that a utilization of 25 percent (or higher) is considered acceptable. Using the performance figures given, compute the smallest transfer size for disk that gives acceptable utilization.
d. Complete the following sentence: A disk is a random-access device for transfers larger than _____ bytes and is a sequentialaccess device for smaller transfers.
e. Compute the minimum transfer sizes that give acceptable utilization for cache, memory, and tape.
f. When is a tape a random-access device, and when is it a sequential-access device?

Check back soon!
04:58

Problem 14

Suppose that we agree that 1 kilobyte is 1,024 bytes, 1 megabyte is $1,024^2$ bytes, and 1 gigabyte is $1,024^3$ bytes. This progression continues through terabytes, petabytes, and exabytes $\left(1,024^6\right)$. Several proposed scientific projects plan to record and store a few exabytes of data during the next decade. To answer the following questions, you will need to make a few reasonable assumptions; state the assumptions that you make.
a. How many disk drives would be required to hold 4 exabytes of data?
b. How many magnetic tapes would be required to hold 4 exabytes of data?
c. How many optical tapes would be required to hold 4 exabytes of data (see Exercise 11.35)?
d. How many holographic storage cartridges would be required to hold 4 exabytes of data (see Exercise 11.34)?
e. How many cubic feet of storage space would each option require?

Amy Jackson
Amy Jackson
Numerade Educator
00:59

Problem 15

None of the disk-scheduling disciplines, except FCFS, is truly fair (starvation may occur).
a. Explain why this assertion is true.
b. Describe a way to modify algorithms such as SCAN to ensure fairness.
c. Explain why fairness is an important goal in a time-sharing system.
d. Give three or more examples of circumstances in which it is important that the operating system be unfair in serving I/O requests.

James Kiss
James Kiss
Numerade Educator
02:05

Problem 16

Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4999 . The drive is currently serving a request at cylinder 143 , and the previous request was at cylinder 125 . The queue of pending requests, in FIFO order, is:
$$
\text { 86, 1470, 913, 1774, 948, 1509, 1022, 1750, } 130
$$
Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests for each of the following disk-scheduling algorithms?
a. FCFS
b. SSTF
c. SCAN
d. LOOK
e. C-SCAN
f. C-LOOK

James Kiss
James Kiss
Numerade Educator
06:46

Problem 17

Elementary physics states that when an object is subjected to a constant acceleration $a$, the relationship between distance $d$ and time $t$ is given by $d=\frac{1}{2} a t^2$. Suppose that, during a seek, the disk in Exercise 11.16 accelerates the disk arm at a constant rate for the first half of the seek, then decelerates the disk arm at the same rate for the second half of the seek. Assume that the disk can perform a seek to an adjacent cylinder in 1 millisecond and a full-stroke seek over all 5,000 cylinders in 18 milliseconds.
a. The distance of a seek is the number of cylinders that the head moves. Explain why the seek time is proportional to the square root of the seek distance.
b. Write an equation for the seek time as a function of the seek distance. This equation should be of the form $t=x+y \sqrt{L}$, where $t$ is the time in milliseconds and $L$ is the seek distance in cylinders.
c. Calculate the total seek time for each of the schedules in Exercise 11.16. Determine which schedule is the fastest (has the smallest total seek time).
d. The percentage speedup is the time saved divided by the original time. What is the percentage speedup of the fastest schedule over FCFS?

Mayukh Banik
Mayukh Banik
Numerade Educator
03:35

Problem 18

Suppose that the disk in Exercise 11.17 rotates at 7,200 RPM.
a. What is the average rotational latency of this disk drive?
b. What seek distance can be covered in the time that you found for part a?

Donald Albin
Donald Albin
Numerade Educator
02:14

Problem 19

The accelerating seek described in Exercise 11.17 is typical of hard-disk drives. By contrast, floppy disks (and many hard disks manufactured before the mid-1980s) typically seek at a fixed rate. Suppose that the disk in Exercise 11.17 has a constant-rate seek rather than a constantacceleration seek, so the seek time is of the form $t=x+y L$, where $t$ is the time in milliseconds and $L$ is the seek distance. Suppose that the time to seek to an adjacent cylinder is 1 millisecond, as before, and the time to seek to each additional cylinder is 0.5 milliseconds.
a. Write an equation for this seek time as a function of the seek distance.
b. Using this seek-time function, calculate the total seek time for each of the schedules in Exercise 11.16. Is your answer the same as that for Exercise 11.17(c)?
c. What is the percentage speedup of the fastest schedule over FCFS in this case?

Mayukh Banik
Mayukh Banik
Numerade Educator

Problem 20

Write a program that simulates the disk-scheduling algorithms discussed in Section 11.4.

Check back soon!

Problem 21

Compare the performance of C-SCAN and SCAN scheduling, assuming a uniform distribution of requests. Consider the average response time (the time between the arrival of a request and the completion of that request's service), the variation in response time, and the effective bandwidth. How does performance depend on the relative sizes of seek time and rotational latency?

Check back soon!
02:05

Problem 22

Requests are not usually uniformly distributed. For example, we can expect a cylinder containing the file-system FAT or inodes to be accessed more frequently than a cylinder containing only files. Suppose you know that 50 percent of the requests are for a small, fixed number of cylinders.
a. Would any of the scheduling algorithms discussed in this chapter be particularly good for this case? Explain your answer.
b. Propose a disk-scheduling algorithm that gives even better performance by taking advantage of this "hot spot" on the disk.
c. File systems typically find data blocks via an indirection table, such as a FAT in DOS or inodes in UNIX. Describe one or more ways to take advantage of this indirection to improve disk performance.

James Kiss
James Kiss
Numerade Educator

Problem 23

Could a RAID level 1 organization achieve better performance for read requests than a RAID level 0 organization (with nonredundant striping of data)? If so, how?

Check back soon!
01:13

Problem 24

Consider a RAID level 5 organization comprising five disks, with the parity for sets of four blocks on four disks stored on the fifth disk. How many blocks are accessed in order to perform the following?
a. A write of one block of data
b. A write of seven continuous blocks of data

Aaron Goree
Aaron Goree
Numerade Educator
01:09

Problem 25

Compare the throughput achieved by a RAID level 5 organization with that achieved by a RAID level 1 organization for the following:
a. Read operations on single blocks
b. Read operations on multiple contiguous blocks

James Kiss
James Kiss
Numerade Educator

Problem 26

Compare the performance of write operations achieved by a RAID level 5 organization with that achieved by a RAID level 1 organization.

Check back soon!

Problem 27

Assume that you have a mixed configuration comprising disks organized as RAID level 1 and RAID level 5 disks. Assume that the system has flexibility in deciding which disk organization to use for storing a particular file. Which files should be stored in the RAID level 1 disks and which in the RAID level 5 disks in order to optimize performance?

Check back soon!
01:03

Problem 28

The reliability of a hard-disk drive is typically described in terms of a quantity called mean time between failures (MTBF). Although this quantity is called a "time," the MTBF actually is measured in drive-hours per failure.
a. If a system contains 1,000 disk drives, each of which has a 750,000hour MTBF, which of the following best describes how often a drive failure will occur in that disk farm: once per thousand years, once per century, once per decade, once per year, once per month, once per week, once per day, once per hour, once per minute, or once per second?
b. Mortality statistics indicate that, on the average, a U.S. resident has about 1 chance in 1,000 of dying between the ages of 20 and 21 . Deduce the MTBF hours for 20-year-olds. Convert this figure from hours to years. What does this MTBF tell you about the expected lifetime of a 20-year-old?
c. The manufacturer guarantees a 1-million-hour MTBF for a certain model of disk drive. What can you conclude about the number of years for which one of these drives is under warranty?

Maxime Rossetti
Maxime Rossetti
Numerade Educator
01:50

Problem 29

Discuss the relative advantages and disadvantages of sector sparing and sector slipping.

Hossam Mohamed
Hossam Mohamed
Numerade Educator

Problem 30

Discuss the reasons why the operating system might require accurate information on how blocks are stored on a disk. How could the operating system improve file system performance with this knowledge?

Check back soon!

Problem 31

The operating system generally treats removable disks as shared file systems but assigns a tape drive to only one application at a time. Give three reasons that could explain this difference in treatment of disks and tapes. Describe the additional features that an operating system would need to support shared file-system access to a tape jukebox. Would the applications sharing the tape jukebox need any special properties, or could they use the files as though the files were disk-resident? Explain your answer.

Check back soon!

Problem 32

What would be the effects on cost and performance if tape storage had the same areal density as disk storage?

Check back soon!

Problem 33

You can use simple estimates to compare the cost and performance of a terabyte storage system made entirely from disks with one that incorporates tertiary storage. Suppose that each magnetic disk holds $10 \mathrm{~GB}$, costs $$\$ 1,000$$, transfers $5 \mathrm{MB}$ per second, and has an average access latency of 15 milliseconds. Also suppose that a tape library costs $$\$ 10$$ per gigabyte, transfers $10 \mathrm{MB}$ per second, and has an average access latency of 20 seconds. Compute the total cost, the maximum total data rate, and the average waiting time for a pure disk system. If you make any assumptions about the workload, describe and justify them. Now, suppose that 5 percent of the data are frequently used, so they must reside on disk, but the other 95 percent are archived in the tape library. Further suppose that the disk system handles 95 percent of the requests and the library handles the other 5 percent. What are the total cost, the maximum total data rate, and the average waiting time for this hierarchical storage system?

Check back soon!
02:15

Problem 34

Imagine that a holographic storage drive has been invented. The drive costs $$\$ 10,000$$ and has an average access time of 40 milliseconds. It uses a $$\$ 100$$ cartridge the size of a CD. This cartridge holds 40,000 images, and each image is a square black-and-white picture with a resolution of $6,000 \times 6,000$ pixels (each pixel stores 1 bit). The drive can read or write one picture in 1 millisecond. Answer the following questions.
a. What would be some good uses for this device?
b. How would this device affect the I/O performance of a computing system?
c. What kinds of storage devices, if any, would become obsolete as a result of the invention of this device?

James Kiss
James Kiss
Numerade Educator
04:17

Problem 35

Suppose that a one-sided 5.25-inch optical-disk cartridge has an areal density of 1 gigabit per square inch. Further suppose that a magnetic tape has an areal density of 20 megabits per square inch and is $1 / 2$ inch wide and 1,800 feet long. Calculate an estimate of the storage capacities of these two kinds of storage media. Suppose that an optical tape exists that has the same physical size as the magnetic tape but the same storage density as the optical disk. What volume of data could the optical tape hold? What would be a marketable price for the optical tape if the magnetic tape cost $$\$ 25$$ ?

Sean Dougherty
Sean Dougherty
Numerade Educator