Machine-translated by Google. Questions are authored in English.
Top

Disk Scheduling Questions and Answers

1.

Consider the following disk request sequence for a disk with 100 tracks:

60, 45, 21, 67

Head pointer starting at 60 and moving in the left direction. Find the number of head movements in cylinders using FCFS scheduling.

Exam Year(s)

DSSSB TGT - 2023,

Answer: A

The head makes 85 movements under FCFS. FCFS serves the requests in the order given, so the head moves 60 to 60, then to 45, 21 and 67. \[ |60-60| + |45-60| + |21-45| + |67-21| \] \[ = 0 + 15 + 24 + 46 = 85 \] The starting direction of the head does not matter for FCFS, because it simply goes to each request in order. The figures 80, 90 and 193 do not come out of this sum. Total head movement is the sum of the distances between successive positions, so \[ 15 + 24 + 46 = 85 \] which agrees with the option.

Please log in or register to report this question.

2.

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 :

Exam Year(s)

MH SET - 2019, SET Exam - 2019,

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.

Please log in or register to report this question.

3.

Suppose a disk has 201 cylinders, numbered 0 to 200. At some time the disk arm is at cylinder 100, and there is a queue of disk access requests for cylinder 30, 85, 90, 100, 105, 110, 135 and 145. If shortest-seek time first (SSTF) is being used for scheduling the disk access the request for cylinder 90 is serviced after servicing ............ number of requests.

Exam Year(s)

MH SET - 2020, SET Exam - 2020,

Answer: C

Cylinder 90 is serviced after 3 requests.

SSTF always serves the pending request nearest the current head position. Starting at 100:

  1. 100 (distance 0)
  2. 105 (distance 5, nearer than 90 at 10)
  3. 110 (distance 5, nearer than 90 at 15)
  4. 90 (distance 20, nearer than 135 at 25)

So the requests for 100, 105 and 110 are served before 90. Counting 1 or 2 forgets that the request at cylinder 100 itself counts, or that 110 is nearer than 90 once the head is at 105.

Please log in or register to report this question.

4.

Consider a disk queue with I/O requests on the following cylinders in their arriving order 6, 10, 12, 54, 97, 73, 128, 15, 44, 110, 34, 45. The disk head is assumed to be at cylinder 23 and moving in the direction of decreasing number of cylinders. Total number of cylinders in the disk is 150. The disk head movement using SCAN-scheduling algorithm is :

Exam Year(s)

MH SET - 2021, SET Exam - 2021,

Answer: C

The total head movement is 151 cylinders.

Under SCAN the head moves in its current direction to the end of the disk, serving requests on the way, then reverses. Starting at 23 and moving towards 0, it serves 15, 12, 10 and 6, reaches cylinder 0, then turns and serves 34, 44, 45, 54, 73, 97, 110 and 128.

\[ \begin{aligned} \text{down} &= 23 - 0 = 23 \\ \text{up} &= 128 - 0 = 128 \\ \text{total} &= 23 + 128 = 151 \end{aligned} \]

LOOK, which turns at the last request (6) instead of the disk edge, would give 17 + 122 = 139. Larger totals such as 172 or 173 come from also running to the far end of the disk.

Please log in or register to report this question.

Loading…

Other Subjects

Tags: Disk Scheduling Questions and Answers || Disk Scheduling MCQ Questions and Answers || Disk Scheduling GK Questions and Answers || Disk Scheduling GK MCQ Questions || Disk Scheduling Multiple Choice Questions and Answers || Disk Scheduling GK || GK on Disk Scheduling || Operating Systems Questions and Answers || Operating Systems MCQ Questions and Answers || Operating Systems GK Questions and Answers || GK on Operating Systems