Discussion
Consider a disk queue with request for input/output to block on cylinders 98, 183, 37, 122, 14, 124, 65 and 67 in that order. Assume that the disk head is initially positioned at cylinder 53 and moving towards cylinder O. The total number of head movements using Shortest Seek Time First (SSTF) and SCAN algorithms are respectively :
Answer: D
The totals are 236 and 236 cylinders.
SSTF always serves the nearest pending request. From 53 the order is 65, 67, 37, 14, 98, 122, 124, 183:
12 + 2 + 30 + 23 + 84 + 24 + 2 + 59 = 236 cylinders.
SCAN moves towards cylinder 0 first, serving 37 and 14 on the way, reaches 0, then reverses and sweeps up to the last request, 183:
(53 - 0) + (183 - 0) = 53 + 183 = 236 cylinders.
640 is the first-come-first-served total for this queue, and 252 is not produced by either algorithm here, so the other options mix in the wrong figures.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development