0% found this document useful (0 votes)
0 views

File System Mounting in OS

File system mounting is the process of integrating directories and files from a storage device into a user's computer file system, allowing access through the system file manager. Different operating systems, like Linux, Windows, and Mac OS, have distinct methods for mounting external storage devices. Additionally, directory implementations can utilize linked lists or hash tables to manage file entries, with hash tables providing faster search capabilities despite their fixed size limitation.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

File System Mounting in OS

File system mounting is the process of integrating directories and files from a storage device into a user's computer file system, allowing access through the system file manager. Different operating systems, like Linux, Windows, and Mac OS, have distinct methods for mounting external storage devices. Additionally, directory implementations can utilize linked lists or hash tables to manage file entries, with hash tables providing faster search capabilities despite their fixed size limitation.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

File System Mounting in OS

What is File System Mounting?


Mounting is a process in which the operating system adds the
directories and files from a storage device to the user’s computer file
system.
The file system is attached to an empty directory, by adding so the
system user can access the data that is available inside the storage
device through the system file manager.
Storage systems can be internal hard disks, external hard disks, USB
flash drivers, SSD cards, memory cards, network-attached storage
devices, CDs and DVDs, remote file systems, or anything else.
Terminologies used in File System Mounting

• File System:
• It is the method used by the operating system to manage data
storage in a storage device. So, a user can access and organize the
directories and files in an efficient manner.
• Device name:
• It is a name/identifier given to a storage partition. In windows, for
example, “D:” in windows.
• Mount point:
• It is an empty directory in which we are adding the file system during
the process of mounting.
• Mounting Indifferent Operating Systems
• 1. Linux-Unix based OS
• We want to mount /dev/sdb1 to an existing directory /mnt.
• sudo mount /dev/sdb1 /mnt/mydisk
• 2.Windows OS
• In windows mounting is very easy for a user.
• When we connect the external storage devices, windows automatically
detect the file system and mount it to the drive letter.
• Drive letter may be D: or E:.
• Steps:
• Connect an external storage device to your PC.
• Windows detects the file system on the drive (e.g., FAT32 or NTFS) and
assigns it a drive letter, such as “E:”.
• You can access the derive by going through, THIS PC –> FILE EXPLORER –
>”E:” drive
• Access the data.
• 3. Mac OS
• In Mac OS when we connect an external storage it will automatically mount, and
it will be accessible via Finder.
• As an advanced mounting method user can also use the command diskutil in
Terminal.
• Method 1:
• Steps:
• Connect an external storage device to your MAC.
• MS OS detects the file system and automatically mount it.
• You can access the drive by opening Finder, and it will appear in the sidebar.
• Method 2(Using diskutil):
• To mount a drive with a known identifier: disk2s1

• diskutil mount /dev/disk2s1


Directory Implementation in Operating
System
• The implementation of directories using a singly linked list is easy to
program but is time-consuming to execute.
• Here we implement a directory by using a linear list of filenames with
pointers to the data blocks.
• To create a new file the entire list has to be checked such that the new directory does
not exist previously.
• The new directory then can be added to the end of the list or at the beginning of the
list.
• In order to delete a file, we first search the directory with the name of the file to be
deleted. After searching we can delete that file by releasing the space allocated to it.
• To reuse the directory entry we can mark that entry as unused or we can append it to
the list of free directories.
• To delete a file linked list is the best choice as it takes less time.
• Disadvantage
• The main disadvantage of using a linked list is that when the user needs to find a file
the user has to do a linear search.
• In today’s world directory information is used quite frequently and linked list
implementation results in slow access to a file.
• So the operating system maintains a cache to store the most recently used directory
information.
Directory Implementation using Hash Table

• An alternative data structure that can be used for directory


implementation is a hash table.
• It overcomes the major drawbacks of directory implementation using
a linked list. In this method, we use a hash table along with the linked
list.
• Here the linked list stores the directory entries, but a hash data
structure is used in combination with the linked list.
• In the hash table for each pair in the directory key-value pair is
generated.
• The hash function on the file name determines the key and this key
points to the corresponding file stored in the directory.
• This method efficiently decreases the directory search time as the
entire list will not be searched on every operation.
• Using the keys the hash table entries are checked and when the file is
found it is fetched.
• Disadvantage:
• The major drawback of using the hash table is that generally, it has a
fixed size and its dependency on size.
• But this method is usually faster than linear search through an entire
directory using a linked list.
Efficiency and performance
• One of the most basic and important metrics of operating system
efficiency is CPU utilization, which measures how well the operating
system manages the processor resources.
• CPU utilization is the percentage of time that the CPU is busy
executing processes, as opposed to being idle or waiting for
input/output.
• There are several factors that can impact the performance of a computer system, including:
• Processor speed:
• The speed of the processor, measured in GHz (gigahertz), determines how quickly the
computer can execute instructions and process data.
• Memory:
• The amount and speed of the memory, including RAM (random access memory) and cache
memory, can impact how quickly data can be accessed and processed by the computer.
• Storage:
• The speed and capacity of the storage devices, including hard drives and solid-state drives
(SSDs), can impact the speed at which data can be stored and retrieved.
• I/O devices:
• The speed and efficiency of input/output devices, such as keyboards, mice, and displays, can
impact the overall performance of the system.
• Software optimization:
• The efficiency of the software running on the system, including operating systems and
applications, can impact how quickly tasks can be completed.

You might also like