1 / 40

Chapter 7 - Device Management

Chapter 7 - Device Management. Introduction - Device Management. Device Manager: Manages every peripheral device of the system Maintains a balance of the user’s demand and the system’s finite supply of devices. Introduction - Device Management. Four Basic Functions

ginger
Télécharger la présentation

Chapter 7 - Device Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 7 - Device Management

  2. Introduction - Device Management Device Manager: • Manages every peripheral device of the system • Maintains a balance of the user’s demand and the system’s finite supply of devices See Illustration p.145

  3. Introduction - Device Management • Four Basic Functions • tracking the status of each device, tape & disk drives, printers, terminals, etc. • uses policies to determine which process will get a device & for how long • allocating devices • deallocating devices • process level • job level

  4. System Devices • 3 Peripheral Device categories • dedicated • assigned only one job at a time, tape drives, printers, plotters • shared • assigned to several processes, disk pack, other storage devices by interleaving requests • virtual • combination dedicated & shared, printers, disks

  5. Sequential Access Storage Media • 2 Groups of Storage Media • Sequential access media • store records sequentially, one after another • Direct access storage devices • can store either sequentially or direct access, directly reading or writing to a specific place

  6. Sequential Access Storage Media Magnetic Tape • developed for early systems for routine secondary storage, archiving, back-up data • records are stored serially, each record can be any length stored in any location, record length usually determined by application • time consuming to locate records, “fast-forwarded” to desired position • parity bit used for routine error checking • interrecord gap (IRG) inserted in between each record See Fig. 7.1 p.147

  7. Sequential Access Storage Media Magnetic Tape • blocking, grouping records into blocks before recording them, performed while file is created • transfer rate, density of tape (number or records in a block) • transport speed, speed of tape: transfer rate = density * transport speed

  8. Sequential Access Storage Media Magnetic Tape Blocking Advantages: • fewer I/O operations • less tape is wasted Blocking Disadvantages • overhead & software routines are needed, deblocking, and record keeping • buffer space may be wasted Access times can vary widely

  9. Direct Access Storage Devices • (DASDs) any devices that can directly read or write to a specific place on disk • Also called random access storage devices • Grouped into 2 categories • fixed read/write heads • movable read/write heads

  10. Direct Access Storage Devices • Fixed-Head Drums & Disks • one of the first DASDs developed in early 1950’s • fixed-drum resembles a giant coffee can covered with magnetic film & formatted so tracks run around it • fixed-drum data is recorded serially on each track by the read/write head positioned over it See Fig. 7.4 & 7.5 p.150

  11. Direct Access Storage Devices • Fixed-Head Drums & Disks • fixed-disk looks like a phonograph album covered with magnetic film that has been formatted, into concentric circles (tracks) • fixed-disk data is recorded serially on each track by the read/write head positioned over it

  12. Direct Access Storage Devices • Movable-Head Drums & Disks • Movable-Head drums have only a few read/write heads that move from track to track to cover the entire surface of the drum • least expensive device with only one read/write head for the entire drum • conventional design device with several read/write heads that move together See Fig. 7.6 p.151

  13. Direct Access Storage Devices • Movable-Head Drums & Disks • Movable-Head disk have only one read/write head that floats over the surface of the disk • individual units, such as those with many PCs • disk packs, stack of disks, each disk has 2 surfaces for recording (top & bottom) • tracks on disk varies by manufacturer, but typically range from 200 to 800 • tracks are numbered, Track 0 is the outermost concentric circle See Fig. 7.7 p.151

  14. Direct Access Storage Devices • Optical Disc Storage (ODS) • Includes CD-ROM, provides reliable high-density storage for large amounts of data • 1995 ODS were read only, now CD-R (recordable) available • function similar to magnetic disk drive • read/write head on an arm • measure performance in data-transfer rate and average access time

  15. Direct Access Storage Devices • Optical Disc Storage (ODS) • data transfer rate measured in kilobytes per second (Kps) refers to speed that data can be read off disc • access time indicates the average time required to move the read head to a specific place on the disc, expressed in milliseconds (ms) • hardware cache acts like a buffer by transferring blocks of data from the disk See Table 7.2 p.153

  16. Direct Access Storage Devices Access Time Required: 3 factors that contribute to the time required to access a file • seek time • time required to position the read/write head on the proper track; slowest of 3 factors • search time • also known as rotational delay; time it takes to rotate the drum or disk until the requested record is moved under the read/write head • transfer time • when the data is actually transferred from secondary storage to main memory; fastest of 3 factors

  17. Direct Access Storage Devices Access Time for Fixed-Head Devices • access a record by knowing its track and record number • total amount of time required to access data depends on 2 factors: • rotational speed • position of the record relative to the position of the read/write head Access Time = Search Time + Transfer Time See Fig 7.8 p.154

  18. Direct Access Storage Devices Access Time for Movable-Head Devices • adds a third time element to the computation of access time: Access Time = Seek Time + Search Time + Transfer • overall, moveable-head devices are much more common than fixed-head DASDs • less costly and larger capacity; even though retrieval time is longer

  19. I/O System Components • I/O subsystems work together • I/O Channels (dispatcher) • keeps up with the I/O requests from the CPU & pass them on to the appropriate control unit • programmable units placed between the CPU and the control unit • sends one signal for each function • synchronizes the fast speed of the CPU with the slow speed of the I/O device See Fig. 7.9 p.157

  20. I/O System Components • I/O subsystems work together • I/O Control Unit (driver) • interprets the channel signal • sometimes part of the device • each control unit can direct several devices • flexibility, connect more than one channel for a control unit or connect more than one control unit to a single device • multiple paths increase reliability of the I/O subsystem See Fig. 7.10 & 11 p.158 -159

  21. CommunicationAmong Devices • Demanding conditions of a busy computer system • Device Manager (3 Problems) • needs to know which components are busy & which are free • must be able to handle requests that come in during heavy I/O traffic • must accommodate disparity of speeds between CPU & I/O devices

  22. CommunicationAmong Devices • Concurrent processing & I/O • each unit in the I/O subsystem can finish its operation independently • after a device has begun writing a record, & before completing the task, the connection between the device & its controller can be cut off to begin another I/O task with another device • CPU is free to process data while I/O is being performed

  23. CommunicationAmong Devices • How does the system know when a device has completed an operation? • Hardware flag must be tested by the CPU • made up of 3 bits & resides in the Channel Status Word (CSW) • CSW, predefined location in main memory, contains channel status information • each bit represents one of the components indicating channel status • channel bit, control unit, & device • 0 free, 1 busy

  24. CommunicationAmong Devices • Each component has access to the flag • can be tested before proceeding with the next I/O operation • Common ways to perform this test: • polling • interrupts

  25. CommunicationAmong Devices • Polling • use special machine instructions to test the flag • major disadvantage CPU wastes time testing flag • Interrupts • more efficient way to test flags • interrupt handler determines best course for action

  26. CommunicationAmong Devices • Direct Memory Access (DMA) • allows a control unit to access main memory more directly • data can be transferred to & from memory without CPU interaction • Buffers • more efficient way to test flags • interrupt handler determines best course for action See Fig. 7.12 p.161

  27. Management of I/O Requests • Device Manager divides the task into 3 parts handled by a software component of the I/O subsystem • I/O traffic controller • I/O scheduler • I/O device handler

  28. Management of I/O Requests • I/ traffic controller • monitors every device status, control unit, & channel • maintains control blocks • three main tasks: • determines if path is available • determines best path • determines when a path will become available See Table 7.5 p.162

  29. Management of I/O Requests • I/O scheduler • performs same job as the Process Scheduler • allocates the devices, control units, & channels • decides which request will take priority • synchronizes its work with the traffic controller

  30. Management of I/O Requests • I/O Device handler • processes the I/O interrupts • handles error conditions • provides detailed scheduled algorithms • each type of I/O device has its own device handler algorithm

  31. Device Handler Seek Strategies • Seek Strategy determines the order processes get the device, keeping seek time to a minimum • Every scheduling algorithm should do the following: • minimize movement • minimize mean response time • minimize the variance in response time

  32. Device Handler Seek Strategies • First come first served (FCFS) • simplest device-scheduling algorithm • easy to users & fair to users • seek time delay disadvantage • seek time is the most time consuming See Fig. 7.13 p.164

  33. Device Handler Seek Strategies • Shortest seek time first (SSTF) • shortest jobs are processed first • longer jobs are made to wait • requests the track closest to the one being served • favors easy-to-reach requests & postpones long jobs farther away See Fig. 7.14 p.164

  34. Device Handler Seek Strategies • SCAN uses a directional bit to indicate arm movement • LOOK (elevator algorithm/SCAN variation), arm does not go all the way to either edge unless requested • N-step SCAN holds all requests until the arm starts on its way back See Fig. 7.15 p.165

  35. Device Handler Seek Strategies • C-SCAN (Circular SCAN) the arm picks up requests on its path during inward sweep • C-LOOK arm does not move all the way back to last track unless required The best scheduling algorithm may be a combination of more than one scheme

  36. Search Strategies:Rotational Ordering • Optimize search times by ordering requests once the read/write heads have been positioned

  37. Search Strategies:Rotational Ordering • “Rotational Ordering” • amount of time wasted due to rotational delay can be reduced • requests are ordered within each track • device controller must provide “rotational sensing” so the device driver can “see” which sector is under the read/write head See Fig. 7.16 & table 7.6 p.167

  38. Summary • Device Manager’s job to manage all the devices despite varying speeds & sharing abilities • Direct Access and Sequential Access • One or many read/write heads • Fixed position or heads move across surface

  39. Summary • Complex task of balancing demand for devices divided among hardware components: • channels • control units • devices • Success of the I/O subsystem depends on the communications that link these parts

  40. Summary • Seek strategies to optimize seek time • FCFS: First Come, First Served • SSTF: Shortest Seek Time First • SCAN/LOOK • N-step SCAN • C-SCAN/C-LOOK

More Related