directory structure and file system mounting

9,808 views 16 slides Jan 20, 2020
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

directory structure


Slide Content

Directory structure and file system mounting in os M.Raj shree M.SC(IT) Nadar saraswathi college of arts&science

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.

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.

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.

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 directories

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

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.

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.

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.

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 the storage

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.
Tags