261 views
1 1 vote

A hard disk has $200$ tracks $($numbered $0$ to $199)$. The disk head is initially located at track $53$. The disk queue contains read/write requests for the following tracks in the order they arrived:
$$
98,183,37,122,14,124,65,67
$$
If the Shortest Seek Time First (SSTF) disk scheduling algorithm is used, what is the total number of head movements required to satisfy all requests?

1 Answer

0 0 votes

Movements:

  1. $53 \rightarrow 65$ $($Distance: $|65-53|=12)$
     
  2. $65 \rightarrow 67$ $($Distance: $|67-65|=2)$
     
  3. $67 \rightarrow 37$ $($Distance: $|37-67|=30) -$ Note$: 37$ is closer to $67$ than $98$ is $($diff $31)$.
     
  4. $37 \rightarrow 14$ $($Distance: $|14-37|=23)$
     
  5. $14 \rightarrow 98$ $($Distance: $|98-14|=84)$
     
  6. $98 \rightarrow 122$ $($Distance: $|122-98|=24)$
     
  7. $122 \rightarrow 124$ $($Distance: $|124-122|=2)$
     
  8. $124 \rightarrow 183$ $($Distance: $|183-124|=59)$
     

Total Head Movements: $12+2+30+23+84+24+2+59=\mathbf{2 3 6}$ tracks.

Answer:
Position:
Show:

Related questions

1 1 vote
1 1 answer
322
322 views
GO Classes asked Jan 17
322 views
Consider a system with three processes, $\mathbf{P 1}, \mathbf{P 2}$, and $\mathbf{P 3}$, arriving at time $t=0$. Their burst times are $4 \mathrm{~ms}, 6 \mathrm{~ms}$, ...
2 2 votes
2 2 answers
300
300 views
GO Classes asked Jan 17
300 views
Two processes, $\mathbf{P1}$ and $\mathbf{P2}$, share two binary semaphores (mutexes) $\mathbf{S}$ and $\mathbf{Q}$, both initialized to $\mathbf{1}$. The code for the pr...
2 2 votes
1 1 answer
269
269 views
GO Classes asked Jan 17
269 views
A Unix-like file system uses $\mathbf{2}$ KB disk blocks and $\mathbf{4{$-byte block pointers. Each Inode contains:$12$ Direct pointers $1$ Single Indirect pointer $1$ Do...
2 2 votes
3 3 answers
374
374 views
GO Classes asked Jan 17
374 views
A computer system uses a $2$-level paging scheme for virtual memory management. The system has the following timing parameters:TLB access time: $\mathrm{20 ~ns}$ Main Mem...