Question: Question 1 The inode (index node) is a data structure that describes a file-system object such as a file or a directory. Each inode stores

Question 1

The inode (index node) is a data structure that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block location(s) of the object's data.

(a) Describe the allocation of inode for files and directories.

(10 marks)

(b) The file system uses an inode array to organize the files on disk. Each inode consists of a user id [2 bytes], three time stamps [4 bytes each], protection bits [2 bytes], a reference count [2 byte], a file type [2 bytes] and the size [4 bytes]. Additionally, the inode contains 13 direct indexes, 1 index to a 1st-level index table, 1 index to a 2nd-level index table, and 1 index to a 3rd level index table. The file system also stores the first 436 bytes of each file in the inode.

i. Assume a disk sector is 512 bytes, and assume that any auxilliary index table takes up an entire sector, what is the maximum size for a file in this system.

(10 marks)

ii. Is there any benefit for including the first 436 bytes of the file in the inode?

(5 marks)

[25 Mark]

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 Databases Questions!