Operating System
106503Module 6: I/O & File Management
Q1c. SPOOLING stands for? (i) Spontaneous Peripheral Operation Online (ii) Small Peripheral Operation Online (iii) Simultaneous Peripheral Operation Online (iv) None of these20232m
Module 6: I/O & File Management
View this question on its own page →SPOOLING stands for?
(i) Spontaneous Peripheral Operation Online
(ii) Small Peripheral Operation Online
(iii) Simultaneous Peripheral Operation Online
(iv) None of theseWorked SolutionAnswer: (iii) Simultaneous Peripheral Operation Online
SPOOLING overlaps I/O of one job with computation of another by queuing device data to disk/drum as intermediary. Simultaneous Peripheral Operations OnLine — introduced to avoid CPU idle while slow peripherals complete.
Q1c. A variety of disk-organization techniques, collectively called RAIDs, are commonly used to address the performance and reliability issues. RAIDs stand for? (i) Reduced array of independent disks (ii) Redundant array of individual disks (iii) Reduced array of individual disks (iv) Redundant array of independent disks20242m
Module 6: I/O & File Management
View this question on its own page →A variety of disk-organization techniques, collectively called RAIDs, are commonly used to address the performance and reliability issues. RAIDs stand for?
(i) Reduced array of independent disks
(ii) Redundant array of individual disks
(iii) Reduced array of individual disks
(iv) Redundant array of independent disksWorked SolutionAnswer: (iv) Redundant Array of Independent Disks
RAID originally Redundant Array of Inexpensive Disks, now Independent. Techniques (RAID 0-6) combine multiple disks for performance (striping) and reliability (mirroring/parity). Options i-iii misword it.
Q1f. Which of the following is a potential result of bad blocks on a disk? (i) Faster access time (ii) Increased storage capacity (iii) Data loss or corruption (iv) Improved disk scheduling20242m
Module 6: I/O & File Management
View this question on its own page →Which of the following is a potential result of bad blocks on a disk?
(i) Faster access time
(ii) Increased storage capacity
(iii) Data loss or corruption
(iv) Improved disk schedulingWorked SolutionAnswer: (iii) Data loss or corruption
Bad blocks are physically damaged sectors. If used, data is unreadable; FS must mark them and relocate. Does not improve performance or capacity.
Q1g. Which free-space management technique uses a bitmap to indicate free and occupied blocks? (i) Bit Vector (ii) Indexing (iii) Grouping (iv) Linked List20252m
Module 6: I/O & File Management
View this question on its own page →Which free-space management technique uses a bitmap to indicate free and occupied blocks?
(i) Bit Vector
(ii) Indexing
(iii) Grouping
(iv) Linked ListWorked SolutionAnswer: (i) Bit Vector
Bit vector/bitmap: each bit represents a block, 1=free, 0=allocated (or vice versa). Allows fast lookup. Grouping, linked list, counting are other methods.
Q1h. ______ is the time required to move the disk-arm to the desired track. (i) Seek time (ii) Rotational Latency (iii) Access time (iv) Waiting time20222m
Module 6: I/O & File Management
View this question on its own page →______ is the time required to move the disk-arm to the desired track.
(i) Seek time
(ii) Rotational Latency
(iii) Access time
(iv) Waiting timeWorked SolutionAnswer: (i) Seek time
Disk access time = Seek time (arm movement) + Rotational latency (waiting for sector) + Transfer time. Seek is typically dominant (ms scale). Rotational latency avg = 0.5 / RPM.
Q1i. Which of the following is a valid free-space management technique in file systems? (i) Bit Vector (ii) File Mapping (iii) Page Swapping (iv) Disk Fragmentation20242m
Module 6: I/O & File Management
View this question on its own page →Which of the following is a valid free-space management technique in file systems?
(i) Bit Vector
(ii) File Mapping
(iii) Page Swapping
(iv) Disk FragmentationWorked SolutionAnswer: (i) Bit Vector
Valid free-space techniques: Bit vector, Linked list, Grouping, Counting. File Mapping/Page Swapping/Disk Fragmentation are not free-space management.
Q1j. Which disk scheduling algorithm services requests in the order they arrive? (i) SCAN (ii) SSTF (iii) FCFS (iv) C-SCAN20252m
Module 6: I/O & File Management
View this question on its own page →Which disk scheduling algorithm services requests in the order they arrive?
(i) SCAN
(ii) SSTF
(iii) FCFS
(iv) C-SCANWorked SolutionAnswer: (iii) FCFS
FCFS (First-come-first-serve) services in arrival order, simple but convoy effect. SCAN/SSTF reorder to minimize seek.
Q2a. Describe seek time, rotational latency, random-access time and their relationship in context of magnetic disks by drawing its moving – head mechanism.20227m
Module 6: I/O & File Management
View this question on its own page →Describe seek time, rotational latency, random-access time and their relationship in context of magnetic disks by drawing its moving – head mechanism.
Worked SolutionMagnetic Disk Timing
- Seek time: time for head assembly to move to correct track/cylinder (dominant, ~5-10ms). Depends on distance.
- Rotational latency: time for desired sector to rotate under head. Average = 0.5*(60/RPM). At 7200 RPM ≈4.17ms.
- Random-access time = Seek + Rotational latency (+ transfer time for actual R/W).
- Transfer time = bytes / (bytes per track * RPM)
Moving-head mechanism: Platter stack with arm assembly. Diagram description: multiple platters share spindle, each surface has head on arm, all heads move together radially. Arm moves seek, then platter rotates to sector. Random time = seek + rotation. Contiguous allocation reduces seeks.
Q2b. Suppose a disk has 100 cylinders, numbered from 0 to 99. At some time the disk arm is at cylinder 50, and there is a queue of disk access requests for cylinders 4, 34, 10, 7, 19, 73, 2, 15, 6 and 20. Assuming that shortest seek-time first (SSTF) is being used for scheduling the disk access. Calculate the total time taken to satisfy all requests if it takes 1 millisecond to move from one cylinder to adjacent one.20227m
Module 6: I/O & File Management
View this question on its own page →Suppose a disk has 100 cylinders, numbered from 0 to 99. At some time the disk arm is at cylinder 50, and there is a queue of disk access requests for cylinders 4, 34, 10, 7, 19, 73, 2, 15, 6 and 20. Assuming that shortest seek-time first (SSTF) is being used for scheduling the disk access. Calculate the total time taken to satisfy all requests if it takes 1 millisecond to move from one cylinder to adjacent one.
Worked SolutionSSTF calculation (arm at 50)
Requests: 4,34,10,7,19,73,2,15,6,20. Order by closest seek from current:
50→34(16),34→20(14)=30,20→19(1)=31,19→15(4)=35,15→10(5)=40,10→7(3)=43,7→6(1)=44,6→4(2)=46,4→2(2)=48,2→73(71)=119.
Total movement = 119 cylinders → 119ms (1ms per cylinder). FCFS would be larger (~ ~200). SSTF starves edge requests but minimizes seek; SCAN/C-SCAN would give different totals. Gantt/Sequence: 50-34-20-19-15-10-7-6-4-2-73.Q5a. Explain the structure of a file system. Discuss the role of directories, metadata, and file control blocks in file management.20257m
Module 6: I/O & File Management
View this question on its own page →Explain the structure of a file system. Discuss the role of directories, metadata, and file control blocks in file management.
Worked SolutionFile System Structure
Layers: logical FS, file-organization, basic FS, I/O control. Components: Boot block, Superblock, FCB/inode (metadata: name, size, permissions, blocks), Directory (maps name→FCB), Data blocks, Free space map.
Directories: single/two-level/tree/acyclic. FCB: holds metadata. Role: directory resolves path, FCB tracks per-file info.- Install PocketlyBudget App•POCKETLY
Pocketly on Android
Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.
Q5b. Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending request, in FIFO order is: 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130 Starting from the current head position, applying Shortest-seek-time-first (SSTF) algorithm find what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests.20257m
Module 6: I/O & File Management
View this question on its own page →Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending request, in FIFO order is:
86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130Starting from the current head position, applying Shortest-seek-time-first (SSTF) algorithm find what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests.
Worked SolutionSSTF 5000 cylinders head 143 requests 86,1470,913,1774,948,1509,1022,1750,130
Order: 143→130(13)=13,130→86(44)=57,86→913(827)=884,913→948(35)=919,948→1022(74)=993,1022→1470(448)=1441,1470→1509(39)=1480,1509→1750(241)=1721,1750→1774(24)=1745.
Total 1745 cylinders.Q8a. Differentiate between storage media with constant linear velocity (CLV) and constant angular velocity (CAV).20235m
Module 6: I/O & File Management
View this question on its own page →Differentiate between storage media with constant linear velocity (CLV) and constant angular velocity (CAV).
Worked SolutionCLV vs CAV
- CLV: linear speed constant, angular speed varies (inner faster), higher capacity outer, used CD/DVD. Density uniform.
- CAV: angular speed constant, linear speed varies outward, simpler, faster seek, used HDD. Outer tracks have more sectors with zone bit recording.
Q8b. Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 2150, and the previous request was at cylinder 1805. The queue of pending requests, in FIFO order, is: 2069; 1212; 2296; 2800; 544; 1618; 356; 1523; 4965; 3681. Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests for FCFS, SCAN and C-SCAN disk-scheduling algorithms? Draw the head movement diagram also.20239m
Module 6: I/O & File Management
View this question on its own page →Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 2150, and the previous request was at cylinder 1805. The queue of pending requests, in FIFO order, is:
2069; 1212; 2296; 2800; 544; 1618; 356; 1523; 4965; 3681.
Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests for FCFS, SCAN and C-SCAN disk-scheduling algorithms? Draw the head movement diagram also.Worked SolutionDisk 5000, head 2150 prev 1805 → moving outward. FCFS total = sum |2150-2069|+|2069-1212|... =81+857+1084+504+2256+1074+1262+1167+3442+1312 ≈ 13,039 cylinders. SCAN (outward to end): 2150→2296→2800→3681→4965→4999 then wrap to 2069→1618→1523→1212→544→356 ≈ ~~ 9,500. C-SCAN (circular to start): 2150→2296→2800→3681→4965→0→356→544→1212→1523→1618→2069 ≈ ~9,800. Exact depends on end handling.
Q9. Explain shortest-seek-time-first (SSTF) disk scheduling. Why SSTF scheduling tends to favour middle cylinders over the innermost and outer-most cylinders?201914m
Module 6: I/O & File Management
View this question on its own page →Explain shortest-seek-time-first (SSTF) disk scheduling.
Why SSTF scheduling tends to favour middle cylinders over the innermost and outer-most cylinders?
Worked SolutionSSTF Explanation & Middle Bias
SSTF picks nearest request, minimizing seek but not optimal. Middle cylinders favored because random requests distribution makes distance to middle average smallest, head lingers central, edge requests starve. Requires aging or SCAN to fix.
Q9a. Compare and contrast between linked and indexed disk allocation strategies.20247m
Module 6: I/O & File Management
View this question on its own page →Compare and contrast between linked and indexed disk allocation strategies.
Worked SolutionLinked vs Indexed Allocation
Linked: each block holds pointer to next, no external fragmentation, sequential access ok, random slow, pointer overhead, reliability if pointer lost.
Indexed: index block holds pointers to all blocks, supports direct access, overhead index block, size limited. Indexed better for large random files, linked simpler for sequential.Q9b. Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending request, in FIFO order, is: 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130 Starting from the current head position, applying Shortest-seek-time-first algorithm find what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests.20247m
Module 6: I/O & File Management
View this question on its own page →Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending request, in FIFO order, is:
86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130
Starting from the current head position, applying Shortest-seek-time-first algorithm find what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests.Worked SolutionSSTF total as Q115: 1745 cylinders (same request set 86,1470,913,1774,948,1509,1022,1750,130 from 143) → 1745.
Q9b. Write short notes on: I-Node20237m
Module 6: I/O & File Management
View this question on its own page →Write short notes on: I-Node
Worked SolutionI-Node
Index node per file holds metadata (type, permissions, owner, size, timestamps, block pointers) but not filename. Filename in directory maps to inode number. Unix inode has direct, indirect, double, triple indirect pointers. Enables hard links.
Q9d. Write a short note on: Boot-block and Bad blocks20257m
Module 6: I/O & File Management
View this question on its own page →Write a short note on:
Boot-block and Bad blocks
Worked SolutionBoot-block and Bad Blocks
- Boot-block: reserved block per disk containing bootstrap loader, executed at boot.
- Bad blocks: damaged sectors marked in bad block table, excluded from allocation, handled via sector sparing or skipping.