Question: Question 2 : File System ( Max Mark: 1 5 / 1 0 0 ) A simple file system has the same structure as the

Question 2: File System (Max Mark: 15/100)
A simple file system has the same structure 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.
Task: Answer the questions in each of the following cases.
(1) Consider the state of the file system below:
inode bitmap 1000100110010001
inodes [d a:0 r:4][][][][f a:-1 r:1][][][d a:15 r:2]
[d a:22 r:2][][][f a:-1 r:3][][][][f a:-1 r:1]
data bitmap 100000000000000100000010
data [(.,0)(..,0)(m,7)(a,8)(g,11)][][][][][][][]
[][][][][][][][(.,7)(..,0)(m,15)(e,11)]
[][][][][][][(.,8)(..,0)(r,4)(w,11)][]
Question: List all the files and directories that are currently in this file system.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!