In: Operations Management
Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is currently serving a request at cylinder 2,150, and the previous request was at cylinder 1,805. The queue of pending requests, in FIFO order, is:
2,069, 1,212, 2,296, 2,800, 544, 1,618, 356, 1,523, 4,965, 3681
Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests for each of the following disk-scheduling algorithms?
Disk-scheduling algorithms is an approach used by operating system to plan the input and output request for accessing the disk. The purpose of it is to reduce the total seek time.The time required to read or write the disc block determined by three factors:
As per the Given data, the number of cylinders are 5000 which is numbered from 0 to 4999.
The current head position of cylinder is 2150.
The previous request of the cylinder was 1805 (to determine the direction in which the line is moving)
Queue in FIFO order is 2069, 1212, 2296, 2800, 544, 1618, 356, 1,523, 4,965, 3681
Now, let us calculate the total distance in the cylinders by following disk-scheduling algorithms.
a) FCFS
It stands for First come First serve. It is just like FIFO queue data structure. The data which is added in the queue first will also leaves the queue first. This method is used in batch systems. This is a simple scheduling algorithm as it performs according to the request order.
FCFS = (2150-2069)+(2069-1212)+(1212-2296)+(2296-2800)+(2800-544)+(544-1618)+
(1618-356)+(356-1523)+(1523-4965)+(4965-3681)
FCFS=
=
b) SSTF
It stands for shortest seek time first. It selects the disk input and output request which requires minimum seek time from its current position of head.
SSTF=
=
=
c) SCAN
This is also known as Elevator algorithm. Its head goes from one end to another and then it takes reverse direction.
SCAN
=
=
=
d) LOOK
It is an improved version of SCAN. Head starts from the first request at one end of the disk and then it moves to the last request fulfilling all the requests in between. After reaching last request it takes reverse direction.
e) C-SCAN
Its stands for circular SCAN which means it starts from head from end of the disk and moves towards the other end servicing all the requests comes in between. It the takes a reverse direction. It then returns to starting point without servicing any request which comes in between.
f) C-LOOK
It is a modified version of the LOOK algorithm. It scans all the cylinders from lowest to highest place. But the only difference is that head moves in only one direction.
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image
We were unable to transcribe this image