## Disk Scheduling

Edit
1. Seek Time- The time to move the disk head to the proper cylinder
2. Rotational delay ( latency ) -  The time for the sector containing the data to come under the ready / write head
3. Access Time = Seek Time + Rotational delay

Q  Calculate the total head movements ( Seek time ) for following track request :- 98, 183, 37, 122, 14, 124, 65, 67 where header starts at track No . 53 and we have total 4 method

1. First Come  First Served Scheduling ( FCFS )
2. Shortest Seek – time First ( SSTF ) scheduling
3. Scan scheduling
4. Circular Scan ( C- Scan ) Scheduling

a) FCFS method Starting track = 53 b) SSTE Scheduling - Starting track = 53 ( minimum length ) Track No.             Next Track accessed                       No. of track Traversed

1)                            65                                                           65 – 53 = 12

2)                            67                                                           67 – 65 = 02

3)                            37                                                           67 – 37 = 30

4)                            14                                                           37 – 14  = 23

5)                            98                                                           98 – 14  = 84

6)                            122                                                         122 – 98  = 24

7)                            124                                                         124 – 122 = 2

8)                            183                                                         183 – 124 = 59

Average head  movement / Average Seek Time                = Total Seek Time / Total Number of Tracks

= 236 / 8  =  29.5

c) Scan Method Elevator Method :- The arm starts at one end of the disk and move towards the other end of the disk serving each request present in between. When it reaches at other end the head direction is reversed

Starting track = 53 Track No.             Next track accessed                        No. of Track Traversed

1)                            65                                                           65 – 53  = 12

2)                            67                                                           67 – 65  = 02

3)                            98                                                           98 – 67  = 31

4)                            122                                                         122 – 98 = 24

5)                            124                                                         124 – 122 = 02

6)                            183                                                         183 – 124 = 59

7)                            37                                                           183 – 37 = 146

8)                            14                                                           37 – 14  = 23

Total = 299

Average head movement / Average Seek Time = 299 / 8 = 37.38

d)  C- Scan Method :- Circular scan deals with single direction if it comes at one end automatically it will travel to second end with maintaining same direction of traversal starting track = 53 Track No.             Next Track Accessed                      No. of Track Traversed

1)                            65                                                           65 – 53  = 12

2)                            67                                                           67 – 65  = 02

3)                            98                                                           98 – 67  = 31

4)                            122                                                         122 – 98  = 24

5)                            124                                                         124 – 122 = 02

6)                            183                                                         183 – 124 = 59

7)                            14                                                           183 – 14  = 169

8)                            37                                                           37 – 14   = 23

Total = 322

Average head  movement / Average Seek Time                = Total Seek Time / Total Number of Tracks

= 322 / 8  =  40.25

## References

Edit
• WikiNote Foundation