Secondary Storage Structures
Secondary Storage Structures
Disk Structure
OS takes I/O requests from queue and process them one by one. Algo. used to select
which I/O request is going to be selected first is called Disk Scheduling
Algorithm
Objective:
Example: A disk size of 200 tracks receives the requests for the blocks for
I/O operation. No. of blocks requested on disk are:
5) 53-98=45
8) 53-183=130
3) 53-37=16
6)53-122=69
4)53-14=39
7) 53-124=71
1)53-65=12
2)53-67=14
Advantage
Throughput is better than FCFS
If a request arrive in a queue just in front of the
head, it will be serviced immediately.
Disadvantage:
The disk arm always starts from the beginning, no
matter other number of requests are present on
the other end of disk.
C-Scan
It is an enhancement of SCAN algorithm.
Head moves from one end of disk to the other servicing the
request along the way.
When the disk arm reaches the end it quickly returns to the
other end without fulfilling any request in the way
It restricts servicing request from one direction only.
It will move in increasing order of cylinder number.
Head will go to extreme ends.
Move towards increasing the direction of cylinder
number requests
C-Scan Example
Request sequence = {176, 79, 34, 60, 92, 11, 41, 114}
Initial head position = 50
Direction = right (given: We are moving from left to right)
C-Scan
Same as SCAN
Arm Does not go to end.
Will not go beyond max(1.e 183) and beyond min(i.e. 14)
Arm only goes as far as the final request in each direction,
Then it reverses direction immediately, without first going all the
way to the end of the disk.
LOOK