213 views
4 4 votes

Consider a disk with $200$ tracks $(0-199)$. The current position of the R/W head is at track $50$. The queue of pending requests is: $82,170,43,140,24,16$. If the SSTF (Shortest Seek Time First) algorithm is used, what is the total number of track movements required to satisfy all requests?

2 Answers

1 1 vote

Initial head position$: 50.$ Queue$: 16, 24, 43, 82, 140, 170.$

SSTF moves to the nearest request:

  1. From $50$, the closest is $\mathbf{4 3}$ $($distance $7)$. Total$: 7$.
     
  2. From $43$, the closest is $\mathbf{2 4}$ $($distance $19)$. Total: $7+19=26$.
     
  3. From $24$, the closest is $\mathbf{1 6}$ $($distance $8)$. Total: $26+8=34$.
     
  4. From $16$, the closest remaining is $\mathbf{8 2}$ $($distance $66)$. Total: $34+66=100$.
     
  5. From $82$, the closest is $\mathbf{1 4 0}$ $($distance $58)$. Total: $\mathbf{1 0 0 + 5 8 = 1 5 8}$.
     
  6. From $140$, the closest is $\mathbf{1 7 0}$ $($distance 30). Total: $158+30=\mathbf{1 8 8}$.
Answer:
Position:
Show:

Related questions

4 4 votes
2 2 answers
239
239 views
GO Classes asked Feb 19
239 views
A system has $5$ identical resource instances shared by $N$ processes. Each process requires a maximum of $2$ resource instances to complete its execution. What is the Ma...
1 1 vote
1 1 answer
236
236 views
GO Classes asked Feb 19
236 views
A system uses $32$-bit virtual addresses and a page size of $4$ KB . If the system uses a Two-Level Paging scheme where the first-level page table (Outer Page Table) and ...
5 5 votes
2 2 answers
236
236 views
GO Classes asked Feb 19
236 views
Consider a system with three processes $P_1, P_2$, and $P_3$ with burst times 8,4 , and 2 units respectively. All processes arrive at time $t=0$. The system uses a Round ...
3 3 votes
1 1 answer
283
283 views
GO Classes asked Feb 19
283 views
Which of the following statements regarding Semaphores and Monitors is/are CORRECT?A binary semaphore can be used to achieve Mutual Exclusion. If a process performing a $...