Top Banner
CHAPTER11: I/O MANAGEMENT AND DISK SCHEDULING SUBTOPIC: 11.5 DISK SHCHEDULING NAZIRAH BINTI MOHAMMED ANWAR B031210271 NUR HUDA ATHIRAH BINTI ABDUL LATIB B031210358 NUR ATIQAH BINTI ABD RASHID B031210185 LIM ZHEW SHENG B031210379 WONG POH LING B031210033 OPERATING SYSTEM
15

Operating system

Dec 13, 2014

Download

Technology

Huda Athirah

Group Project for Operating System
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Operating system

CHAPTER11: I/O MANAGEMENT AND DISK SCHEDULING

SUBTOPIC: 11.5 DISK SHCHEDULING

NAZIRAH BINTI MOHAMMED ANWAR B031210271 NUR HUDA ATHIRAH BINTI ABDUL LATIB B031210358NUR ATIQAH BINTI ABD RASHID B031210185LIM ZHEW SHENG B031210379WONG POH LING B031210033

OPERATING SYSTEM

Page 2: Operating system

Disk SchedulingOver the last 40 years, the increase in the

speed of processors and main memory has far outstripped that for disk access.

Disk are currently at least four orders of magnitude slower than main memory.

The performance of disk storage subsystem is of vital concern, much research has focus on improving that performance.

INTRODUCTION

Page 3: Operating system

Disk Performance Parameters

•The actual details of disk I/O operation depend on the computer system, the operation system, and the nature of the I/O channel and disk controller hardware.

•The figure below shows a general timing diagram of disk I/O transfer:

Page 4: Operating system
Page 5: Operating system

When the disk drive is operating, the disk is rotating at constant speed.

To read or write, the head must be positioned at the desired track and at the beginning of the desired sector of that track.

Track selection involves moving the head in a moveable-head system or electronically selecting one head on a fixed-system.

Page 6: Operating system

Seek Time

-Seek timeis for the disk arm to move the heads to the cylinder containing the desired sector.

-It is also measures the amount of time required for the read/write heads to move between tracks over the surface of the platters.

-It turns out that this is a difficult quantity to pin down. -Consists of two key components:

access arm is up to spend.

 

The time taken to traverse the

tracks that have to be

crossed once the

a) The initial

startup

time

Page 7: Operating system

Average Seek Time = sum of the time of all possible seek

all possible seek.

- The time waiting for the disk to rotate the desired sector to the disk head.

-Time taken to transfer the data.-The time it takes to transfer a block of bits,

typically a sector, under the read/write head.

Calculation of average seek time:EQUATIO

N

Rotational Delay(r)

Transfer Time(T

Page 8: Operating system

Two different I/O operations that illustrate the danger of relying on average values.

Consider a disk with an advertised average seek time of 4 ms, rotation speed of 7500 rpm, and 512-byte sectors with 500 sectors per track. Suppose that we wish to read a file consisting of 2500 sectors for a total of 1.28 Mbytes. (Estimate the total time for the transfer).

1) Assume that the file is stored as compactly as possible on the disk, (the file occupies all of the sectors on 5 adjacent tracks, 5 tracks x 500 sectors/track = 2500 sectors). Also known as sequential organization.

So, the time to read the first track is as follows :  

A TIMING COMPARISON

Average seek 4msRotational delay 4 msRead 500 sectors 8 ms

16 ms

Page 9: Operating system

Suppose that the remaining tracks can now be read with essentially no seek time. (I/O operation can keep up with the flow from the disk). Then, deal with rotational delay for each succeeding track.

Thus, each successive track is read in 4 + 8 = 12 rmms.To read the entire file :

Total time = 16 + (4 x 12) = 64 ms = 0.064 seconds 2) Calculate the time required to read the same data using

random access rather than sequential access, (accesses to the sectors are distributed randomly over the disk).

Average seek 4 msRotational delay 4 msRead 1 sectors 0.016 ms

8.016 ms For each sector we have :  Total time = 2500 x 8.016 = 20040 ms = 20.04 seconds

Average seek 4 msRotational delay 4 msRead 500 sectors 8 ms

16 ms

Page 10: Operating system

If the sector requests involve selection of tracks at random, then the performance of the disk I/O system will be as poor as possible. To improve matters, need to reduce average time spent on seeks.

is useful as a benchmark against which to

evaluate other techniques.

DISK SCHEDULING POLICIES

RANDOM SCHEDULING

Page 11: Operating system

The simplest form of scheduling, which processes items from the queue in sequential order.

The advantage of being fair, because every request is honored and the requests are honored in the order received.

Normally in FIFO disk accesses are in the same order as the request were originally received.

With FIFO, only a few processes that require access and if many of the request are to clustered file sector, then we can hope for good performance.

But, if many processes competing the disk, it may be profitable to consider a more sophisticated scheduling policy. 

  

FIRST IN FIRST OUT (FIFO)

Page 12: Operating system

FIFO

OVERALL

Page 13: Operating system

SHORTEST SERVICE TIME FIRST Is to select the disk I/O request that require the least movement

of the disk arm from its current position. Always choose to incur the minimum seek time. But still cannot make sure the average seek time will be

minimum too. However, this should provide better performance than FIFO. Arm move in two directions. Random tie-breaking algorithm maybe used to resolve cases of

equal distances.

System based on priority (PRI), the control of the scheduling is outside the control of disk management software.Often short batch jobs and interactive jobs are given higher priority than longer jobs that require longer computation. However, longer jobs may have to wait excessively long times.So that, this type of policy tends to be poor for Database Systems.

PRIORITY

Page 14: Operating system

a.k.a elevator algorithm because it operates like the elevator able to prevent starvation the arm move in one direction only satisfying request en route until there are no more requests available the service direction reversed, the scan proceed in opposite direction SCAN policy is biased against the area most recently traversed Thus, does not exploit locality as well as SSTF SCAN policy favours jobs whose request are for tracks nearest to

both innermost and outermost track Also, favours the latest-arriving jobs

a.k.a circular SCAN restrict scanning to one direction only when the last track has been visited in one direction, the arm is

returned to the opposite end of the disk and the scan begins again reduces delay experienced by new requests

SCAN Algorithm

C-SCAN

Page 15: Operating system

to avoid ‘arm stickiness’ where the arm does not move for a considerable amount period of time

happens due to a process repeatedly request for a track, thus monopolizing the entire device

in N-step-SCAN, the disk request queue is segmented into subqueue of length N

subqueues are processed one at a time, using SCAN new requests must be added to some other queue for FSCAN uses two subqueues all requests are in one queue while scan begins the second subqueue is empty all new request are put into the second subqueue thus, new requests will be proceed only when the old requests

are done 

N-step-SCAN & FSCAN