Download presentation
Presentation is loading. Please wait.
Published byRosamund Palmer Modified over 9 years ago
1
I/O Management and Disk Scheduling
2
I/O Hardware Incredible variety of I/O devices Common concepts Port (a connection point) Bus (daisy chain or shared direct access) Controller (host adapter) I/O instructions control devices Devices have addresses, used by Direct I/O instructions Memory-mapped I/O
3
Computer Structure
4
Life Cycle of an I/O Request
5
I/O System Architecture Devices controllers connect to the bus and represent the devices Device drivers talk to device controllers and through them to the devices Device drivers present a common interface to the rest of the OS
7
Device Driver Interface Open(int deviceNumber): controllers can control more than one device Close(int deviceNumber) Read(int deviceNumber, int deviceAddress, void * memoryAddress, int length) Write(int deviceNumber, int deviceAddress, void * memoryAddress, int length)
8
Disk Structure
9
Disk performance Parameters Seek time is the reason for differences in performance Minimize seek time Seek time seek distance
10
Disk Scheduling
11
First Come First Serve (FCFS)
12
Shortest-Seek-Time-First (SSTF)
13
SCAN Scheduling Directional bit Indicates if arm moving toward/away from disk center Algorithm moves arm methodically From outer to inner track, services every request in its path If reaches innermost track, reverses direction and moves toward outer tracks Services every request in its path Sometimes called the elevator algorithm.
14
SCAN Scheduling
15
C-SCAN Scheduling Provides 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.
16
C-SCAN Scheduling
17
C-Look Scheduling Version of C-SCAN Arm 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.
18
C-Look Scheduling
19
Selecting a Disk Scheduling Algorithm Best strategy FCFS best with light loads Service 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
20
Summary of Disk Scheduling Algorithms
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.