Professional Documents
Culture Documents
System Devices Sequential Access Storage Media Direct Access Storage Devices Components of I/O Subsystem Communication Among Devices Management of I/O Requests
Understanding Operating Systems
System Devices
Differences among systems peripheral devices are a function of characteristics of devices, and how well theyre managed by the Device Manager.
Most important differences among devices Speeds Degree of sharability. By minimizing variances among devices, a systems overall efficiency can be dramatically improved.
Understanding Operating Systems 3
Dedicated Devices
Assigned to only one job at a time and serve that job for entire time its active. E.g., tape drives, printers, and plotters, demand this kind of allocation scheme, because it would be awkward to share. Disadvantage -- must be allocated to a single user for duration of a jobs execution. Can be quite inefficient, especially when device isnt used 100 % of time.
Understanding Operating Systems 4
Shared Devices
Assigned to several processes. E.g., disk pack (or other direct access storage device) can be shared by several processes at same time by interleaving their requests. Interleaving must be carefully controlled by Device Manager.
All conflicts must be resolved based on predetermined policies to decide which request will be handled first.
Understanding Operating Systems 5
Virtual Devices
Combination of dedicated devices that have been transformed into shared devices. E.g, printers are converted into sharable devices through a spooling program that reroutes all print requests to a disk. Output sent to printer for printing only when all of a jobs output is complete and printer is ready to print out entire document. Because disks are sharable devices, this technique can convert one printer into several virtual printers, thus improving both its performance and use.
Understanding Operating Systems 6
Each record can be identified by its position on the tape. To access a single record, tape is mounted & fastforwarded from its beginning until locate desired position.
Understanding Operating Systems 7
Magnetic Tapes
Data is recorded on 8 parallel tracks that run length of tape. Ninth track holds parity bit used for routine error checking. Number of characters that can be recorded per inch is determined by density of tape (e.g., 1600 or 6250 bpi). Characters
Parity
Interrecord gap (IRG) is gap between records about 1/2 inch long regardless of the sizes of the records it separates. Interblock gap (IBG) the gap between blocks of records; still 1/2 inch long.
Understanding Operating Systems 9
Variability makes magnetic tape a poor medium for routine secondary storage except for files with very high sequential activity.
12
Fixed-Head Drums
Magnetically recordable drums. Resembles a giant coffee can covered with magnetic film and formatted so the tracks run around it. Data is recorded serially on each track by the read/write head positioned over it. Fixed-head drums were very fast but also very expensive, and they did not hold as much data as other DASDs.
Understanding Operating Systems 14
15
16
One read/write head that floats over the surface of the disk.
Disks can be individual units (used with many PCs) or part of a disk pack (a stack of disks).
Understanding Operating Systems 17
Cylinders
Its slower to fill a disk pack surface-by-surface than to fill it up track-by-track. If fill Track 0 of all surfaces, got virtual cylinder of data.
Are as many cylinders as there are tracks. Cylinders are as tall as the disk pack.
Uses a high-intensity laser beam to burn pits (indentations) and lands (flat areas) in disc to represent ones and zeros, respectively.
Understanding Operating Systems 19
Average access time -- average time required to move head to a specific place on disc.
Expressed in milliseconds (ms).
Cache size -- hardware cache acts as a buffer by transferring blocks of data from the disc
Anticipates user may want to reread some recently retrieved info. Act as read-ahead buffer, looking for next block of info on disc.
Understanding Operating Systems 21
CD-ROM Technology
CD-ROM -- first commonly used optical storage DASD. Stores very large databases, reference works, complex games, large software packages, system documentation, and user training material. CD-ROM jukeboxes (autochangers or libraries) are capable of handling multiple discs and networked to distribute multimedia and reference works to distant user.
22
23
Useful for storing large quantities of data and for sound, graphics, and multimedia applications.
Understanding Operating Systems 24
DVD-RAM is a writable technology that uses a red laser to read, modify, and write data to DVD discs.
25
Search time (rotational delay) -- time it takes to rotate DASD until requested record is under read/write head.
Transfer time -- when data is actually transferred from secondary storage to main memory.
Fastest.
Understanding Operating Systems 26
For example, it takes 0.094 ms (almost 0.1 ms) to transfer a record with 100 bytes.
28
Seek time is the longest and several strategies have been developed to minimize it.
Understanding Operating Systems 29
CPU
Control Unit 3 Channel 2 Control Unit 4
Disk 4
Disk 5
30
Use channel programs that specifies action to be performed by devices & controls transmission of data between main memory & control units. Entire path must be available when an I/O command is initiated.
31
Be able to accommodate requests that come in during heavy I/O traffic. Accommodate disparity of speeds between CPU and I/O devices.
33
34
Resides in the Channel Status Word (CSW) In a predefined location in main memory and contains info indicating status of channel.
Each bit is changed from zero to one to indicate that unit has changed from free to busy.
Understanding Operating Systems 35
36
Interrupts
Use of interrupts is a more efficient way to test flag. Hardware mechanism does test as part of every machine instruction executed by CPU. If channel is busy flag is set so that execution of current sequence of instructions is automatically interrupted. Control is transferred to interrupt handler, which resides in a predefined location in memory. Some sophisticated systems are equipped with hardware that can distinguish between several types of interrupts.
37
Buffers
Buffers are temporary storage areas residing in convenient locations throughout system: main memory, channels, and control units.
Used extensively to better synchronize movement of data between relatively slow I/O devices & very fast CPU.
Double buffering --2 buffers are present in main memory, channels, and control units.
While one record is being processed by CPU another can be read or written by channel
Understanding Operating Systems 39
Three main tasks: (1) it must determine if theres at least 1 path available; (2) if theres more than 1 path available, it must determine which to select; and (3) if paths are all busy, it must determine when one will become available. Maintains a database containing status and connections for each unit in I/O subsystem, grouped into Channel Control Blocks, Control Unit Control Blocks, and Device Control Blocks.
Understanding Operating Systems 41
42
I/O Scheduler
I/O scheduler performs same job as Process Scheduler-- it allocates the devices, control units, and channels. Under heavy loads, when # requests > # available paths, I/O scheduler must decide which request satisfied first. I/O requests are not preempted: once channel program has started, its allowed to continue to completion even though I/O requests with higher priorities may have entered queue.
Feasible because programs are relatively short (50 to 100 ms).
Understanding Operating Systems 43
I/O Scheduler - 2
Some systems allow I/O scheduler to give preferential treatment to I/O requests from high-priority programs. If a process has high priority then its I/O requests also has high priority and is satisfied before other I/O requests with lower priorities. I/O scheduler must synchronize its work with traffic controller to make sure that a path is available to satisfy selected I/O requests.
44
48
C-LOOK (optimization of C-SCAN) --sweep inward stops at last high-numbered track request, so arm doesnt move all the way to last track unless its required to do so.
Arm doesnt necessarily return to the lowest-numbered track; it returns only to the lowest-numbered track thats requested.
50
System shows improved I/O performance and improved data recovery in event of disk failure.
Understanding Operating Systems 53
RAID -2
RAID introduces much-needed concept of redundancy to help systems recover from hardware failure. Also requires more disk drives which increase hardware costs.
54
Six standard levels of RAID fall into 4 categories. Each offers a unique combination of advantages.
Level
Category
Description
I/O Request Rate Excellent Good/Fair Poor Poor Excellent/ Fair Excellent/ Fair
0 1 2 3 4 5
Data Striping Mirroring Parallel Access Parallel Access Independent Access Independent Access
Nonredundant Mirrored Redundant Bit-interleaved parity Block-interleaved parity Block-interleaved distributed parity
55
Terminology
access time blocking buffers Channel Status Word (CSW) cylinder dedicated device direct access storage devices (DASDs) direct memory access (DMA) first come first served (FCFS) I/O channel I/O control unit I/O device handler I/O scheduler I/O subsystem I/O traffic controller interblock gap (IBG) interrecord gap (IRG) interrupts LOOK magnetic tape optical disc drive polling RAID
56
Terminology - 2
rotational ordering SCAN search strategy search time seek strategy seek time sequential access media shared device shortest seek time first (SSTF) transfer rate transfer time transport speed virtual device
57