/>
Device Management Functions:
Tracking the status of each device (disk drives, printers, modems, etc.)
Uses policies to determine which process gets a device and for how long
Allocating the devices
Deallocating devices
Peripheral devices are categorized as follows:
Dedicated
shared
virtual
Most important differences among devices
Speed
Degree of sharability
Shared devices
Assigned to several processes (DASD)
time by interleaving their requests
Interleaving must be carefully controlled by Device Manager
conflicts must be resolved based on pre-determined policies
DASDs:
Any devices that can directly read or write to specific place on a disk
Physical disk geometry - readable by the system BIOS Track - concentric circle containing data Sector - part of a track![]()
Cylinder - all tracks readable from one head position Seek - move read/write heads between tracks![]()
Physical formatting (low-level formatting) Usually done at the factory. Must be done before logical formatting Defines the tracks, sectors, and cylinders Logical formatting Lets disk to be accessed using sequentially numbered logical sectors Installs a file system (ex: NTFS)
Fixed head - faster but $$![]()
One read/write head floats over the surface of each disk, e.g., Can be a single platter Can be a part of a disk pack (stack of platters) Disk Pack: Each platter has two surfaces for recording (except top and bottom) Each surface is formatted with concentric tracksNumber of tracks ranges to a thousand or more on a high-capacity hard disk Track 0 identifies the outermost track highest-numbered track is in the center The arm moves all of the heads in unison To access any given record, the system needs: Cylinder number Surface number Record number
Time required to access a file depends on: 1. Seek time: Time to position read/write head - Slowest of three factors 2. Search time (rotational delay): Time to rotate DASD until desired record is under read/write head 3. Transfer time: Time to transfer data from SS to RAM - Fastest of three
Access time = Seek time + Search time + Transfer time
Seek Strategy: ============== Policy to determine order in which processes get device Seek time is largest delay in disk access Goal is to keep seek time to a minimum Types of seek strategies: 1. First come, first served (FCFS), 2. Shortest seek time first (SSTF), 3. SCAN (including LOOK, N-Step SCAN, C-SCAN, & C-LOOK)
Every scheduling algorithm should: 1. Minimize arm movement 2. Minimize mean response time 3. Minimize variance in response time
FCFS: On average, doesn’t meet any of three goals of a seek strategy Disadvantage: Extreme arm movementWhile retrieving data from Track 15, the following requests arrive: Track 4, 40, 11, 35, 7, and 14. It takes 1 ms to travel from one track to next
Shortest Seek Time First (SSTF): Request with track closest to one being served is satisfied next Minimizes overall seek time Postpones traveling to those that are out of wayWhile retrieving data from Track 15, the following requests arrive: Track 4, 40, 11, 35, 7, and 14. It takes 1 ms to travel from one track to next
SCAN (LOOK: ) Arm doesn’t go all the way to either edge unless there are requests Eliminates possibility of indefinite postponemenTWhile retrieving data from Track 15, the following requests arrive: Track 4, 40, 11, 35, 7, and 14. It takes 1 ms to travel from one track to next
Which strategy is the best? FCFS works well with light loads service time becomes unacceptably long under high loads SSTF works well with moderate loads has problem of localization under heavy loads LOOK works well with light to moderate loads eliminates problem of indefinite postponement similar to SSTF in throughput and mean service times
Rotational ordering:
Optimizes search times by ordering requests once heads are positioned
Reduces rotational delay (second factor in time delay)
Time spent moving read/write head is hardware dependent
Amount of time wasted on rotational delay can be reduced:
Arrange requests so next sector to be read is closer to head position
FCFS
====
ORDERED
=======