19
UNIVERSITY INSTITUTE OF TECHNOLOGY RAJIV GANDHI PROUDYOGIKI VISWAVIDYALAYA BHOPAL (M. P.) Presentation on “ Disk and Drum Scheduling Submitted By Shivesh Kumar Pandey 0101cs081054 CSE (5 th semester) Submitted To Mr. Manish Ahirwar Sir

Disk and drum Scheduling

Embed Size (px)

Citation preview

Page 1: Disk and drum Scheduling

UNIVERSITY INSTITUTE OF TECHNOLOGYRAJIV GANDHI PROUDYOGIKI VISWAVIDYALAYA

BHOPAL (M. P.)

Presentation on “ Disk and Drum Scheduling ”

Submitted ByShivesh Kumar

Pandey0101cs081054

CSE (5th semester)

Submitted To

Mr. Manish Ahirwar Sir

Page 2: Disk and drum Scheduling

Index1. Disk Scheduling2. Requirement of Disk Scheduling3. Disk scheduling Algorithms

I. First Come First Serve (FCFS)II. Shortest Seek Time First (SSTF)III. SCANIV. C-SCANV. LOOK VI. C-LOOKVII. n-step SCANVIII. FSCAN

4. RAID concept5. Reference

Page 3: Disk and drum Scheduling

Disk Scheduling

Disk scheduling is the problem of deciding which particular request for data by your computer from your storage medium should be serviced first.

It is a fundamental problem in operating system scheduling in terms of minimizing the waiting time for accessing data from the hard drive.

Page 4: Disk and drum Scheduling

Requirement of Disk SchedulingSeek time: the time for the disk arm to move the heads

to the cylinder containing the desired sector.Rotational latency: the additional time waiting for the

disk to rotate the desired sector to the disk head.Disk bandwidth: The total number of bytes transferred,

divided by the total time between the first request for service and the completion of the last transfer.

Three types of latency (i.e., delay):-Positional delay (= seek delay + rotational delay) or

seek delay – mechanical and slowest.Rotational delayTransfer delay

Page 5: Disk and drum Scheduling

Computing disk latency:Track size : 32K = 32,768 bytes.Rotation time : 16.67 msec.Average seek time : 30 msec.The average time to transfer k bytes :-

Page 6: Disk and drum Scheduling

Disk Scheduling Algorithms First Come First Serve (FCFS) Shortest Seek Time First (SSTF) SCAN C-SCAN LOOK C-LOOK n-step SCAN FSCAN

Page 7: Disk and drum Scheduling

First Come First Serve(FCFS)With this scheme,

requests are processed in the order that they arrive.

This is very easily implemented with a FIFO queue.

When the hard drive is ready to deliver information, it pulls the request from the start of the queue.

Page 8: Disk and drum Scheduling

Shortest Seek Time First (SSTF)Select the request with

the minimum seek time from the current head position.

SSTF is a form of Short Job First Scheduling.

May cause starvation of some requests.

Page 9: Disk and drum Scheduling

SCANThe disk arm starts at

one end of disk, and moves towards other end.

Servicing request until it gets to the other end of the disk, where the head movement is reversed and servicing continues.

Algorithm requires : the disk head movement direction, inward or outward.

Page 10: Disk and drum Scheduling

C-SCANThe head moves from

one end of the disk to other.

Servicing requests as it goes.

When it reaches to one end immediately returns to the beginning of the disk without servicing any request on the return trip.

Page 11: Disk and drum Scheduling

LOOKSpecialized version of

SCAN.Arm only goes as the

last request in each direction, then reverses direction immediately.

Going to the end of the disk is not compulsory as in the case of SCAN.

Page 12: Disk and drum Scheduling

C-LOOKSpecialized version

of C-SCAN.Arm only goes as the

last request in each direction, then reverses direction immediately.

Going to the end of the disk is not compulsory as in the case of C-SCAN.

Page 13: Disk and drum Scheduling

n-step SCAN

Segments the request queue to sub-queues with length of n, and service them according to SCAN.

So, we are more fair –not stuck only on one side of the disk if requests keep coming.

Page 14: Disk and drum Scheduling

FSCANContains two queues.

While treating a queue, incoming requests enter the other queue.

When all the requests in the queue are serviced ,switch to the other queue.

Treat each queue using SCAN.

Page 15: Disk and drum Scheduling

RAID

Redundant Array of Independent Disks (Inexpensive Disks).

A set of physical disk drives viewed by the Operating System as a single logical drive.

Data is distributed across the physical drives of the array.

Redundant disk capacity is used to store parity information, which guarantees data recoverability in case of disk failure.

Page 16: Disk and drum Scheduling
Page 17: Disk and drum Scheduling

Referencehttp://nixchun.pixnet.nethttp://www2.cs.uregina.cawww.wikipedia.comwww.google.co.in

Abraham Silberschatz, Greg Gagne, Peter Galvin, “Operating System Principles”, Wiley.

Page 18: Disk and drum Scheduling
Page 19: Disk and drum Scheduling