allocation structures are thus a requisite element in any file system Many

Allocation structures are thus a requisite element in

This preview shows page 3 - 6 out of 17 pages.

allocation structures are thus a requisite element in any file system. Many allocation-tracking methods are possible, of course. For exam- ple, we could use a free list that points to the first free block, which then points to the next free block, and so forth. We instead choose a simple and popular structure known as a bitmap , one for the data region (the data bitmap ), and one for the inode table (the inode bitmap ). A bitmap is a c circlecopyrt 2014, A RPACI -D USSEAU T HREE E ASY P IECES
Image of page 3
4 F ILE S YSTEM I MPLEMENTATION simple structure: each bit is used to indicate whether the corresponding object/block is free (0) or in-use (1). And thus our new on-disk layout, with an inode bitmap (i) and a data bitmap (d): 0 i d I I I I I 7 D 8 D D D D D D D 15 D 16 D D D D D D D 23 D 24 D D D D D D D 31 D 32 D D D D D D D 39 D 40 D D D D D D D 47 D 48 D D D D D D D 55 D 56 D D D D D D D Data Region Data Region Inodes S 0 i d I I I I I 7 D 8 D D D D D D D 15 D 16 D D D D D D D 23 D 24 D D D D D D D 31 D 32 D D D D D D D 39 D 40 D D D D D D D 47 D 48 D D D D D D D 55 D 56 D D D D D D D 63 Data Region Data Region Inodes Thus, when mounting a file system, the operating system will read the superblock first, to initialize various parameters, and then attach the volume to the file-system tree. When files within the volume are accessed, the system will thus know exactly where to look for the needed on-disk structures. 40.3 File Organization: The Inode One of the most important on-disk structures of a file system is the inode ; virtually all file systems have a structure similar to this. The name inode is short for index node , the historical name given to it by U NIX in- ventor Ken Thompson [RT74], used because these nodes were originally arranged in an array, and the array indexed into when accessing a partic- ular inode. O PERATING S YSTEMS [V ERSION 0.81] WWW . OSTEP . ORG
Image of page 4
F ILE S YSTEM I MPLEMENTATION 5 A SIDE : D ATA S TRUCTURE — T HE I NODE The inode is the generic name that is used in many file systems to de- scribe the structure that holds the metadata for a given file, such as its length, permissions, and the location of its constituent blocks. The name goes back at least as far as U NIX (and probably further back to Multics
Image of page 5
Image of page 6

You've reached the end of your free preview.

Want to read all 17 pages?

  • Fall '14
  • Inode, file systems, Inodes

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture