117k views
0 votes
Using the following list of cylinder requests: 40, 12, 22, 66, 67, 33, 80, they are listed in the order in which they were received. List the order in which these requests are handled if the scan algorithm is used. Assume that the disk is positioned at cylinder 50, and the read/write heads are moving toward the highest cylinder number.

a) 66, 67, 80, 40, 33, 22, 12
b) 66, 67, 80, 40, 33, 22, 12
c) 40, 66, 67, 80, 33, 22, 12
d) 40, 66, 67, 80, 33, 22, 12

User NinjaBomb
by
8.7k points

1 Answer

6 votes

Final answer:

The scan algorithm, also known as the elevator algorithm, moves the read/write heads towards a single direction until it reaches the end, and then reverses direction. The order in which the cylinder requests are handled in this case is 66, 67, 80, 40, 33, 22, 12.

Step-by-step explanation:

The scan algorithm, also known as the elevator algorithm, is a disk scheduling algorithm that moves the read/write heads towards a single direction until it reaches the end, and then reverses direction and moves towards the other end. In this case, the disk is initially positioned at cylinder 50 and moving towards the highest cylinder number.

Given the list of cylinder requests: 40, 12, 22, 66, 67, 33, 80, the order in which these requests are handled using the scan algorithm is:
a) 66, 67, 80, 40, 33, 22, 12

User Tom J Nowell
by
8.5k points