SlideShare a Scribd company logo
1 of 22
UNIT III
FILE SYSTEM
The Virtual File System (VFS)
• The Virtual File System (also known as the Virtual Filesystem Switch)
is the software layer in the kernel that provides the filesystem interface
to user space programs.
• It also provides an abstraction within the kernel which allows
different files
• The virtual file system (VFS) interface, also known as the v-node
interface, provides a bridge between the physical and logical file
systems. The information that follows discusses the virtual file system
interface, its data structures, and its header files, and explains how to
configure a virtual file system.tem implementations to coexist.
Role
• Four main objects: superblock, dentries, inodes, files
•
Several processes may have the same file open for reading or writing,
and file structures contain the required information such as the current
file position.
System Calls
• A system call is a way for programs to interact with the operating
system.
• A computer program makes a system call when it makes a request to
the operating system's kernel.
• System call provides the services of the operating system to the user
programs via Application Program Interface(API).
Data Structures - Super Block, Inode, File
• Each VFS object is stored in a suitable data structure, which includes
both the object attributes and a pointer to a table of object methods.
• The kernel may dynamically modify the methods of the object and,
hence, it may install specialized behavior for the object.
• The sb_lock spin lock protects the list against concurrent accesses in
multiprocessor systems.
Inode Objects
• All information needed by the filesystem to handle a file is included in
a data structure called an inode.
• A filename is a casually assigned label that can be changed, but the
inode is unique to the file and remains the same as long as the file
exists.
Dentry Objects
• The VFS treats directories as files. In the path /bin/vi, both bin and vi
are filesbin being the special directory file and vi being a regular file.
• An inode object represents both these components.
• Despite this useful unification, the VFS often needs to perform
directory-specific operations, such as path name lookup.
• Path name lookup involves translating each component of a path,
ensuring it is valid, and following it to the next component.
• To facilitate this, the VFS employs the concept of a directory entry
(dentry). A dentry is a specific component in a path. Using the
previous example, /, bin, and vi are all dentry objects.
• The first two are directories and the last is a regular file. This is an
important point: dentry objects are all components in a path, including
files. Resolving a path and walking its components is a nontrivial
exercise, time-consuming and rife with string comparisons. The dentry
object makes the whole process easier.
Dentry Cache
After the VFS layer goes through the trouble of resolving each element
in a path name into a dentry object and arriving at the end of the path, it
would be quite wasteful to throw away all that work.
Instead, the kernel caches dentry objects in the dentry cache or, simply,
the dcache.
• The dentry cache consists of three parts:
• Lists of "used" dentries that are linked off their associated inode via the
i_dentry field of the inode object. Because a given inode can have multiple
links, there might be multiple dentry objects; consequently, a list is used.
• A doubly linked "least recently used" list of unused and negative dentry
objects. The list is insertion sorted by time, such that entries toward the
head of the list are newest. When the kernel must remove entries to reclaim
memory, the entries are removed from the tail; those are the oldest and
presumably have the least chance of being used in the near future.
• A hash table and hashing function used to quickly resolve a given path into
the associated dentry object.
Files Associated with a Process
• A file system is a process of managing how and where data on a
storage disk, which is also referred to as file management or FS.
• It is a logical disk component that compresses files separated into
groups, which is known as directories.
• It is abstract to a human user and related to a computer; hence, it
manages a disk's internal operations. Files and additional directories
can be in the directories.
• Although there are various file systems with Windows, NTFS is the
most common in modern times.
• It would be impossible for a file with the same name to exist and also
impossible to remove installed programs and recover specific files
without file management, as well as files would have no organization
without a file structure.
• The file system enables you to view a file in the current directory as
files are often managed in a hierarchy.
Filesystem Type Registration
• Often, the user configures Linux to recognize all the filesystems
needed when compiling the kernel for her system.
• But the code for a filesystem actually may either be included in the
kernel image or dynamically loaded as a module.
• The VFS must keep track of all filesystem types whose code is
currently included in the kernel.
• It does this by performing filesystem type registration.
• It is the filesystem that is directly mounted by the kernel during the
booting phase and that holds the system initialization scripts and the
most essential system programs.
• Other filesystems can be mounted—either by the initialization scripts
or directly by the users—on directories of already mounted
filesystems. Being a tree of directories, every filesystem has its
own root directory.
• The directory on which a filesystem is mounted is called the mount
point. A mounted filesystem is a child of the mounted filesystem to
which the mount point directory belongs.
Namespaces
• In a traditional Unix system, there is only one tree of mounted
filesystems: starting from the system’s root filesystem, each process
can potentially access every file in a mounted filesystem by specifying
the proper pathname.
• In this respect, Linux 2.6 is more refined: every process might have its
own tree of mounted filesystems—the so-called namespace of the
process.
Mounting and Unmounting
• Mounting a file system attaches that file system to a directory (mount
point) and makes it available to the system.
• The root (/) file system is always mounted. Any other file system can
be connected or disconnected from the root (/) file system.
• When you mount a file system, any files or directories in the
underlying mount point directory are unavailable as long as the file
system is mounted.
• These files are not permanently affected by the mounting process, and
they become available again when the file system is unmounted.
Implementation of VFS System Calls.
• A virtual file system (VFS) or virtual filesystem switch is an abstract
layer on top of a more concrete file system.
•
The purpose of a VFS is to allow client applications to access different
types of concrete file systems in a uniform way.
VFS: The Virtual File System Interface

More Related Content

Similar to VFS: The Virtual File System Interface

Poking The Filesystem For Fun And Profit
Poking The Filesystem For Fun And ProfitPoking The Filesystem For Fun And Profit
Poking The Filesystem For Fun And Profitssusera432ea1
 
Ch11 file system implementation
Ch11   file system implementationCh11   file system implementation
Ch11 file system implementationWelly Dian Astika
 
ITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemSneh Prabha
 
De-Anonymizing Live CDs through Physical Memory Analysis
De-Anonymizing Live CDs through Physical Memory AnalysisDe-Anonymizing Live CDs through Physical Memory Analysis
De-Anonymizing Live CDs through Physical Memory AnalysisAndrew Case
 
Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)Ahmed El-Arabawy
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file managementKalai Selvi
 
Access Methods and File System Mounting.pptx
Access Methods and File System Mounting.pptxAccess Methods and File System Mounting.pptx
Access Methods and File System Mounting.pptxlaiba29012
 
Part 03 File System Implementation in Linux
Part 03 File System Implementation in LinuxPart 03 File System Implementation in Linux
Part 03 File System Implementation in LinuxTushar B Kute
 
File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learningLavanya Sharma
 
Introduction to file system and OCFS2
Introduction to file system and OCFS2Introduction to file system and OCFS2
Introduction to file system and OCFS2Gang He
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file managementKalai Selvi
 
Internal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya JyothiInternal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya JyothiSowmya Jyothi
 
M2 211-unix fs-rl_2.1.1
M2 211-unix fs-rl_2.1.1M2 211-unix fs-rl_2.1.1
M2 211-unix fs-rl_2.1.1MrudulaJoshi10
 

Similar to VFS: The Virtual File System Interface (20)

File Systems
File SystemsFile Systems
File Systems
 
Poking The Filesystem For Fun And Profit
Poking The Filesystem For Fun And ProfitPoking The Filesystem For Fun And Profit
Poking The Filesystem For Fun And Profit
 
Ch11 file system implementation
Ch11   file system implementationCh11   file system implementation
Ch11 file system implementation
 
ITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemITFT_File system interface in Operating System
ITFT_File system interface in Operating System
 
De-Anonymizing Live CDs through Physical Memory Analysis
De-Anonymizing Live CDs through Physical Memory AnalysisDe-Anonymizing Live CDs through Physical Memory Analysis
De-Anonymizing Live CDs through Physical Memory Analysis
 
Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)
 
File system
File systemFile system
File system
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
 
Access Methods and File System Mounting.pptx
Access Methods and File System Mounting.pptxAccess Methods and File System Mounting.pptx
Access Methods and File System Mounting.pptx
 
Part 03 File System Implementation in Linux
Part 03 File System Implementation in LinuxPart 03 File System Implementation in Linux
Part 03 File System Implementation in Linux
 
File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learning
 
Unix File System
Unix File SystemUnix File System
Unix File System
 
Introduction to file system and OCFS2
Introduction to file system and OCFS2Introduction to file system and OCFS2
Introduction to file system and OCFS2
 
5.distributed file systems
5.distributed file systems5.distributed file systems
5.distributed file systems
 
File System.pptx
File System.pptxFile System.pptx
File System.pptx
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
 
Internal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya JyothiInternal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya Jyothi
 
M2 211-unix fs-rl_2.1.1
M2 211-unix fs-rl_2.1.1M2 211-unix fs-rl_2.1.1
M2 211-unix fs-rl_2.1.1
 

Recently uploaded

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 

Recently uploaded (20)

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 

VFS: The Virtual File System Interface

  • 2. The Virtual File System (VFS) • The Virtual File System (also known as the Virtual Filesystem Switch) is the software layer in the kernel that provides the filesystem interface to user space programs. • It also provides an abstraction within the kernel which allows different files • The virtual file system (VFS) interface, also known as the v-node interface, provides a bridge between the physical and logical file systems. The information that follows discusses the virtual file system interface, its data structures, and its header files, and explains how to configure a virtual file system.tem implementations to coexist.
  • 3.
  • 4. Role • Four main objects: superblock, dentries, inodes, files • Several processes may have the same file open for reading or writing, and file structures contain the required information such as the current file position.
  • 5.
  • 6. System Calls • A system call is a way for programs to interact with the operating system. • A computer program makes a system call when it makes a request to the operating system's kernel. • System call provides the services of the operating system to the user programs via Application Program Interface(API).
  • 7.
  • 8. Data Structures - Super Block, Inode, File • Each VFS object is stored in a suitable data structure, which includes both the object attributes and a pointer to a table of object methods. • The kernel may dynamically modify the methods of the object and, hence, it may install specialized behavior for the object. • The sb_lock spin lock protects the list against concurrent accesses in multiprocessor systems.
  • 9. Inode Objects • All information needed by the filesystem to handle a file is included in a data structure called an inode. • A filename is a casually assigned label that can be changed, but the inode is unique to the file and remains the same as long as the file exists.
  • 10. Dentry Objects • The VFS treats directories as files. In the path /bin/vi, both bin and vi are filesbin being the special directory file and vi being a regular file. • An inode object represents both these components. • Despite this useful unification, the VFS often needs to perform directory-specific operations, such as path name lookup. • Path name lookup involves translating each component of a path, ensuring it is valid, and following it to the next component.
  • 11. • To facilitate this, the VFS employs the concept of a directory entry (dentry). A dentry is a specific component in a path. Using the previous example, /, bin, and vi are all dentry objects. • The first two are directories and the last is a regular file. This is an important point: dentry objects are all components in a path, including files. Resolving a path and walking its components is a nontrivial exercise, time-consuming and rife with string comparisons. The dentry object makes the whole process easier.
  • 12. Dentry Cache After the VFS layer goes through the trouble of resolving each element in a path name into a dentry object and arriving at the end of the path, it would be quite wasteful to throw away all that work. Instead, the kernel caches dentry objects in the dentry cache or, simply, the dcache.
  • 13. • The dentry cache consists of three parts: • Lists of "used" dentries that are linked off their associated inode via the i_dentry field of the inode object. Because a given inode can have multiple links, there might be multiple dentry objects; consequently, a list is used. • A doubly linked "least recently used" list of unused and negative dentry objects. The list is insertion sorted by time, such that entries toward the head of the list are newest. When the kernel must remove entries to reclaim memory, the entries are removed from the tail; those are the oldest and presumably have the least chance of being used in the near future. • A hash table and hashing function used to quickly resolve a given path into the associated dentry object.
  • 14. Files Associated with a Process • A file system is a process of managing how and where data on a storage disk, which is also referred to as file management or FS. • It is a logical disk component that compresses files separated into groups, which is known as directories. • It is abstract to a human user and related to a computer; hence, it manages a disk's internal operations. Files and additional directories can be in the directories.
  • 15. • Although there are various file systems with Windows, NTFS is the most common in modern times. • It would be impossible for a file with the same name to exist and also impossible to remove installed programs and recover specific files without file management, as well as files would have no organization without a file structure. • The file system enables you to view a file in the current directory as files are often managed in a hierarchy.
  • 16. Filesystem Type Registration • Often, the user configures Linux to recognize all the filesystems needed when compiling the kernel for her system. • But the code for a filesystem actually may either be included in the kernel image or dynamically loaded as a module. • The VFS must keep track of all filesystem types whose code is currently included in the kernel. • It does this by performing filesystem type registration.
  • 17. • It is the filesystem that is directly mounted by the kernel during the booting phase and that holds the system initialization scripts and the most essential system programs. • Other filesystems can be mounted—either by the initialization scripts or directly by the users—on directories of already mounted filesystems. Being a tree of directories, every filesystem has its own root directory. • The directory on which a filesystem is mounted is called the mount point. A mounted filesystem is a child of the mounted filesystem to which the mount point directory belongs.
  • 18. Namespaces • In a traditional Unix system, there is only one tree of mounted filesystems: starting from the system’s root filesystem, each process can potentially access every file in a mounted filesystem by specifying the proper pathname. • In this respect, Linux 2.6 is more refined: every process might have its own tree of mounted filesystems—the so-called namespace of the process.
  • 19. Mounting and Unmounting • Mounting a file system attaches that file system to a directory (mount point) and makes it available to the system. • The root (/) file system is always mounted. Any other file system can be connected or disconnected from the root (/) file system.
  • 20. • When you mount a file system, any files or directories in the underlying mount point directory are unavailable as long as the file system is mounted. • These files are not permanently affected by the mounting process, and they become available again when the file system is unmounted.
  • 21. Implementation of VFS System Calls. • A virtual file system (VFS) or virtual filesystem switch is an abstract layer on top of a more concrete file system. • The purpose of a VFS is to allow client applications to access different types of concrete file systems in a uniform way.