💿 Disk Scheduling & I/O
Why it matters: Disk access time and head-movement questions (FCFS, SSTF, SCAN, C-SCAN) are quick marks if the definitions are clear.
Subtopics
Each subtopic has its own page: idea, why, how, example, play, check. Mark each one understood when it clicks. 0 of 4 done.
1Disk structure and access time
2Disk scheduling algorithms
3I/O transfer: polling, interrupts and DMA
4Buffering, spooling, device drivers and RAID
Formulas
Disk access time
T = seek + rotational latency + transfer
Average rotational latency
½ × (60 / RPM) seconds = 30 / RPM s
Transfer time
bytes ÷ transfer rate, or (bytes / track size) × rotation time
Total head movement
Σ |cᵢ − cᵢ₋₁| over the service order
RAID capacity (n disks)
RAID 0: n; RAID 1: n/2; RAID 5: n − 1
DMA cycle stealing
fraction of time = DMA transfer time ÷ total time
What GATE asks from this
Question types seen repeatedly in past papers. More stars means more frequent.
★★★
Total head movement for a request queue
Write the service order and add up the cylinder differences; for SCAN include the trip to the end.
★★★
Disk access time for a block or file
Add seek, half-rotation latency and transfer; use the stated RPM and sector size.
★★★
Compare polling, interrupts and DMA
CPU overhead, bus use and when each is appropriate.
★★★
Which scheduler starves requests
SSTF (and SCAN variants less so); C-SCAN gives uniform waiting.
Ratings are approximate, based on recurring patterns in past GATE CSE papers.
Previous year questions
12 real questions from the official GATE CSE papers (2013 to 2024), newest first, each with the official answer key and a worked solution. Questions are the property of the GATE organising institutes; this copy is for your personal study.
12 questions · 0 correct of 0 attempted · marks 0 / 19
Year:
GATE 2024 CS2 · Q11MCQ1 mark
Consider a computer with a 4 MHz processor. Its DMA controller can transfer 8 bytes in 1 cycle from a device to main memory through cycle stealing at regular intervals. Which one of the following is the data transfer rate (in bits per second) of the DMA controller if 1% of the processor cycles are used for DMA?
GATE 2024 CS1 · Q15MCQ1 mark
Which one of the following statements is FALSE?
GATE 2024 CS2 · Q53NAT2 marks
Consider a disk with the following specifications: rotation speed of 6000 RPM, average seek time of 5 milliseconds, 500 sectors/track, 512-byte sectors. A file has content stored in 3000 sectors located randomly on the disk. Assuming average rotational latency, the total time (in seconds, rounded off to 2 decimal places) to read the entire file from the disk is ______.
GATE 2024 CS1 · Q54NAT2 marks
Consider a 512 GB hard disk with 32 storage surfaces. There are 4096 sectors per track and each sector holds 1024 bytes of data. The number of cylinders in the hard disk is ______.
GATE 2023 · Q34NAT1 mark
A keyboard connected to a computer is used at a rate of 1 keystroke per second. The computer system polls the keyboard every 10 ms (milli seconds) to check for a keystroke and consumes 100 μs (micro seconds) for each poll. If it is determined after polling that a key has been pressed, the system consumes an additional 200 μs to process the keystroke. Let T1 denote the fraction of a second spent in polling and processing a keystroke. In an alternative implementation, the system uses interrupts instead of polling. An interrupt is raised for every keystroke. It takes a total of 1 ms for servicing an interrupt and processing a keystroke. Let T2 denote the fraction of a second spent in servicing the interrupt and processing a keystroke. The ratio T1 / T2 is ______. (Rounded off to one decimal place)
GATE 2022 · Q17MCQ1 mark
Which one of the following facilitates transfer of bulk data from hard disk to main memory with the highest throughput?
GATE 2020 · Q35MCQ2 marks
Consider the following five disk access requests of the form (request id, cylinder number) that are present in the disk scheduler queue at a given time. (P, 155), (Q, 85), (R, 110), (S, 30), (T, 115). Assume the head is positioned at cylinder 100. The scheduler follows Shortest Seek Time First scheduling to service the requests. Which one of the following statements is FALSE?
GATE 2018 · Q53NAT2 marks
Consider a storage disk with 4 platters (numbered as 0, 1, 2 and 3), 200 cylinders (numbered as 0, 1, ..., 199), and 256 sectors per track (numbered as 0, 1, ..., 255). The following 6 disk requests of the form [sector number, cylinder number, platter number] are received by the disk controller at the same time: [120, 72, 2], [180, 134, 1], [60, 20, 0], [212, 86, 3], [56, 116, 2], [118, 16, 1]. Currently the head is positioned at sector number 100 of cylinder 80, and is moving towards higher cylinder numbers. The average power dissipation in moving the head over 100 cylinders is 20 milliwatts and for reversing the direction of the head movement once is 15 milliwatts. Power dissipation associated with rotational latency and switching of head between different platters is negligible. The total power consumption in milliwatts to satisfy all of the above disk requests using the Shortest Seek Time First disk scheduling algorithm is ______.
GATE 2016 Set 1 · Q31NAT2 marks
The size of the data count register of a DMA controller is 16 bits. The processor needs to transfer a file of 29,154 kilobytes from disk to main memory. The memory is byte addressable. The minimum number of times the DMA controller needs to get the control of the system bus from the processor to transfer the file from the disk to main memory is ______.
GATE 2016 Set 1 · Q48NAT2 marks
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 ______.
GATE 2014 Set 1 · Q19NAT1 mark
Suppose a disk has 201 cylinders, numbered from 0 to 200. At some time the disk arm is at cylinder 100, and there is a queue of disk access requests for cylinders 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.
GATE 2013 Code A · Q29MCQ2 marks
Consider a hard disk with 16 recording surfaces (0-15) having 16384 cylinders (0-16383) and each cylinder contains 64 sectors (0-63). Data storage capacity in each sector is 512 bytes. Data are organized cylinder-wise and the addressing format is <cylinder no., surface no., sector no.>. A file of size 42797 KB is stored in the disk and the starting disk location of the file is <1200, 9, 40>. What is the cylinder number of the last sector of the file, if it is stored in a contiguous manner?
Common traps
SCAN goes to the physical end of the disk; LOOK stops at the last request.
Average rotational latency is half a rotation, not a full one.
Check units: transfer rate in MB/s against sizes in KB, and RPM against seconds.
DMA still uses the memory bus: it steals cycles from the CPU even though it does not interrupt per word.