i/o management and disk scheduling. i/o hardware incredible variety of i/o devices common concepts...

Post on 17-Jan-2016

215 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

I/O Management and Disk Scheduling

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

Computer Structure

Life Cycle of an I/O Request

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

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)

Disk Structure

Disk performance Parameters

Seek time is the reason for differences in performanceMinimize seek timeSeek time seek distance

Disk Scheduling

First Come First Serve (FCFS)

Shortest-Seek-Time-First (SSTF)

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.

SCAN Scheduling

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.

C-SCAN Scheduling

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.

C-Look Scheduling

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

Summary of Disk Scheduling Algorithms

top related