Skip to content

Root File

Root File

The Root File is stored in the disk and has an entry for each file present in the disk (A copy of the Root File is maintained in the memory when the OS is running). It consists of MAX_FILE_NUM entries. Thus eXpFS permits a maximum of MAX_FILE_NUM files. This version of eXpOS sets MAX_FILE_NUM = 60.

Each entry of root file is 8 words.

5 tuple entry

Pasted image 20251209180130.png

  • FILE NAME (1 word) - Name of the file
  • FILE SIZE (1 word) - Size of the file
  • FILE TYPE (1 word) - Specifies the type of the given file (ROOT indicated by 1 , DATA indicated by 2 or EXEC indicated by 3).
  • USER NAME (1 word) - Name of the owner of the file
  • PERMISSION (1 word) - Permission of the file; open-access (1) or exclusive (0)
  • Unused (3 words)

Unused entry is denoted by -1

Memory copy of the Root File is stored in 62 of memory

Present in the 5th block

Why both Root File and Inode Table

Inode table is a data structure which is accessible only in Kernel mode, whereas Root file is accessible both in Kernel and User mode. This enables the user to search for a file from an application program itself by reading the Root file.