0% found this document useful (0 votes)
2 views

Lab6.2-IO

Uploaded by

tien101119
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lab6.2-IO

Uploaded by

tien101119
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Chapter 6: IO Review

Làm trên giấy; chụp hình nộp lên form; ghi rõ thông tin cá nhân
trên mỗi trang.

1. What is memory mapped I/O?

2. Why is DMA an improvement over CPU programmed I/O?

3. When would DMA transfer be a poor choice?

4. Disk Technology. Suppose we have a magnetic disk (resembling an IBM Microdrive)


with the following parameters:
Average seek time 12 ms
Rotation rate 3600 RPM
Transfer rate 3.5 MB/second
Sectors per track 64
Sector size 512 bytes
Controller overhead 5.5 ms
Answer the following questions. (Note: you may leave any answer as a fraction.)

(a) What is the average time to read a single sector?


Disk Access Time = seek time + rotational delay + transfer time + controller overhead
rotational delay = rotation rate / 2
Rotation rate = 3600, thus time for one rotation
= 1min * 60 seconds / 3600 = 0.016second = 16.66ms per rotation
Rotational delay for one disk = 1/ 2 * 16.66ms = 8.33 = 30.000/RPM = (1 / (RPM /
60)) * 0.5 * 1000

Transfer time = (512 / 3.5*2^20)*1000 = x ms

= 12 + 8.33 + 0.14 + 5.5 = 25.97ms

b) What is the average time to read 8 KB in 16 consecutive sectors in the same


cylinder?

Transfer time = (8 * 1024 / 3.5*2^20)*1000 = x ms

= 12 + 8.33 + 2.24 + 5.5 = 28.07ms


c) Now suppose we have an array of 4 of these disks. They are all synchronized
such that the arms on all the disks are always on the same sector within the track.
The data is striped across the 4 disks so that 4 logically consecutive sectors can be
read in parallel. What is the average time to read 32 consecutive KB from the disk
array?

4 disks -> each disk can read a sector at a time, total memory can read at a time = 4
* 512 (size of sector) = 2KB.
To read 32KB in 4 disks, need to read 8k in each disk 8k = 8 * 1024 / 512 = 16
sectors
And all disks read at the same time -> answer is same as b

5. What is the average time to read or write a 512-byte sector for a typical disk rotating at
7200 RPM? The advertised average seek time is 8ms, the transfer rate is 20MB/sec, and the
controller overhead is 2ms. Assume that the disk is idle so that there is no waiting time. Disk

Access Time = seek time + rotational delay + transfer time + controller overhead

6. A program repeatedly performs a three-step process: It reads in a 4-KB block of data


from disk, does some processing on that data, and then writes out the result as another 4-
KB block elsewhere on the disk. Each block is contiguous and randomly located on a single
track on the disk. The disk drive rotates at 7200RPM, has an average seek time of 8ms, and
has a transfer rate of 20MB/sec. The controller overhead is 2ms. No other program is using
the disk or processor, and there is no overlapping of disk operation with processing. The
processing step takes 20 million clock cycles, and the clock rate is 400MHz. What is the
overall speed of the system in blocks processed per second assuming no other overhead?

7. How much cylinder skew is needed for a 7200-rpm disk with a track-to-track seek time of
1 msec? The disk has 200 sectors of 512 bytes each on each track.

8. Disk requests come in to the disk driver for cylinders 10, 22, 20, 2, 40, 6, and 38, in that
order. A seek takes 6 msec per cylinder moved. How much seek time is needed for
1. (a) First-Come, first served.
2. (b) Closest cylinder next.
3. (c) Elevator algorithm (initially moving upward).

In all cases, the arm is initially at cylinder 20.

You might also like