DiskScheduling Algorithms
DiskScheduling Algorithms
Spring 2015
Kanlue Zhang
1
CPP CS537
2
CPP CS537
(This I/O request is intercepted by the disk array controller, which checks its cache in order to satisfy the I/O
request. In case of a cache miss an I/O request is issued to the disk and the disk controller checks its cache to
satisfy the request. A disk access is initiated if we had misses at all levels.)
3
CPP CS537
Head
boom
Head Arm
cylinder Spindle
4
CPP CS537
sectors
read-write
head
Platter
track
5
CPP CS537
6
CPP CS537
7
CPP CS537
8
CPP CS537
9
CPP CS537
In operating systems, seek time is very important. Since all device requests are linked in queues,
the seek time is increased causing the system to slow down.
10
CPP CS537
11
CPP CS537
At-A-Glance
12
CPP CS537
13
CPP CS537
• |50-95|+|95-180|+|180-34|+|34-119|+|119-11|+|11-123|+|123-62|+|62-64|
• Total: 45+85+146+85+108+112+61+2 = 640
14
CPP CS537
15
CPP CS537
• The process would continue until all the process are taken care of.
• Total: 236
16
CPP CS537
• Direction is reversed
17
CPP CS537
• C-SCAN
• Restricts 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
• In case of repetitive requests to one track, we
will see “arm stickiness” in SSTF, SCAN, C-SCAN
19
CPP CS537
• C-LOOK
• This is just an enhanced version of C-SCAN.
• In this the scanning doesn't go past the last request
in the direction that it is moving.
• It too jumps to the other end but not all the way to
the end. Just to the furthest request.
21
CPP CS537
22
CPP CS537
Comparisons
23
CPP CS537
• Example: 55, 58, 39, 18, 90, 160, 150, 38, 184
24
CPP CS537
25
CPP CS537
26
CPP CS537
data disks 27
CPP CS537
• Mirrored Disks
• Data is written to two places
• On failure, just use surviving disk
• On read, choose fastest to read
• Write performance is same as single drive, read performance is 2x
better
• Replication redundancy is expensive
28
CPP CS537
29
RAID 5 (block-level distributed parity)
RAID 5 (block-level distributed parity)
RAID 5 (“Write Penalty”)
http://vmdamentals.com/?p=3200
RAID 6 (dual redundancy)
• Level 5 with an extra parity bit, which is generated with a different and
independent data check algorithm
34
CPP CS537
• Disk Organization
• Performance Parameters
• Disk Scheduling Algorithms
• RAID Motivation
35
CPP CS537
Kanlue Zhang
(05/19/2015)
36
37
CPP CS537
39
CPP CS537
41
Raid Level 2
• Bit-level striping with Hamming (ECC) codes for error correction
• All 7 disk arms are synchronized and move in unison
• Complicated controller
• Single access at a time
• Tolerates only one error
Parity disk
data disks
RAID 3
Parity disk
data disks
RAID 4 (block-level parity)