I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts...
-
Upload
rosamund-palmer -
Category
Documents
-
view
215 -
download
0
Transcript of I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts...
![Page 1: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/1.jpg)
I/O Management and Disk Scheduling
![Page 2: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/2.jpg)
I/O HardwareIncredible variety of I/O devicesCommon concepts
Port (a connection point)Bus (daisy chain or shared direct access)Controller (host adapter)
I/O instructions control devicesDevices have addresses, used by
Direct I/O instructionsMemory-mapped I/O
![Page 3: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/3.jpg)
Computer Structure
![Page 4: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/4.jpg)
Life Cycle of an I/O Request
![Page 5: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/5.jpg)
I/O System ArchitectureDevices controllers connect to the bus
and represent the devices
Device drivers talk to device controllersand through them to the devices
Device drivers present a common interface to the rest of the OS
![Page 6: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/6.jpg)
![Page 7: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/7.jpg)
Device Driver InterfaceOpen(int deviceNumber): controllers can
control more than one deviceClose(int deviceNumber)Read(int deviceNumber, int deviceAddress,
void * memoryAddress, int length)Write(int deviceNumber, int deviceAddress,
void * memoryAddress, int length)
![Page 8: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/8.jpg)
Disk Structure
![Page 9: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/9.jpg)
Disk performance Parameters
Seek time is the reason for differences in performanceMinimize seek timeSeek time seek distance
![Page 10: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/10.jpg)
Disk Scheduling
![Page 11: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/11.jpg)
First Come First Serve (FCFS)
![Page 12: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/12.jpg)
Shortest-Seek-Time-First (SSTF)
![Page 13: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/13.jpg)
SCAN SchedulingDirectional bit
Indicates if arm moving toward/away from disk center
Algorithm moves arm methodicallyFrom outer to inner track, services every
request in its pathIf reaches innermost track, reverses direction
and moves toward outer tracksServices every request in its path
Sometimes called the elevator algorithm.
![Page 14: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/14.jpg)
SCAN Scheduling
![Page 15: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/15.jpg)
C-SCAN SchedulingProvides a more uniform wait time than SCAN.The head moves from one end of the disk to
the other, servicing requests as it goes. When it reaches the other end, however, it immediately returns to the beginning of the disk, without servicing any requests on the return trip.
Treats the cylinders as a circular list that wraps around from the last cylinder to the first one.
![Page 16: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/16.jpg)
C-SCAN Scheduling
![Page 17: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/17.jpg)
C-Look SchedulingVersion of C-SCANArm only goes as far as the last request in
each direction, then reverses direction immediately, without first going all the way to the end of the disk.
![Page 18: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/18.jpg)
C-Look Scheduling
![Page 19: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/19.jpg)
Selecting a Disk Scheduling AlgorithmBest strategy
FCFS best with light loadsService time unacceptably long under high
loads SSTF best with moderate loads
Localization problem under heavy loads SCAN best with light to moderate loads
Eliminates indefinite postponement Throughput and mean service times SSTF similarities
C-SCAN best with moderate to heavy loads Very small service time variances
![Page 20: I/O Management and Disk Scheduling. I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared.](https://reader035.fdocuments.us/reader035/viewer/2022062423/5697bf991a28abf838c91d91/html5/thumbnails/20.jpg)
Summary of Disk Scheduling Algorithms