CS FundamentalsVery hardGATE CS (PYQ pattern)
An ext3-style file system appends one data block to a file; the update also modifies the inode and the block bitmap. In ORDERED journaling mode only metadata goes through the journal (journal records: transaction-begin, inode, bitmap, transaction-end), and the data block is written to its final location before the journal commit. Counting all disk writes including the later checkpoint of the metadata to its final locations, how many block writes occur in total?
- A. 8
- B. 6
- C. 7
- D. 9
Correct answer: C. 7
Ordered mode: 1 data write + 4 journal writes (begin, inode, bitmap, end) + 2 checkpoint writes (inode, bitmap) = 7. Full data journaling would also journal the data and checkpoint it: 5 + 3 = 8.
More Operating Systems questions
- A RAID 0 array has 5 disks and a chunk size of 4 blocks (chunk k is on disk k mod 5, as the (k div 5)-th chunk on that disk). On which…
- An inode has 12 direct pointers, one single-, one double- and one triple-indirect pointer; blocks are 2048 bytes and pointers are 4 bytes…
- A parent creates a pipe, forks, and the child loops on read(fd[0], buf, 1) until it returns 0. The parent writes 3 bytes into fd[1] and…
- A system uses segmentation with paging (1024-byte pages). Segment table: seg 0: limit 3000, page frames [7, 2, 9]; seg 1: limit 1500…
- A process on a 4-level, 48-bit paging system (9 index bits per level, 4 KB pages, 4 KB page-table pages) maps three regions: 2 MB at…
- On a 4-level x86-64 style paging system (4 KB table pages, 512 eight-byte entries each, 2 MB pages are leaves at the third level), a…