Documente Academic
Documente Profesional
Documente Cultură
Device Management 1
Topics to be covered
Introduction to Device Management System Device Device Handler Seek Strategies
2
Saipunidzam Mahamad /Operating Systems
Device Management
Device Management Functions: Tracking the status of each device
e.g., disk drives, printers, modems, etc.
Using preset policies to determine which process will get a device and for how long Allocating the devices Reallocating devices at two levels
At the process level At the job level
3
Saipunidzam Mahamad /Operating Systems
Types of Devices
Peripheral devices are categorized as follows:
Characteristics of the devices How theyre managed by the Device Manager
Different categories:
Dedicated, shared, and virtual
Dedicated Devices
Assigned to only one job at a time and serves that job for entire time its active
e.g., tape drives, printers, and plotters
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 the time
5
Saipunidzam Mahamad /Operating Systems
Shared Devices
Assigned to several processes
e.g., disk pack or other DASDs can be shared by several processes at same time by interleaving their requests Interleaving must be carefully controlled by Device Manager
Virtual Devices
Dedicated devices that have been transformed into shared devices
e.g., printers (dedicated devices) converted into sharable devices through a spooling program
C-SCAN (Circular SCAN): Arm picks up requests on its path during inward sweep
Provides a more uniform wait time
Example
Suppose that a disk drive has 2000 cylinders, numbered from 0 to 1999. The drive is currently serving a request at cylinder 134 an the previous request was at cylinder 120. The queue of pending requests, in FIFO order, is
94, 1459, 920, 1795, 930, 1515, 1010, 1749, 128 Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests, for each of the following disk-scheduling algorithms. a. FCFS b. SSTF c. LOOK
14
Saipunidzam Mahamad /Operating Systems
Example
Basically we can solve the problem in 2 ways:
Illustrate the arm movement Table
Head Destination Tracks Travelled
Start Finish
Movement
15
Saipunidzam Mahamad /Operating Systems
Example
FCFS 134 94 40 94 1459 1365 1459 920 539 920 1795 875 1795 930 865 930 1515 585 1515 1010 505 1010 1749 739 1749 128 1621 7134 SSTF 134 128 128 94 94 920 920 930 930 1010 1010 1459 1459 1515 1515 1749 1749 1795 6 34 826 10 80 449 56 234 46 1741
Total Number of Tracks
16
Saipunidzam Mahamad /Operating Systems
LOOK 134 920 786 920 930 10 930 1010 80 1010 1459 449 1459 1515 56 1515 1749 234 1749 1795 46 1795 128 1667 128 94 34 3362
Summary
Device Manager manages every system device as effectively as possible Several seek strategies, each with distinct advantages and disadvantages SCAN works well with light to moderate loads and eliminates problem of indefinite postponement C-SCAN works well with moderate to heavy loads and has a very small variance in service times
18
Saipunidzam Mahamad /Operating Systems