FCFS disk scheduling - operating system tutorial


Before reading this post it is a humble request to you that please read my previous post on Disk Scheduling first.
Today we will be discussing about FCFS disk scheduling - operating system tutorial. We will discuss about FCFS, its advantages and disadvantages. So, let's start , shall we?

FCFS

It is the simplest disk scheduling algorithm. As the name suggests FCFS disk scheduling algorithms means that the read/write head will satisfy the request which has been called first. In order words, it means that the requests are satisfied in the order they have arrived(enter disk queue).

Now let us understand it with the help of an example:
                               98, 183, 41, 122, 14, 124, 65, 67
These numbers indicates the track-numbers on a disk. We have to arrange these requests on the basis of FCFS disk scheduling and calculate the seek moves. It is also given that read/write head is initially at 53. 

soln.

FCFS disk scheduling - operating system tutorial


The above diagram shows the execution of requests in FCFS manner.
1. Initially the read/write head was at 53 so we have started from 53.
2. The first request is of 98. So, we simply move from 53 to 98. Movements taken to move from 53 to 98 is 98-53=45.
3. The second request is of 183. So, we simply move from 98 to 183. Movements taken to move from 98 to 183 is 183-98=85.
4. The third request is of 41. So, we move from 183 to 41. Movements taken to move from 183 to 41 is 183-41=142
5. The fourth request is of  122. So, we move from 41 to 122. Movements taken to move from 122 to 41 is 122-41=81.
6. The fifth request is of 14. So,we move from 122 to 14. Movements taken to move from 122 to 14 is 122-14=108.
7. The sixth request is of 124. So, we move from 14 to 124. Movements taken to move from 14 to 124 is 124-14=110.
8. The seventh request is of 65. So, we move from 124 to 65. Movements taken to move from 124 to 65 is 124-65=59.
9. The eighth request is of 67. So, we move from 65 to 67. Movements taken to move from 65 to 67 is 67-65=2.
10. Now add all the movements 45+85+142+81+108+110+59+2=632 seek moves.

Advantages

1. It is easy to implement and understand.
2. In FCFS there is no starvation. It means that a request will be executed if it has made a request on the basis of its number in the queue.
3. FCFS can be used with less load. If the load on system is less, then this kind of disk scheduling algorithms can be used.

Disadvantages

1. It requires more seek time. This algorithm does not satisfy the requests which were closer to a particular request so that seek time would have been less.
2. It can lead to more waiting time and response time. If the movement of read/write head is slow then waiting time and response time will be more.
3. Inefficient because it wastes a lot of time.

Conclusion

It can be concluded that if you execute the requests near to a particular request then only the number of movements will reduce and time will be saved.




Post a Comment (0)
Previous Post Next Post