CS FundamentalsVery hardGATE CS
A 200-block file is stored with contiguous allocation and there is no free space after it, but enough before it. The file control block is in memory and the new block's data is in memory. How many disk I/O operations are needed to add one block at the END of the file, if the whole file must be moved to the free space just before it?
- A. 201
- B. 1
- C. 401
- D. 400
Correct answer: C. 401
Moving 200 blocks costs 200 reads + 200 writes, then 1 write for the new block: 401. (Adding at the end with free space after the file would need just 1 write.)
More Operating Systems questions
- Four identical 2 TB disks are combined. What usable capacity do RAID 0, RAID 1+0 (striped mirrors) and RAID 5 give, respectively?
- In a 5-disk RAID 5 array, a small write updates a single data block. Using the read-modify-write method, how many disk I/O operations does…
- Which RAID level can survive the failure of ANY two disks at the same time?
- A device transfers data at 2 MB/s using programmed I/O with an interrupt per byte; handling each interrupt takes 2 µs of CPU time. What…
- A disk has average seek 8 ms, average rotational latency 4 ms and a sustained transfer rate of 100 MB/s. What is the effective bandwidth…
- A journaling file system in ORDERED mode (like ext4's default) is used. Which statement about a crash is correct?