Powerful Google developer tools for immediate impact! (2023-24 C)
directory structure and file system mounting
1. DIRECTORY STRUCTURE AND FILE
SYSTEM MOUNTING IN OS
M.Raj shree
M.SC(IT)
Nadar saraswathi college of arts&science
2. Directory Structure
Directory structure provides both the above-
discussed features. A directory always has
information about the group of related
files. Whenever a user or a process request for
a file, the file system search for the file’s entry
in the directory and when the match is found, it
obtains the file’s location from there.
A directory is a container that is used to
contain folders and file. It organizes files and
folders into a hierarchical manner.
3. Types of Directory Structures
Single-level directory structure
Single level directory structure has only one
directory which is called the root directory. The
users are not allowed to create subdirectories
under the root directory. All the files created by
the several users are present in the root
directory only.
Single level directory is simplest directory
structure.In it all files are contained in same
directory which make it easy to support and
understand.
4. Advantages
Since it is a single directory, so its
implementation is very easy.
If the files are smaller in size, searching
will become faster.
The operations like file creation, searching,
deletion, updating are very easy in such a
directory structure.
5.
6. Two-level directory structure
In Two-level directory structure, the users
create directory directly inside the root
directory. But once a user creates such
directory, further he cannot create any
subdirectory inside that directory
4 users have created their separate directory
inside the root directory. But further, no
subdirectory is created by the users.
This two-level structure allows each user to
keep their files separately inside their own
directory. This structure allows to use the same
name for the files but under different user
7.
8. Hierarchical Directory Structure
In Hierarchical directory structure, the users
can create directories under the root directory
and can also create sub-directories under this
structure. As the user is free to create many
sub-directories, it can create different sub-
directories for different file types.
Here, the files are accessed by their location
using the path. There are two types of paths to
locate the file in this directory structure
9. Tree Directory Structure
In a tree directory structure, except root
directory, every directory or file has only one
parent directory. So, there is a total
separation between the users which provide
complete naming freedom. Here, if a user
wishes to access another users file, it has to go
through two or more directories.
The tree directory structure provides an
asymmetric way for the user to access the
shared files of a different user. For example, a
user can access a file of its own user directory
with a shorter path than the other user.
10.
11. Acyclic-Graph Directory
Structure
An acyclic graph is a graph with no cycle and
allows to share subdirectories and files. The
same file or subdirectories may be in two
different directories. It is a natural
generalization of the tree-structured directory.
directory structure allows a directory or a file to
have many parent directories. So, a shared file
in a directory can be pointed by the other user
directories who have access to that shared file
using the links.
12. File system mounting
Mounting is a process by which the operating
system makes files and directories on a storage
device (such as hard drive, CD-ROM, or network
share) available for users to access via the
computer's file system.
An opposite process of mounting is
called unmounting, in which the operating system
cuts off all user access to files and directories on
the mount point, writes the remaining queue of
user data to the storage device, refreshes file
system metadata, then relinquishes access to the
device; making the storage device safe for
removal.
13. A mount point is a location in the
partition used as a root filesystem
Many different types of storage exist, including
magnetic, magneto-optical, optical, and
semiconductor (solid-state) drives.
Each different filesystem provides the host
operating system with metadata so that it
knows how to read and write data.
When the medium (or media, when the
filesystem is a volume filesystem as in
RAID arrays) is mounted, these metadata are
read by the operating system so that it can use
14. In order to access a filesystem in Linux you
first need to mount it. Mounting a filesystem
simply means making the particular filesystem
accessible at a certain point in the Linux
directory tree.
When mounting a filesystem it does not matter
if the filesystem is a hard disk partition, CD-
ROM, floppy, or USB storage device
Mounting is the attaching of an additional file
system to the currently accessible file
system of a computer.