![if !IE]> <![endif]>
There are five directory structures. They are
Acyclic Graph directory
General Graph directory
1. Single – Level Directory
The simplest directory structure is the single- level directory.
All files are contained in the same directory.
When the number of files increases or when the system has more than one user, since all files are in the same directory, they must have unique names.
2. Two – Level Directory
In the two level directory structures, each user has her own user file directory (UFD).
When a user job starts or a user logs in, the system’s master file directory (MFD) is searched. The MFD is indexed by user name or account number, and each entry points to the UFD for that user.
When a user refers to a particular file, only his own UFD is searched.
Thus, different users may have files with the same name.
Although the two – level directory structure solves the name-collision problem
v Users cannot create their own sub-directories.
3. Tree – Structured Directory
v A tree is the most common directory structure.
v The tree has a root directory. Every file in the system has a unique path name.
v A path name is the path from the root, through all the subdirectories to a specified file.
v A directory (or sub directory) contains a set of files or sub directories.
v A directory is simply another file. But it is treated in a special way.
v All directories have the same internal format.
v One bit in each directory entry defines the entry as a file (0) or as a subdirectory (1).
v Special system calls are used to create and delete directories.
v Path names can be of two types: absolute path names or relative path names.
v An absolute path name begins at the root and follows a path down to the specified file, giving the directory names on the path.
v A relative path name defines a path from the current directory.
4. Acyclic Graph Directory.
An acyclic graph is a graph with no cycles.
To implement shared files and subdirectories this directory structure is used.
An acyclic – graph directory structure is more flexible than is a simple tree structure, but it is also more complex. In a system where sharing is implemented by symbolic link, this situation is somewhat easier to handle. The deletion of a link does not need to affect the original file; only the link is removed.
Another approach to deletion is to preserve the file until all references to it are deleted.
To implement this approach, we must have some mechanism for determining that
the last reference to the file has been deleted.
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.