Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Introduction: This lab assignment requires you to answer questions related to various types of corruptions that may occur in a simple file system. The
Introduction: This lab assignment requires you to answer questions related to various types of corruptions that may occur in a simple file system. The simple file system is the same as the one in Task 10.2. First, there is an inode bitmap, which marks whether each corresponding inode is allocated (1) or free (0). There are 16 inodes. Each allocated inode has contents consisting of three fields. The first field is either f (file) or d (directory). The second field a either points to a single data block or is -1 which indicates that the files is empty. Note that in this limited file system, each file or directory can only occupy a single data block. The third field is a reference count for files. For directories, it indicates the number of directories within this directory. Answer the following questions: Question 1: The state of the file system is shown below: inode bitmap inodes 1000110001100000 [d a:0 r: 4] [] [] [] [fa:8 r:2] [d a:11 r:2] [] [] [] [d a:5 r:2] [d a:4 r:3] [] [] [] [d a:-1 r:1] [] data bitmap 1000110010010000 data [(., 0) (.., 0) (g, 10) (w,5) (1,4)] [] [] [] [(,10) (,0) (z,9) (c, 4)] [(., 9) (.., 10) ] [] [] [f] [] [] [(.,5) (,0)] [] [] [] [] (a) Is there any inconsistency in this filesystem? If so, what is the inconsistency? (b) What could be done to repair this filesystem so that it is consistent again? Question 2: The state of the filesystem is now found to be: inode bitmap 1000110001100000 inodes data bitmap data [d a:0 r: 4] [][] [] [fa: 8 r:2] [d a:11 r:2] [] [] [] [da:5 r:2] [d a:4 r:3] [] [f a: -1 r:1] [] [] [] 1000110010010000 [(., 0) (.., 0) [(., 10) (.., 0) [] [] [] [(.,5) (g, 10) (z, 9) (w,5) (1,4)] [] [] [] (c, 4) ] [(.,9) (..,10)] [] [] (0)] [] [] [] [] (a) What is the inconsistency in this case? (b) What is the difference between this case and the one in Question 1? What could be done to repair this filesystem so that it is consistent again? Question 3: The state of the filesystem is as below: inode bitmap 1000110001100000 inodes data bitmap data [f a:0 r: 4] [] [] [] [f a: 8 r:2] [d a:11 r:2] [] [] [] [da:5 r:2] [da:4 r:3] [] [] [] [] [] 1000110010010000 [(,0) (.., 0) (g, 10) (w,5) (1,4)] [] [] [] [(., 10) (,0) (z, 9) (c, 4) ] [,9) (..,10) ] [] [] [] [] [] [(.,5) (..,0)] [] [] [] [] (a) What could have happened that caused the filesystem to result in this state? (b) Could this filesystem be repaired without data loss? Why? (c) If not, how much data are lost? Question 4: The state of the filesystem is as below: inode bitmap 1000110001100000 inodes [d a:0 r: 4] [] [] [] [fa:8 r:2] [d a:11 r:2] [] [] [] [da: 5 r:2] [d a:4 r:3] [] [] [] [] [] data bitmap 1000110010010000 data [(,0) (..,0) (g, 10) (w,5) (1,4)] [] [] [] [(., 10) (,0) (z,9) (c, 4)] [(9) (..,10)] [] [] [] [] [] [(.,5) (..,3)] [] [] [] [] (a) Is there sufficient redundancy in the file system structure that enables a repair? (b) If so, what is it and how could the filesystem be repaired?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started