Operating System (2140702)

BE | Semester-4   Winter-2018 | 10-12-2018

Q5) (b)

What is I-node? Explain in brief.

I-nodes

  • A method for keeping track of which blocks belong to which file is to associate with each file a data structure called an i-node (index-node), which lists the attributes and disk addresses of the file’s blocks.
  • A simple example is given in below figure.
  • Given the i-node, it is then possible to find all the blocks of the file.
  • The big advantage of this scheme over linked files using an in-memory table is that i-node need only be in memory when the corresponding file is open.
  • If each i-node occupies n bytes and a maximum of k files may be open at once, the total memory occupied by the array holding the i-nodes for the open files is only kn bytes. Only this much space needs to be reserved in advance.
  • One problem with i-nodes is that if each one has room for a fixed number of disk addresses, what happens when a file grows beyond this limit?
  • One solution is to reserve the last disk address not for a data block, but instead for the address of a block containing more disk block addresses, as shown in below figure.
I-nodes