1. 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
2. Disk Scheduling
Over 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
3.
• 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:
4.
5. 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.
6. 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
7. 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.
EQUATION
Rotational Delay(r)
Transfer Time(T
8. 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 :
Average seek 4ms
Rotational delay 4 ms
Read 500 sectors 8 ms
16 ms
9. 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 ms
Rotational delay 4 ms
Read 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 ms
Rotational delay 4 ms
Read 500 sectors 8 ms
16 ms
10. 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.
RANDOM SCHEDULING
11. 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.
13. 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.
P
R
I
O
R
I
T
Y
14. 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
C-SCAN
15. 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