OS Presentation
OS Presentation
Structure
Presented by:
• They typically start with a root directory and allow for efficient data
access, organization, and navigation, simplifying file management
and access control.
• The root directory contains directories for each user. The users can, however, create
subdirectories inside their directory and also store the files.
• This is how things work on our PCs. We can store some files inside a folder and also
create multiple folders inside a folder.
• The pictorial representation of a tree-structured directory. The root directory is
highly secured, and only the system administrator can access it. We can see
how there can be subdirectories inside the user directories. A user cannot
modify the root directory data. Also, a user cannot access another user's
directory.
Advantages of tree-structured directory
• Highly scalable compared to the previous two types of
directories.
• Allows subdirectories inside a directory.
• Searching is easy.
• Allows grouping.
• Segregation of important and unimportant files is easy.
Disadvantages of tree-structured
directory
• As one user cannot enter another user’s directory, this
restricts sharing of files.
• Too many subdirectories may make the search
complicated.
• Users cannot modify the root directory’s data.
• Files might have to be saved in multiple directories in
Acyclic Graph Directory
Structure
• Suppose there is a file abcd.txt. Out of the three types of directories we studied
above, none of them provide the flexibility to access the file abcd.txt from multiple
directories, i.e., we cannot access a particular file or subdirectory from two or more
directories. The file or the subdirectory can be accessed only by the directory it is
present inside.
• The solution to this problem is presented by the acyclic-graph directory. In this type
of directory, we can access a file or a subdirectory from multiple directories. Hence
files can be shared between directories. It is designed in such a way that multiple
directories point to a particular directory or file with the help of links.
• A practical example of this is a doc file shared between two users. If any of
the users makes a change in the file, the change is reflected for both the
users.
Advantages of acyclic- graph directory
• Allows sharing of files or subdirectories from more than
one directory.
• Searching is very easy.
• Provides more flexibility to the users.
Disadvantages of acyclic-graph
directory
• Harder to implement in comparison to the previous
three.
• Since the files are accessed from multiple directories,
deleting a file may cause some errors if the user is not
cautious.
General-Graph Directory
Structure
• This is an extension to the acyclic-graph
directory. In the general-graph directory, there
can be a cycle inside a directory.
• Disadvantages of General-graph
directory
• It costs more than alternative solutions.
• Garbage collection is an essential step here.
Conclusio
n
• Single-level directory, two-level directory, tree-structured directory, acyclic-
graph directory, and general-graph directory are various structures of a
directory.
• In a two-level directory structure, there are user directories, and each user
can store files in their own directory.