CS FundamentalsVery hardGATE CS
A journaling file system in ORDERED mode (like ext4's default) is used. Which statement about a crash is correct?
- A. Both data and metadata are always written twice, so no data written before the crash is lost
- B. Nothing is journaled; fsck must scan the whole disk
- C. Only data blocks are journaled; directory structure may be corrupted
- D. Metadata is journaled and data blocks are written before the metadata commit, so after recovery files never point to garbage blocks
Correct answer: D. Metadata is journaled and data blocks are written before the metadata commit, so after recovery files never point to garbage blocks
Ordered mode journals only metadata but forces the file's data to disk before the metadata transaction commits. Recent writes may be lost, but metadata never references uninitialised blocks. Full data journaling writes data twice.
More Operating Systems questions
- A hard link and a symbolic (soft) link both point to file F. F is then deleted with rm F. What happens?
- Why can a hard link not normally point to a directory or to a file on a different file system?
- Path /usr/local/bin/tool is opened on a Unix file system where every directory fits in one block, no inode or block is cached except the…
- A disk has 16 surfaces, 512 cylinders and 64 sectors per track. Sectors are numbered starting at 0, fastest over sectors, then surfaces…
- A disk has 8 platters (both surfaces used), 20,000 tracks per surface, 400 sectors per track on average and 512-byte sectors. What is its…
- Which of the following events causes a process to move from RUNNING to READY (not to WAITING)?