Skip to main content

Chapter 06 · Watch, then practise

I/O Management and Disk Scheduling

Watch the related lecture, then read the question and answer below.

11 questions · 5 playlist videos. Matches are based on video titles; broader background matches are labeled.

Open the full chapter playlist ↗

Topic matches for the requested scheduling algorithms. The videos are tutorials, not verified solutions to this exact queue.

1. Disk-scheduling comparison — 2075 Baisakh

A disk has 150 cylinders, its head is currently at 35, and its previous position was 120. The request queue is 98, 103, 38, 122, 10, 128, 65, 75. Calculate total head movement for SSTF, SCAN, C-SCAN, LOOK, and FCFS.

Answer

The source gives a complete set of head-movement diagrams and distance calculations. The original question, positions, queue, arrows, equations, corrections, and reported totals are preserved below. Numerical results have not been independently corrected.

150-cylinder question and scheduling calculations

Scheduling calculations continued; 50-cylinder question

Topic matches for five scheduling methods. The chapter playlist has no separate C-LOOK lecture; these are not verified solutions to this exact queue.

2. Six disk-scheduling methods — 2074 Bhadra

A disk has 50 cylinders and its head is at 15. The request queue is 4, 40, 11, 35, 7, 14. Compare the six scheduling methods shown in the source.

Answer

The source reports total movements of FCFS 135, SSTF 47, SCAN 55, LOOK 47, C-SCAN 77, and C-LOOK 51 cylinders. The original service orders, head-movement plots, and calculations follow; the figures retain the direction assumptions made in the source.

Original 50-cylinder scheduling question and first diagrams

SSTF, SCAN, LOOK, C-SCAN, and C-LOOK working

No dedicated I/O-software structure video is listed in this chapter playlist.

3. Structure of I/O software — 2073 Bhadra

Explain the structure of I/O software with a suitable diagram. The source also compares the preceding SSTF and SCAN calculations.

Answer

The source divides I/O software and hardware into five levels:

  1. User-level I/O software: User-facing routines and libraries for I/O.
  2. Device-independent software: Common functions and a uniform interface across devices.
  3. Device drivers: Device-specific software connected to the operating system.
  4. Interrupt handlers: Routines responding to device interrupts.
  5. Hardware: The physical devices and controllers.

Using the preceding exercise, the source compares SSTF's 47-cylinder movement with SCAN's 55 and calls SSTF's throughput higher. This is the source's conclusion for the example, not a measured throughput benchmark.

Original I/O software structure, principles, and scheduling question

No dedicated I/O-software principles video is listed in this chapter playlist.

4. Principles of I/O software

Explain the principles of I/O software.

Answer

  • Device independence: Programs should use devices without relying on device-specific details.
  • Uniform naming: A name represented by a string or integer should not depend on a particular device.
  • Error handling: Handle errors as close to the hardware as possible.
  • Synchronous versus asynchronous transfer: Interrupt-driven operations may be presented to a program through a blocking interface.
  • Buffering: Listed in the source without a separate explanation.
  • Dedicated versus shared devices: Listed in the source without a separate explanation.

Topic matches for FCFS, SSTF, and SCAN. The videos are not verified solutions to this exact queue.

5. FCFS, SSTF, and SCAN — 2073 Magh

A disk has 200 cylinders and its head is at 53. The requests are 98, 183, 37, 122, 14, 124, 65, 67. Apply FCFS, SSTF, and SCAN.

Answer

The source reports FCFS 640, SSTF 236, and SCAN 236 cylinders. Original diagrams and working are retained below, including the source's SCAN path and labeling.

200-cylinder scheduling solution and next question

Topic matches for the scheduling algorithms used here. The videos are not verified solutions to this exact queue.

6. Scheduling a 5000-cylinder disk — 2072 Magh

A 5000-cylinder disk has its head at 143, with previous position 125. The request queue is 56, 1470, 913, 1774, 948, 1509, 1022, 1750, 130. Apply the scheduling methods in the source.

Answer

The original answer supplies FCFS, SCAN, LOOK, C-SCAN, and SSTF movement diagrams and calculations. Its handwritten corrections are preserved rather than replaced with newly typeset values.

5000-cylinder question and FCFS working

SCAN, LOOK, C-SCAN, and SSTF original calculations

Partial match: disk-scheduling algorithms. The playlist has no dedicated device-independent I/O lecture.

7. Scheduling and device-independent I/O — 2072 Ashwin

Explain disk scheduling and device-independent I/O software.

Answer

Disk scheduling determines the order in which pending disk requests are served. The source names FCFS, SSTF, and C-SCAN; worked examples appear above.

Device-independent I/O software provides a uniform interface to device drivers, device naming and protection, error reporting, device-independent block sizes, storage allocation, and allocation and release of dedicated devices.

Topic matches for FIFO/FCFS, SSTF, and SCAN. The videos are not verified solutions to this exact queue.

8. FIFO, SSTF, and SCAN — 2071 Bhadra

A 1000-cylinder disk last served cylinder 345 and is moving toward 0. Pending requests are 123, 874, 693, 475, 105, 376. Apply FIFO, SSTF, and SCAN.

Answer

The source reports FIFO 2013, SSTF 1298, and SCAN 1219 cylinders. Its original service orders and arithmetic are preserved:

Device-independent I/O and 1000-cylinder scheduling question

1000-cylinder solution, DMA figure, and final question

Related tutorials for the algorithms in the referenced question. The source supplies no separate problem statement.

9. Repeated question — 2071 Magh

Repeated disk-scheduling question — 2071 Magh.

Answer

The source supplies an arrow referring to 2073 Magh, without rewriting the question or solution. See Question 5.

No DMA video is listed in this chapter playlist.

10. Direct memory access

Explain DMA with a diagram.

Answer

Direct memory access transfers data between a device and main memory through a DMA controller, avoiding CPU involvement in each individual data transfer. The CPU issues a command, performs other work, receives an interrupt when the transfer is complete, and checks the status. The original CPU/controller interaction figure is preserved below.

Original DMA controller interaction diagram

No programmed-I/O, DMA, or device-independent I/O video is listed in this chapter playlist.

11. Programmed I/O and DMA — 2070 Bhadra

State disadvantages of programmed I/O. Explain DMA and device-independent I/O software.

Answer

Programmed I/O keeps the CPU occupied repeatedly checking device status, consuming time and reducing useful CPU work. DMA is explained in Question 10. For device-independent software, the handwritten answer refers to the 2072 Ashwin answer, reproduced as Question 7.