Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 7 - Device Management Ivy Tech State College Northwest Region 01 CIS106 Microcomputer Operating Systems Gina Rue CIS Faculty.

Similar presentations


Presentation on theme: "Chapter 7 - Device Management Ivy Tech State College Northwest Region 01 CIS106 Microcomputer Operating Systems Gina Rue CIS Faculty."— Presentation transcript:

1 Chapter 7 - Device Management Ivy Tech State College Northwest Region 01 CIS106 Microcomputer Operating Systems Gina Rue CIS Faculty

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

3 3 Introduction - Device Management Four Basic FunctionsFour 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 levelprocess level job leveljob level

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

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

6 See Fig. 7.1 p.1476 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 checkingparity bit used for routine error checking interrecord gap (IRG) inserted in between each recordinterrecord gap (IRG) inserted in between each record

7 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 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 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 headsfixed read/write heads movable read/write headsmovable read/write heads

10 See Fig. 7.4 & 7.5 p Direct Access Storage Devices Fixed-Head Drums & DisksFixed-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

11 11 Direct Access Storage Devices Fixed-Head Drums & DisksFixed-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 See Fig. 7.6 p Direct Access Storage Devices Movable-Head Drums & DisksMovable-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 drumleast expensive device with only one read/write head for the entire drum conventional design device with several read/write heads that move togetherconventional design device with several read/write heads that move together

13 See Fig. 7.7 p Direct Access Storage Devices Movable-Head Drums & DisksMovable-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 PCsindividual units, such as those with many PCs disk packs, stack of disks, each disk has 2 surfaces for recording (top & bottom)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 800tracks on disk varies by manufacturer, but typically range from 200 to 800 tracks are numbered, Track 0 is the outermost concentric circletracks are numbered, Track 0 is the outermost concentric circle

14 14 Direct Access Storage Devices Optical Disc Storage (ODS)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 armread/write head on an arm measure performance in data-transfer rate and average access timemeasure performance in data-transfer rate and average access time

15 See Table 7.2 p Direct Access Storage Devices Optical Disc Storage (ODS)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

16 16 Direct Access Storage Devices Access Time Required: 3 factors that contribute to the time required to access a file seek timeseek time time required to position the read/write head on the proper track; slowest of 3 factorstime required to position the read/write head on the proper track; slowest of 3 factors search timesearch 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 headalso 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 timetransfer time when the data is actually transferred from secondary storage to main memory; fastest of 3 factorswhen the data is actually transferred from secondary storage to main memory; fastest of 3 factors

17 See Fig 7.8 p 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 speedrotational speed position of the record relative to the position of the read/write headposition of the record relative to the position of the read/write head Access Time = Search Time + Transfer Time

18 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 longerless costly and larger capacity; even though retrieval time is longer

19 See Fig. 7.9 p I/O System Components I/O subsystems work togetherI/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 unitkeeps 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 unitprogrammable units placed between the CPU and the control unit sends one signal for each functionsends one signal for each function synchronizes the fast speed of the CPU with the slow speed of the I/O devicesynchronizes the fast speed of the CPU with the slow speed of the I/O device

20 See Fig & 11 p I/O System Components I/O subsystems work togetherI/O subsystems work together –I/O Control Unit (driver) interprets the channel signalinterprets the channel signal sometimes part of the devicesometimes part of the device each control unit can direct several deviceseach 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 deviceflexibility, 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 subsystemmultiple paths increase reliability of the I/O subsystem

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

22 22 Communication Among Devices Concurrent processing & I/O Concurrent processing & I/O each unit in the I/O subsystem can finish its operation independentlyeach 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 deviceafter 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 performedCPU is free to process data while I/O is being performed

23 23 Communication Among Devices How does the system know when a device has completed an operation? How does the system know when a device has completed an operation? Hardware flag must be tested by the CPUHardware flag must be tested by the CPU made up of 3 bits & resides in the Channel Status Word (CSW)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 statuseach bit represents one of the components indicating channel status –channel bit, control unit, & device –0 free, 1 busy

24 24 Communication Among Devices Each component has access to the flagEach component has access to the flag can be tested before proceeding with the next I/O operationcan be tested before proceeding with the next I/O operation –Common ways to perform this test: pollingpolling interruptsinterrupts

25 25 Communication Among Devices PollingPolling –use special machine instructions to test the flag –major disadvantage CPU wastes time testing flag InterruptsInterrupts –more efficient way to test flags –interrupt handler determines best course for action

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

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

28 See Table 7.5 p Management of I/O Requests I/ traffic controllerI/ 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

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

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

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

32 See Fig p Device Handler Seek Strategies First come first served (FCFS)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

33 See Fig p Device Handler Seek Strategies Shortest seek time first (SSTF)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

34 See Fig p Device Handler Seek Strategies SCAN uses a directional bit to indicate arm movement 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 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 N-step SCAN holds all requests until the arm starts on its way back

35 35 Device Handler Seek Strategies C-SCAN (Circular SCAN) the arm picks up requests on its path during inward sweepC-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 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 36 Search Strategies: Rotational Ordering Optimize search times by ordering requests once the read/write heads have been positioned Optimize search times by ordering requests once the read/write heads have been positioned

37 See Fig & table 7.6 p Search Strategies: Rotational Ordering “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

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

39 39 Summary Complex task of balancing demand for devices divided among hardware components: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 partsSuccess of the I/O subsystem depends on the communications that link these parts

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


Download ppt "Chapter 7 - Device Management Ivy Tech State College Northwest Region 01 CIS106 Microcomputer Operating Systems Gina Rue CIS Faculty."

Similar presentations


Ads by Google