...
GATE 1987
January 27, 2024
Question 8028 – GATE 2016 [Set-1]
January 27, 2024
GATE 1987
January 27, 2024
Question 8028 – GATE 2016 [Set-1]
January 27, 2024

Operating-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?

A
Deletion of an existing file from foo
B
Opening of an existing file in foo
C
Creation of a new file in foo
D
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.

Leave a Reply

Your email address will not be published. Required fields are marked *