GateAI
CPU and I/O Scheduling

GATE CSE 2016 Set 1 · Q48

NAT2 marksMedium

Time

Consider a disk queue with requests for I/O to blocks on cylinders 47, 38, 121, 191, 87, 11, 92, 10. The C-LOOK scheduling algorithm is used. The head is initially at cylinder number 63, moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from 0 to 199. The total head movement (in number of cylinders) incurred while servicing these requests is ________.

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 346

CPU and I/O Scheduling

Given requests: 47,38,121,191,87,11,92,1047, 38, 121, 191, 87, 11, 92, 10. Sorted requests: 10,11,38,47,87,92,121,19110, 11, 38, 47, 87, 92, 121, 191.

Initial head position: 6363, moving towards larger cylinder numbers.

Under C-LOOK:

  1. The head services requests greater than 6363 in ascending order up to the maximum requested cylinder:

    63→87→92→121→19163 \to 87 \to 92 \to 121 \to 191

    Movement =191−63=128= 191 - 63 = 128

  2. The head then jumps directly to the lowest requested cylinder without servicing any intermediate cylinders:

    191→10191 \to 10

    Movement =191−10=181= 191 - 10 = 181

  3. The head continues moving towards larger cylinder numbers to service the remaining requests:

    10→11→38→4710 \to 11 \to 38 \to 47

    Movement =47−10=37= 47 - 10 = 37

Total head movement:

Total movement=128+181+37=346\text{Total movement} = 128 + 181 + 37 = 346

Thus, the total head movement is 346 cylinders.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This CPU and I/O Scheduling previous year question is Q48 of the GATE CSE 2016 Set 1 paper. Find more GATE CSE PYQs on CPU and I/O Scheduling in Operating Systems, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related CPU and I/O Scheduling PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

CPU and I/O Scheduling in GATE CSE

CPU and I/O Scheduling has 25 GATE CSE PYQs across 22 papers from 2011 to 2026. 10 of them are 2-mark NAT questions like this one, and GATE CSE 2016 Set 1 has 2.

How GATE tests CPU and I/O Scheduling

More from GATE CSE 2016 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2016 Set 1 · Q48 · NAT

Consider a disk queue with requests for I/O to blocks on cylinders 47, 38, 121, 191, 87, 11, 92, 10. The C-LOOK scheduling algorithm is used. The head is initially at cylinder number 63, moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from 0 to 199. The total head movement (in number of cylinders) incurred while servicing these requests is …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.