Directory structures

Lists of Descriptive Questions Answers and Short Study Notes On Operating System – Directory structures

  • (1) Explain directory structures.

 

Question-1 Explain directory structures.

Single Level Directory system

  • The simplest form of directory system is having one directory containing all the files. This is some time called as root directory.
  • An example of a system which has one directory is given in figure. Here directory contain four files.
  • The advantages of this scheme are its simplicity and the ability to locate files quickly there is only one directory to look, after all.
  • It is often used on simple embedded devices such as telephones.

 

Hierarchical Directory system

  • The single level is used for simple dedicated application, but for modern user with thousands of files, it would be impossible to find anything if all files were in a single directory.
  • The ability for users to create an arbitrary number of subdirectories provides a powerful structuring tool for user to organize their work.
  • When the file system is organized as a directory tree, some way is needed for specifying file names.

 

Two methods are used commonly

  • Absolute path name
  • Relative path name

 

  • An absolute path name consisting of the path from the root directory to the file
  • Relative path name is used in conjunction with the concept of the working directory.
  • User can designate one directory as the current working directory, in which case, all path names not beginning at the root directory are taken relative to working directory

 

Most operating systems that support a hierarchical directory system have two special entries in every directory,

  • “.” Or “dot” refers to current directory
  • “..” or “dotdot” refers to parent directory

hierarchical directory system

unix directory tree