Page 65 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 65

Unit 3: File System Hierarchy




          A complete pathname is not the only way to identify a file in the directory tree structure: a   notes
          “relative” pathname, starting from a parent directory is suited just as well, provided that the
          FMS already knows about that directory. This addressing methods can be usefully exploited by
          making the FMS assign to all processes a “current working directory” (CWD) attribute, i.e. the
          complete patname of a directory of interest, and defining a way for the process to identify files by
          just specifying a “relative” pathname starting from that directory. In the same example, if “:Root-
          dir:Subdir-1” is the CWD of a process, the above file might be identified simply as “File-6”, using
          the convention that patnames not starting with a color are relative to the CWD. The advantage is
          twofold: the entire file system structure up to the CWD need not be known by a program (hence
          its data can be safely moved in other directories withouth having to rewrite the program), and
          file access time is decreased.
               !

             Caution  Keep in mind it is no longer necessary to navigate the whole tree in order to find
             the address of a file.

          3.5 file system structure

          The file system structure is the most basic level of organization in an operating system. Almost
          all of the ways an operating system interacts with its users, applications, and security model are
          dependent upon the way it organizes files on storage devices. Providing a common file system
          structure ensures users and programs are able to access and write files.
          File systems break files down into two logical categories:
          1.   Shareable vs. unsharable files
          2.   Variable vs. static files

          Shareable files are those that can be accessed locally and by remote hosts; unsharable files are
          only available locally. Variable files, such as documents, can be changed at any time; static files,
          such as binaries, do not change without an action from the system administrator.

          The reason for looking at files in this manner is to help correlate the function of the file with the
          permissions assigned to the directories which hold them. The way in which the operating system
          and its users interact with a given file determines the directory in which it is placed, whether that
          directory is mounted with read-only or read/write permissions, and the level of access each user
          has to that file. The top level of this organization is crucial. Access to the underlying directories
          can be restricted or security problems could manifest themselves if, from the top level down, it
          does not adhere to a rigid structure.
          It is important to understand the difference between a file system and a directory. A file system is
          a section of hard disk that has been allocated to contain files. This section of hard disk is accessed
          by mounting the file system over a directory. After the file system is mounted, it looks just like
          any other directory to the end user.
          However, because of the structural differences between the file systems and directories, the data
          within these entities can be managed separately.
          When the operating system is installed for the first time, it is loaded into a directory structure, as
          shown in the following illustration.
          Figure 3.2 File System Tree. This tree chart shows a directory structure with the / (root) file
          system at the top, branching downward to directories and file systems. Directories branch to /
          bin, /dev, /etc, and /lib. File systems branch to /usr, /tmp, /var, and /home.







                                           LoveLy professionaL university                                    59
   60   61   62   63   64   65   66   67   68   69   70