edited by
361 views
4 votes
4 votes
Given a disk with $200$ tracks, where track requests are received in the following order $55, 58, 39, 18, 90, 160, 150, 38, 184.$ The starting position for the arm is track $100.$ What is the number of tracks crossed when the elevator algorithm, starting in the direction UP, algorithm is used?
edited by

1 Answer

4 votes
4 votes
Track number starts from 0, to 199.

SCAN/Elevator algorithm goes in one direction, till end, services all the request on path.. then reverses the direction, and goes till the last pending request.

So, in this question, disk arm goes from track 100 to 199, then from 199 to 18, So, total 280 Head Movements.

Given a disk with $200$ tracks, where track requests are received in the following order etc.

$$\begin{array}{|c|c|}
\hline \textbf{ Elevator } & \textbf{# crossings } \\
\hline 100 & \\
\hline 150 & 50 \\
\hline 160 & 10 \\
\hline 184 & 24 \\ \hline 199 & 15 \\
\hline 90 & 109 \\
\hline 58 & 32 \\
\hline 55 & 3 \\
\hline 39 & 16 \\
\hline 38 & 1 \\
\hline 18 & 20 \\
\hline & \mathbf{2 5 0} \\
\hline
\end{array}$$
edited by
Answer: