Beruflich Dokumente
Kultur Dokumente
Input/Output System
Major objectives: Take an application I/O request and send it to the physical device. Take whatever response comes back from the device and send it to the application. Optimize the performance of the various I/O requests.
2
Disk Structure
Disk drives are addressed as large 1-dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer. The 1-dimensional array of logical blocks is mapped into the sectors of the disk sequentially.
Sector 0 is the first sector of the first track on the outermost cylinder. Mapping proceeds in order through that track, then the rest of the tracks in that cylinder, and then through the rest of the cylinders from outermost to innermost.
6
Fixed-Head Drums
Developed in the early 1950s
access times of 5 to 25 ms were considered fast used a drum with a capacity of 2000 bytes
later increased to 4000 bytes speed was 200 rpm much faster than other drums of the time which were only 50-60 rpm
Fixed-Head Drums
Resemble a giant coffee can Covered with magnetic film Formatted so tracks run around it Data recorded serially on each track by the read/write head positioned over it
These drums were quite fast, yet expensive and did store as much as other DASDs.
10
Fixed-Head Disks
Disks resemble phonograph record albums covered with magnetic film that has been formatted into concentric circles called tracks Data is recorded in the same manner as fixed-head drum These were very expensive and had less storage space as compared to movable-head disks but were faster.
11
Movable-Head Drums
Consist of a few read/write heads that move from track to track to cover the entire surface of the drum Device that is least expensive has only one read/write head for the whole drum Drums with several read/write heads work faster but also cost more
12
Movable-Head Disks
The read/write head floats over the surface of the disk: Exist as individual units, as in a PC Can also be in a disk pack, which is a stack of disks
13
Disk Pack
A typical disk pack consists of several platters that are stacked on a common central spindle, with a slight space between them so the read/write heads can move between the pairs of disks.
14
Optical Storage
Direct access storage CD-ROMs contained the first optical storage DASDs
these were incompatible with most systems, as they were developed for a single system
Is a major contender for the replacement of magnetic disks because it has highdensity storage and durability
16
CD Storage Capacity
CD-ROM has large storage potential, more than 700 megabytes of data
18
Read/Write
To read or write data, disk device must move the arm to the appropriate track. The time to carry this out this is called Seek Time. Then, the disk device must wait for the desired sector/data to rotate into position under the head (rotational latency). Each track is recorded in units called Sectors. A sector is the smallest amount of data that can be physically read or written.
19
20
I/O Requests
In general, there may be many I/O requests for a device at the same time. These requests may come from multiple processes or the same process.
21
22
23
25
27
Buffered Write
29
I/O Scheduling
For most devices, a FCFS (First-Come-FirstServe) scheduling algorithm is appropriate. For example, one wants the segments of a music file to be played in sequential order. For some devices (disks especially), the order in which requests are processed is not inherently constrained by the device characteristics.
30
33
An Analogy
Traveling service person, a technician who has to service requests from several clients in a geographical area Often spends more time driving than actually carrying out service
34
35
37
State-Dependent Behavior
The current position of the read/write head (i.e., the state of the disk) affects the response time of the next request
38
FCFS Scheduling
FCFS scheduling service I/O requests in the order in which they arrive. It is, of course, the simplest scheduling algorithm and actually does no scheduling. It serves as a useful baseline to compare other scheduling algorithms.
41
42
43
SSTF
Selects the request with the minimum seek time from the current head position. SSTF scheduling is a form of SJF scheduling; may cause starvation of some requests. Illustration shows total head movement of 152 cylinders (or tracks).
44
45
46
SCAN
The disk arm starts at one end of the disk, and moves toward the other end, servicing requests until it gets to the other end of the disk, where the head movement is reversed and servicing continues. Sometimes called the elevator algorithm. Illustration shows total head movement of 136 cylinders.
47
48
49
C-SCAN
A variant of SCAN Provides a more uniform wait time than SCAN. The head moves from one end of the disk to the other. servicing requests as it goes. When it reaches the other end, however, it immediately returns to the beginning of the disk, without servicing any requests on the return trip.
50
51
C-LOOK
Variant of C-SCAN Disk arm only travels as far as the last request in each direction, then reverses direction immediately, without first going all the way to the end of the disk.
52