Consider a linear list based directory implementation in a file system. Each directory is a list of nodes, where each node contains the file name along with the file metadata, such as the list of pointers to the data blocks. Consider a given directory foo. Which of the following operations will necessarily require a full scan of foo for successful completion?
Correct answer: (A) Creation of a new file in foo; (C) Renaming of an existing file in foo
Explanation
Creation must check the whole list for a duplicate name. Renaming must check that the new name is unused. Deletion and opening can stop once the file is found.
More File Systems and Disk Performance questions
GATE 2020 CS Q45– Consider the following five disk access requests of the form (request id, cylinder number)…
GATE 2019 CS Q52– The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and…
GATE 2015 CS (CS1) Q54– Consider a disk pack with a seek time of 4 milliseconds and rotational speed of 10000…
GATE 2015 CS (CS1) Q56– Suppose the following disk request sequence (track numbers) for a disk with 100 tracks is…
GATE 2016 CS (CS1) Q58– Consider a disk queue with requests for I/O to blocks on cylinders 47, 38, 121, 191, 87,…
GATE 2014 CS (CS1) Q29– A disk has cylinders 0–200. The arm is at 100 with queued requests…