Unit 6 - Secondary Storage Structures
Unit 6 - Secondary Storage Structures
Disk Structure
Tracks are numbered starting with zero from top track to bottom
Sector start with zero ant iclock wise starting from reference position.
Magnetic Tape
Transfer time: time spent in actually moving data to from the disk
surface.
It is amount of information to be read, the number of bytes per track and
rotation speed.
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:
Selects the request with the minimum seek time from the
current head position.
SSTF scheduling is a form of SJF scheduling; may cause
starvation of some requests.
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
SCAN
The disk arm starts at one end of the disk, and moves toward the
other end, servicing requests until it gets to the other end of the
disk, where the head movement is reversed and servicing
continues.
A request arriving behind the head will have to wait until the arm
moves to the end of the disk, reverses direction and comes back.
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.
My cylinder are rising from 0 to n-1 and wise versa. Next will be 0
It will move in increasing order of cylinder number.
Head will go to extreme ends.
Move towards increasing direction of cylinder number
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