File System

(Source)

According to Robert Love - "A filesystem is a hierarchical storage of data adhering to a specific structure."

A Linux file system is a structured collection of files on a disk drive or a partition.

A file system facilitates -

<aside> 💡 You can create a file system by using the mkfs command. Check out its man page to know more.

</aside>

Use  to print the information about the file system.

Use cat /etc/fstab to print the information about the file system.

File Systems supported in Linux

The comparision of various file systems can be obtained here - Wikipedia


Virtual File System (VFS)

(Source)

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.

It can be used to bridge the differences in Windows, classic Mac OS/macOS and Unix filesystems, so that applications can access files on local file systems of those types without having to know what type of file system they are accessing.


File System Architecture

File System Architecture

Buffer Cache

The buffer cache is used to avoid (& reduce) disk traffic time.

The space for the buffer cache is allocated on the RAM; this space is dependent on how much space is left after loading the kernel into the RAM.

Note that the buffer cache will be only used for the block devices!

<aside> 💡 You can check the amount of buffer cache by using the free command.

</aside>

The operations that happen when data is requested is described below -

While all this is going on, the requesting process is put to wait state.

A process can use the sync() system call to tell the system that any changes made by itself in the buffer cache must be written to the disk.


File Descriptor Table

(Source)