File Management in Operating System ppt

File Management in Operating System ppt

 Directory Operating:

The following operating can be performed on a directory.

  • Create: This operating is performed to create a new directory for holding information in the form of files. When a directory is created, dot (.)and double dot(...) are created automatically by the system.
  • Search: This operating is used to search a specific file in a directory.
  • Delete: This operating is performed to delete a directory. Usually, an empty directory can be deleted.
  • Open: This operating is performed to open a directory to read its contents or to copy new files into it.
  • Rename: This operating is performed to change the name of the existing directory.
  • List: This operating is used to display the list of files/subdirectories of a specific directory.

Directory Structure:

directory-structure


The directory structure varies from system to system. The most important and commonly used directory structure is as follows,
  1. Single-Level directory
  2. Two-Level directory
  3. Tree-Structured Directory
  4. Cycle Graph or General Graph

Single-Level Directory:

The simplest directory structure is the single-level directory. The file system that uses this structure has only one directory. This single directory contains all the files of all the users. Each file must have a unique name in a computer system directories.
The single-level directory structure is not suitable to manage a large number of files. The files may be of different software or projects. These software or projects may have some files with the same file with the same names such as readm.txt, etc. In this way, the files are overwritten. This way creates problems for the user.
The single-Level directory structure was used in earlier single-user systems with a very limited number of files. Today, this directory structure is not used in the operating system. 

Two-Level Directory:

In a single-Level directory, files of different users are maintained in single directory. In this case, it becomes difficult to search the files of a particular user. The two-level directory structure solves some of the problems faced with the single-Level directory structure. In a two-level directory structure, each user can organize files in its own directory.
The two-level directory structure is divided into two levels of directories. i.e. a master directory and user directories as subdirectories of the master directory in the computer network system. The master directory is considered as the root directory. Each user is provided a separate directory. The user directory is called the User File Directory (UFD), whereas the master directory is called the Master File Directory (MFD). The master directory contains the entries of user directories. The directory of a particular user contains the files of that user. When a user refers to a particular file, only his own directory is searched. 
The two-Level directory can be considered a tree, or an inverted tree, of heigh2. The root of the tree is the master directory. The files are the leaves of the tree in a subdirectory computer system. The path of a particular file of a particular user is defined by specifying the user name and filename from the root( master directory) of the tree. In a two-level structure, the user cannot create their own subdirectories for grouping or organizing their own files of different types. However, the operating system uses a special system program or system calls to create or delete the user directory under the master directory.

Tree-Structure Directory;

The tree-structure directory is also known as a hierarchical structure directory. It is a very powerful and flexible approach to organize files on the disk. With this approach, each user can create his own subdirectories and each subdirectory may contain many subdirectories, and so on. This directory has a root directory, and every file or subdirectory in the file system has a unique pathname,

The tree-structure directory approach is commonly used in the most operating system such as MS-DOS, Windows, and UNIX, etc.

The root directory contains the subdirectories (and also files). A directory or subdirectory may contain a set of files or subdirectories or both. A directory or subdirectory is treated as a special file. The system calls are used to create and delete directories, but some operating systems (e.g. MS-DOS) only delete a directory if it is empty.
Please note that the path to a file in a tree-structured directory becomes very lightly (than a path in a two-level directory).

Acyclic Graph Directory:

computer-hard-disk

Acyclic graph means a graph with no cycle. This directory structure is used by some operating systems to allow the directory to share subdirectories and files. The same file or subdirectory may be in two different directories on a computer system technology. A shared file or subdirectories is not the name as two different copies of a file/subdirectories, but only one actual file/subdirectories exist. A new file created by one user will automatically appear in all the shared subdirectories. These directories are very useful in a system network for processing. 

Please note that the acyclic-graph directory is like a tree structure, but it is more flexible than a tree structure.

Directory Entries:

Information about files is stored in a directory entry, The information of a file may be a filename.file size, location on the disk, access rights, time when the file was created or modified, etc. This information may be different for different operating systems.

A file opened before it can be accessed. The open operating obtain a pointer to the files' directory location. All following references to the file occur through the pointer rather than the name of the file. In a file system, the management is very fast and simplifies any type of data.

In some operating systems, the directory entry points to a separate file structure where information about the file is stored. For example, in UNIX, the file information is stored in a structure called I-node (Information node). An I-node is a control structure that contains the key to any type of information needed by the operating system for a particular file in a system. The directory entry contains only the name of the file and its I-node number. 

Comments

Popular posts from this blog

Modern scenario of information technology:

Types of Data Access Methods

Output devices Tutorials point