Question

Suppose that a disk drive has 6,000 cylinders, numbered 0 to 5999. The drive is currently...

Suppose that a disk drive has 6,000 cylinders, numbered 0 to 5999. The drive is currently serving a request at cylinder 3150, and the previous request was at cylinder 1805 (Hint: this indicates the reading head’s moving direction).

The queue of pending requests, in FIFO order, is:

3511, 2332, 2800, 3192, 658, 1296, 1918, 1356, 5936, 2527

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?
a. FCFS
b. SSTF

c. SCAN

d. LOOK

e. C-SCAN

f. C-LOOK

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hi,

These all are disk-scheduling algorithms which will be helpful to process the requests coming.

1.FCFS: It is a very basic algorithm namely "First Come First Serve. "

Here the current request is 3150 and the next requests are: 3511, 2332, 2800, 3192, 658, 1296, 1918, 1356, 5936, 2527.

If we apply FCFS then the order in which requests will be served is same as the order in which requests are coming. 3150-->3511 --> 2332 --> 2800 --> 3192 --> 658  --> 1296  --> 1918 --> 1356  --> 5936  --> 2527.

Here total distance is calculated by the absolute difference between in each request.

total distance= (3511-3150)+(3511-2332)+(2800-2332)+(3192-2800)+(3192-658)+(1296-658)+(1918-1296)+(1918-1356)+(5936-1356)+(5936-2527)

=14745(verify calculations once)

2. SSTF : Stands for Shortest Seek Time First, the algorithm works like as follows: it checks for shortest seek time near by current request.

Currently request is at

3150 so the closest to this request is 392, continue like this and we end up like : 3150 -- > 3192 --> 2800 --> 2527 --> 2332 --> 1918 --> 1356 --> 1296 --> 658 --> 3511 --> 5936

and total distance= 42 + 392 + 273 + 195 + 414 + 562 + 60 + 638 + 2853 + 2425 =7854

3. SCAN: In this alogrithm disk moves into one direction first till and processes the requests coming in the way till the end of the disk then reverse the direction.

Here the order would be like : 3150 --> 3192(Since the previous request is 1805 so moving in high direction) --> 3511 --> 5936 --> 6000(End) || reverse() || --> 2800 --> 2527 --> 2332 --> 1918 --> 1356 --> 1296 --> 658. Calculate the difference and add them as mentioned above, that would the total distance

4.  C-SCAN : This is Circular SCAN, the only difference to SCAN algorithm is the requests will not be processed while reversing the direction. It'll reach the end then the requests will be processed. Below is the order. Please calculate the difference and add.

3150 --> 3192(Since the previous request is 1805 so moving in high direction) --> 3511 --> 5936 --> 6000(End) || reverse() || then go to starting from 6000 -->0 then 0 --> 658 --> 1296-->1356--> 1918 --> 2332 --> 2527 --> 2800

5. LOOK is just similar to SCAN but the only difference is the disk will not go till the end rather stops at last request then reverse the direction: Below is the order:

3150 --> 3192(Since the previous request is 1805 so moving in high direction) --> 3511 --> 5936 --> (Don't go till end rather stops here and reverse the direction) --> 2800 --> 2527 --> 2332 --> 1918 --> 1356 --> 1296 --> 658

6. C-LOOK: same as C-SCAN but not go to the end of the disk rather stops ar farthest request.

3150 --> 3192(Since the previous request is 1805 so moving in high direction) --> 3511 --> 5936 --> |stops| reverse() || then go to farthest request(658) not till 0|| 658 --> 1296-->1356--> 1918 --> 2332 --> 2527 --> 2800. Please calculate the differences and add as mentioned.

I Hope it is clear.


Thanks.

Add a comment
Know the answer?
Add Answer to:
Suppose that a disk drive has 6,000 cylinders, numbered 0 to 5999. The drive is currently...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Suppose that a disk drive has 10,000 cylinders, numbered 0 to 10,000. The drive is currently...

    Suppose that a disk drive has 10,000 cylinders, numbered 0 to 10,000. The drive is currently serving a request at cylinder 7,423 and the previous request was at cylinder 8213. The queue of pending requests, in FIFO order, is: 9324, 6324, 7232, 1304, 5621, 105, 5382, 3241, 2425, 9891. 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?...

  • 1. Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is...

    1. 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,956 3,681 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...

  • Suppose that a disk drive has 1000 cylinders, numbered 0 to 999. The drive is currently...

    Suppose that a disk drive has 1000 cylinders, numbered 0 to 999. The drive is currently serving a request at cylinder 200, and the previous request was at cylinder 100. The queue of pending requests, in order, is 61, 270, 913, 774, 948, 422, 750, 509, 13 Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests using the SSTF disk-scheduling algorithm?

  • 8.) [12 pts.] Suppose that a disk drive is currently serving a request at cylinder 1010,...

    8.) [12 pts.] Suppose that a disk drive is currently serving a request at cylinder 1010, the previous red cylinder 1000. The queue of pending requests, in FIFO order, is: drive has 2,000 cylinders, numbered O to 1,999. The 1010, 1310, 1950, 800, 200, 750, 1000 Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisty all the pending requests for each of the following disk scheduling algorithms a.) FCFS...

  • Write a  program that implements the following disk-scheduling algorithms: a. FCFS b. SSTF c. SCAN d. C-SCAN Your program will service a disk with 5,000 cylinders numbered 0 to 4,999. The program will...

    Write a  program that implements the following disk-scheduling algorithms: a. FCFS b. SSTF c. SCAN d. C-SCAN Your program will service a disk with 5,000 cylinders numbered 0 to 4,999. The program will be passed the initial position of the disk head (as a parameter on the command line) and report the total amount of head movement and total number of change of direction required by each algorithm under each of the following cases: a)The program will generate a random...

  • I need a full solution to this question. ( Operating Systems ) First Image: Second Image:...

    I need a full solution to this question. ( Operating Systems ) First Image: Second Image: Third Image: Fourth Image: thank you. Suppose that a disk has 5000 cylinders, numbered 0 to 1999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 152. The queue of pending requests is as follows: 130, 1750 1022, 1509, 948, 1774, 913, 1470, 86 Starting from the current head position, what is total "seek time" for...

  • Suppose a disk system has 200 cylinders, numbered 0 to 199. Assume that the read /...

    Suppose a disk system has 200 cylinders, numbered 0 to 199. Assume that the read / write head is at cylinder 63. Determine the order of head movement for each algorithm to satisfy the following stream of requests received in the following order: Queue:   100, 175, 51, 133, 8, 140, 73, 77 Head: 63 Draw head movement for Shortest Seek Time First (SSTF) algorithm. [1]

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT