Presentation is loading. Please wait.

Presentation is loading. Please wait.

I/O Management and Disk schedule. I/O Devices DevicePurposePartnerData rate (KB/sec) KeyboardInputHuman.01 MouseInputHuman.02 Voice inputInputHuman.02.

Similar presentations


Presentation on theme: "I/O Management and Disk schedule. I/O Devices DevicePurposePartnerData rate (KB/sec) KeyboardInputHuman.01 MouseInputHuman.02 Voice inputInputHuman.02."— Presentation transcript:

1 I/O Management and Disk schedule

2 I/O Devices DevicePurposePartnerData rate (KB/sec) KeyboardInputHuman.01 MouseInputHuman.02 Voice inputInputHuman.02 ScannerInputHuman200 Voice outputOutputHuman.06 Line printerOutputHuman1 Laser printerOutputHuman100 Graphics displayOutputHuman30,000 CPU to frame bufferOutputHuman200 Network terminalInput or outputMachine.05 Network-LANInput or outputMachine200 Optical diskStorageMachine500 Magnetic tapeStorageMachine2,000 Magnetic diskStorageMachine2,000

3 I/O Techniques No interruptsInterrupts I/O to memory transfer through processor Programmed I/OInterrupt-driven I/O Direct I/O to memory transfer Direct memory access (DMA) l DMA unit uses the bus to transfer data to/from memory l when the CPU is not using it, or l forces CPU to temporarily suspend (cycle stealing) l I/O channels l selector l multiplexor

4 I/O organization User processes User processes File System Physical organization Device I/O Scheduling & Control Hardware Device I/O Scheduling & Control Hardware Device I/O Scheduling & Control Hardware User processes Logical I/O Communic. architecture Local Remote File system

5 I/O Buffering n Why buffer? – I/O too slow – not possible to swap out a whole process – risk of single-process deadlock – page in memory would have to be locked n I/O devices are: – block-oriented: disk and other storage devices – stream-oriented: terminals, printers, com ports, mouse n Types of buffers (blocks, line or byte at-a-time) – single buffer – double – circular

6 Disk concepts: review See the following page http://home.ubalt.edu/abento/751/6iomgmt/os0606.html

7 Disk performance parameters n Seek time – time to move disk arm to a track – S = m x n + s (m is a constant per disk, number of tracks transversed, s startup time) n Rotational delay – waiting time for a given sector align with the head – disks: =~ 3,600 rpm, average = 8.3 msec – diskettes= 300-600 rpm, average = 100 and 200 msec n Access time = seek + rotational delay n Transfer time – time to spin record by the head (to read or write) – T = b/ rN (b is number of bytes to be transferred, r rotation speed rpm/sec, N number of bytes on a track)

8 Disk scheduling policies NameDescriptionCharacteristic Selection according to requestor: RSSrandom schedulingfor analysis only FIFOfirst-in, first-outfairest of them all PRIpriority by processcontrol not based on disk queue management LIFOlast-in, first-outmaximize locality and resource utilization Selection according to requested item: SSTFshortest service firsthigh use, small queues SCANback and forth over diskbetter service distribution C-SCANone way with fast returnlower service variability N-step-SCANSCAN of N records at a timeservice guarantee FSCANN-step-SCAN with N= queue sizeload sensitive OS maintains a queue of requests for each I/O device

9 Disk Cache n a buffer in main memory for disk sectors n locality and locality of reference is what makes it to score hits n reading ahead and write-back delay n data delivery from the cache: – move from cache to user memory – shared memory and pointers: point do not move n Replacement strategy (similar to pages) – LRU (least recently used) – LFU (least frequently used) – FBR (frequency-based replacement) n Hits are not moved to top of queue as they might, pointers are used n Empirical: misses and hits are a function of the cache size


Download ppt "I/O Management and Disk schedule. I/O Devices DevicePurposePartnerData rate (KB/sec) KeyboardInputHuman.01 MouseInputHuman.02 Voice inputInputHuman.02."

Similar presentations


Ads by Google