- To store data and instruction in the system for a long time are very important. Disk not only store huge data but also allow Random Access to the data stored in units is called disk block or pages.
OR
- Disk scheduling is a technique used by the operating systems to schedule multiple requests for accessing the disk.
Necessary
- In the multiprogramming environment many processes running simultaneously email requests for disk access. So disk scheduling of the request in the queues needed.
Disk scheduling is necessary to:-
- Maximize throughput.
- Minimize the average time that a request must wait.
- Minimize time to spend seeking records...
Disk scheduling algorithms
- First, come first service (FCFS) scheduling
- Shortest time first (SSTE) scheduling
- SCAN scheduling
- C-SCAN scheduling
- LOOK scheduling
1. First Come First Series (FCFS) scheduling
- This is the simplest form of disc scheduling.
- In first come first series scheduling the first request to arrive is the first one serviced.
- In first come first series scheduling 1A request has arrived its place in the schedule is fixed.
- This first comes first service that implements a fair policy.
- First, come first service does not always provide the best service.
EXAMPLE:-
Consider a queue
75, 195, 38, 150, 12, 115
The read/write head is on 50.
A disk contains 200 tracks.
It will first move 50 to 75, then to 195, 38, 150, 12, and finally to 115.
Total number of head movement:-
=>|50-75|+|75-195|+|195-38|+|38-150|+|150-12|+|12-115|
=>25+120+157+112+138+103
=>655
2. Shortest Seek Time First (SSTE) scheduling
- In the scheduling, approach priority is given to those request which needs the shortest seek time.
OR
- In this algorithm, we give importance to the request which has the shortest Seek time.
EXAMPLE:-
Consider a queue
75, 195, 38, 150, 12, 115
The read/write head is on 50.
A disk contains 200 tracks.
It will first move 50 to 38 then to 12, 75, 100, 115, 150, 195.
Total number of the head move meant:-
=>|150-38|+|38-12|+|12-75|+|75-115|+|115-150|+|150-195|
=>12+26+63+40+35+45
=> 221
3. SCAN scheduling
- Scan scheduling is just the same as SSTF (shortest seek time first) scheduling.
- but in this, if we start moving in direction then it changes their direction after reach at the final point of that direction.
- Firstly a direction of Sweep from the current bead position is chosen.
- Then all requests are response in short sick time first manner.
Consider a queue
75, 195, 38, 150, 12, 115
The read/write head is on 50.
A disk contains 200 tracks.
Total number of head movement:-
=>|50-38|+|38-12|+|12-0|+|0-75|+|75-115|+|115-150|+|150-195|
=>12+26+12+75+35+45+40
=> 245
4. C-SCAN scheduling
- C-SCAN scheduling is standing for circular scan scheduling.
- this algorithm is obtained by a small modification version of the SCAN disk scheduling algorithm.
- In this algorithm, we move accordingly the given direction given in the question.
Consider a queue
75, 195, 38, 150, 12, 115
The read/write head is on 50.
A disk contains 200 tracks.
But in c-scan scheduling. I start moving in one direction we have to go in 199 track and move from 199 track to 0 and then we start going on 12, 38.
=>|50-75|+|75-115|+|115-150|+|150-195|+|199-0|+|0-12|+|12-38|
=>25+40+35+45+4+199+12+26
=> 386
5. LOOK scheduling
- Look scheduling is a modified version of SCAN scheduling.
- The difference between SCAN and LOOK scheduling is that in case of SCAN head move to the outermost or innermost cylinder before it reverses the direction. But in case of LOOK ahead move in one direction until there is no more request is pending and then it reverses the direction.
Consider a queue
75, 195, 38, 150, 12, 115
The read/write head is on 50.
A disk contains 200 tracks.
Total number of movement:-
=>|50-75|+|75-115|+|115-150|+|150-195|+|195-38|+|38-12|
=>25+40+35+45+157+26
=> 328
Post a Comment
Post a Comment