LIVE Course for free

Rated by 1 million+ students
Get app now
JEE MAIN 2024
JEE MAIN 2025 Foundation Course
NEET 2024 Crash Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
40 views
in Computer by (30.0k points)
closed by

Consider a linear list based 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?


1. Renaming of an existing file in foo
2. Opening of an existing file in foo
3. Deletion of an existing file from foo
4. Creation of a new file in foo

1 Answer

0 votes
by (41.6k points)
selected by
 
Best answer
Correct Answer - Option :

Answer: Option 1 and Option 4

Explanation:

Option 1: Renaming of an existing file in foo.

This Option is correct as for the Renaming operation of a file in a directory the New name must not create conflict to any of the existing file names. Hence a full scan is required for successful completion.

Option 2: Opening of an existing file in foo.

This option is not correct as Opening the file does not require a full scan.

Option 3:Deletion of an existing file from foo.

This Option is not Correct. as Deletion of a file does not require a full scan.

Option 4: Creation of a new file in foo.

This Option is correct as While Creating a new file we need to check whether the newly created file name must not create conflict to any of the existing file names. Hence a full scan is required for successful completion.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...