I/O & Disk Scheduling

Answer & solution
Official answer: 10
Our answer: Official10 uses LOOK; true SCAN difference is−10 with endpoint 100
SSTF repeatedly chooses the nearest pending track, producing total 130. In an upward sweep followed by reversal at the highest request, travel is 50→90→10, or 120; this is LOOK and yields the published +10. SCAN conventionally visits the physical end before reversing. Ending the accounting at the last served request 10 gives 140 if the upper end is 100, or 138 if tracks are 0–99. Therefore literal SSTF−SCAN is −10 or−8 under those conventions. The source's positive answer remains recorded but must not be presented as an unqualified SCAN derivation.
Solution: SSTF services 50, 45, 60, 70, 80, 90, 25, 20, 10, with movements 0+5+15+10+10+10+65+5+10=130. Reversing at the last pending upper request 90 gives(90−50)+(90−10)=120, so SSTF exceeds that LOOK distance by 10, the published answer. True SCAN continues to the disk endpoint before reversing: using endpoint 100 gives(100−50)+(100−10)=140 and SSTF−SCAN=−10. If100 tracks means 0..99, SCAN gives 138 and the difference is−8. The stated SCAN name/endpoints do not support the published positive 10 without a LOOK-style convention.