GATE 1987
January 27, 2024Question 8028 – GATE 2016 [Set-1]
January 27, 2024Operating-Systems
Question 1 |
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?
Deletion of an existing file from foo | |
Opening of an existing file in foo | |
Creation of a new file in foo | |
Renaming of an existing file in foo |
Question 1 Explanation:
Renaming and creating a new file requires us to search the complete inode for duplicate names (to check if the same name already exists). There is no such problem in deleting and opening a file, as duplicate names are not possible while they are created.
Correct Answer: D
Question 1 Explanation:
Renaming and creating a new file requires us to search the complete inode for duplicate names (to check if the same name already exists). There is no such problem in deleting and opening a file, as duplicate names are not possible while they are created.