Operating Systems · Unit 6 · 6 hrs
Device Management
Exam-focused notes for Device Management (Operating Systems, CSC264): what the TU syllabus asks and how it has actually been tested, with 11 solved past questions from this unit.
What this unit covers
- Classification of IO devices
- Controllers
- Memory Mapped IO
- DMA Operation
- Interrupts
- Goals of IO Software
- Handling IO(Programmed IO, Interrupt Driven IO, IO using DMA)
- IO Software Layers (Interrupt Handlers, Device Drivers)
- Disk Structure
- Disk Scheduling (FCFS, SSTF, SCAN, CSCAN, LOOK, CLOOK)
- Disk Formatting (Cylinder Skew, Interleaving, Error handling)
- RAID
Disk Scheduling
Find the seek time using SCAN, C-SCAN, Look and C-Look disk scheduling algorithms for processing the following request queue: 35, 70, 45, 15, 65, 20, 80, 90, 75, 130. Suppose the disk has tracks numbered from 0 to 150 and assume the disk arm to be at 30 and moving outward.[10]
- Request Queue: 35, 70, 45, 15, 65, 20, 80, 90, 75, 130 - Track range: 0 to 150 - Initial head position: 30 - Direction: Outward (toward higher tracks) Sorted requests: 15, 20, 35, 45, 65, 70, 75, 80, 90, 130 --- Head moves outward to 150, then reverses to...
Full solved answer →Suppose a disk has 201 cylinders, numbered from 0 to 200. At same time the disk arm is at cylinder 10, and there is a queue of disk access requests for cylinders 30, 85, 90, 100, 105, 110, 135, and 145. Find the total seek time for the disk scheduling algorithm FCFS and SSTF. Assume the head is moving inward. [5]
- Total cylinders: 201 (numbered 0 to 200) - Initial head position: cylinder 10 - Request queue (order of arrival): 30, 85, 90, 100, 105, 110, 135, 145 - Head moving inward (toward higher cylinder numbers) --- Requests served in arrival order: $$10 \to 30 \...
Full solved answer →Define shell and system call. Suppose a disk has 201 cylinders, numbered from 0 to 200. At same time the disk arm is at cylinder 95, and there is a queue of disk access requests for cylinders 82,170,43,140,24,16 and 190. Calculate the seek time for the disk scheduling algorithm FCFS,SSTF,SCAN and C-SCAN.[10]
A shell is a command interpreter that provides the interface between the user and the operating system kernel. It accepts user commands, interprets them, and hands them to the OS for execution. It also lets users run programs, manage files, and control proc...
Full solved answer →What is the main objective of disk scheduling algorithms? Why SSTF is not practically feasible? Assume that we have disk with 100 tracks and currently head is at track number 35. What will be the seek time for the algorithms SCAN and LOOK for processing IO requests queue: 52, 67, 21, 11, 43, 85, 18, 75, 92, 8?[10]
The primary objective of disk scheduling is to minimize the total seek time (the time the disk arm spends moving between tracks), because seek time dominates disk access latency and the disk is one of the slowest components of a system. Related objectives: ...
Full solved answer →Memory Mapped IO
Explain memory-mapped I/O. [5]
Memory-mapped I/O is a method of performing input/output operations in which each I/O device's control register is assigned a unique memory address, to which no actual RAM is assigned. In most systems, these assigned addresses are located at the top of the ...
Full solved answer →Interrupts
What are the advantages of using interrupt? Describe. [5]
"The hardware mechanism that enables a device to notify the CPU is called an interrupt. Interrupt forces CPU to stop what it is doing and start doing something else. Interrupts are signals sent to the CPU by external devices, normally I/O devices." --- In P...
Full solved answer →DMA Operation
Describe the working mechanism of DMA. [5]
DMA (Direct Memory Access) is a hardware mechanism that allows I/O devices to transfer data directly to or from main memory without involving the CPU for each byte of the transfer. This frees the CPU to perform other tasks during data transfer. --- - DMA Co...
Full solved answer →How DMA operation is performed? Consider a disk with 200 tracks and the queue has random requests from different processes in the order: 45, 48, 29, 17, 80, 150, 28 and 188. Find the seek time using FIFO, SSTF and SCAN. Assume the initial position of head as 100.[10]
- Total tracks: 200 (numbered 0 to 199) - Request queue (in order): 45, 48, 29, 17, 80, 150, 28, 188 - Initial head position: 100 --- Direct Memory Access (DMA) is an I/O technique in which a dedicated hardware controller transfers data directly between an ...
Full solved answer →Controllers
What is the task of disk controller? List some drawback of segmentation. [5]
--- A disk controller is a hardware component that acts as an interface between the CPU/memory and the physical disk drive. Its main tasks are: 1. Receiving Commands from CPU: The disk controller accepts read/write commands from the CPU or DMA controller an...
Full solved answer →Disk Formatting
Why the concept of disk interleaving is important? Explain with suitable example. [5]
--- Disk interleaving (also called sector interleaving) is a technique used to improve disk read/write performance by arranging the logical order of sectors on a disk track differently from their physical order. Instead of numbering sectors consecutively (0...
Full solved answer →Handling IO
When programmed IO is suitable than other IO handling techniques? Explain the process of IO handling using DMA. [5]
--- Programmed I/O is the simplest form of I/O where the CPU does all the work. It directly controls the I/O operation including sensing device status, sending read/write commands, and transferring data. Programmed I/O is suitable in the following situation...
Full solved answer →Make Unit 6 stick
Practice CSC264 with flashcards & quizzes