What is a File System?
A file system is a method that is responsible for managing the space and the data on the system's storage unit. It is also known as the file manager. The file system's data is stored in the form of files called directories. A file system is the logical representation of the driver. It is the digital representation of the hard disk. The firmware software is responsible for performing the internal operation on the disk. From the file system, the user can check the previous versions of the file system and manage the disk's capacity and security.
Many types of file management systems are available in the market, but the most popular and commonly used file system is NTFS. The file system can also manage the files ensuring that no more than one file with the same name exist in the same folder. The file system provides the user with many useful features. It also creates a recovery of each file, making it possible to recover the file even when it is once deleted from the system.
Most importantly, a file system provides a structure to the directories and ensures the data is properly stored. The user can also view all the files stored in the current directory using the file system. A file system is maintained in a hierarchical structure.
Let us see what a file system looks like and what functions can be performed using the file system.
Below is the image of a hard disk drive file system.
A Hard Disk Drive has its file system. It does not matter what type of hard drive it is or what the software serves the purpose. It contains various information such as the drive's name, total capacity, space used, and free space available on the disk. It also contains the name of each file and its location and states the method to open the file and access the data stored on the hard drive.
It is also responsible for performing operations such as storing the metadata, naming the file, and managing the storage, directories, or the file system.
In the latest storage devices, the file is stored in the form of sectors, and multiple files are combined to form a combination of these sectors called the blocks. The user can identify the name and location of any file stored in the device using the file system.
One of the important tasks the sector performs is finding the sector that the user can use. Most of the operating systems support either the FAT or NTFS file system. In the above image, you can see that the driver has NTFS File System. A certain operating system such as iOS uses HFS+ and other different file systems.
Sometimes, the term file system does not indicate the file system but is used for the partitions. For example, some people usually say that the particular disk has two different file systems or that it uses two file systems. But to be clear, it does not mean that the entire disk is divided into parts, and each part has a file system. Rather, it means that the disk has two partitions that use the same physical disk.
Most software programs must have a file system to perform their functions properly, meaning each partition must have the firmware. For a program to run on a different device, both the devices must use the same file system. For example: if you have installed software supported by macOS, it won't be possible to use the same program on a Windows or Android OS. It is because that program is file dependent.
Various File Systems
There are various file systems available, some are as follows:
FAT
This file system was designed to be implemented for hard drives. It was launched in 1977 and is an abbreviation for File Allocation Table. It uses 12 or 16 bits to store each cluster access in the table. It is used in Windows Operating System. The primary role of FAT is to manage the files or directories stored in the hard drives and other computer systems. It is also used in portable devices such as digital cameras and flash memory and records the information about the files stored in the drive.
It is a usable firmware software and increases the hard drive's life expectancy. It does so by minimizing the wear and tear on the hard drive by effectively managing the resources on the disk. Nowadays, the latest operating system no more uses the FAT file system; instead, they are replaced by NTFS. The later versions, such as Windows XP, Vista, 7, and 10, use NTFS. There are different file allocation tables, such as FAT8, FAT16, and FAT32.
GFS
It stands for Global File System. This file system is usually used when the user requires to share the resources on multiple computers as it allows them to work as a single unit. It enables the computers that are separated by a large distance to directly share the files. It also allows the user to manage the I/O to save the file system. It was developed at the University of Minnesota, but Red Hat oversees the maintenance of this file system.
HFS
HFS is an abbreviation for Hierarchical File System that was particularly developed for macOS. The primary function performed by the HFS was arranging and storing the files in the hard disk installed in the mac system. It creates a directory whenever there is any change in the hard disk. The user cannot make any change to the HFS disk. It does not support write or format after the release of OS X in the market. Moreover, these drives are also not supported by any other operating system, which means you can use these files in a system with any other OS installed.
NTFS
It is the abbreviation for NT File System. It is one of the most used file systems and is supported by all the Windows Operating systems after the Windows NT. Before, Windows used the GFS file system, but nowadays, it has been completely replaced by the NTFS. It may also be referred to as the New Technology File System. It is preferred so much because it is comparatively more user-friendly. It also provides certain improved features than FAT and HPFS. It is easier to recover the file in NTFS than in other systems. It also provided better security and data protection provisions. The extensibility and the performance of the software also increased significantly.
UDF
In 1995, the Optical Storage Technology Organization released the Universal Disk Format. The aim behind the development of UDF was to provide a file system to ensure that the data remains consistent when the written operation is being performed on several optical media devices. This was mainly used to maintain the files stored in CDs and DVDs. Therefore, it is installed on the CD drivers and is supported by all operating systems. It is essential to perform packet writing on the CD.
Architecture of the File System
A file system is a multi-layered software generally (2-3 layers). Each layer can either work independently or sometimes they even work as a single unit. The logical component of the file system is responsible for providing an Application Program Interface (API) for smooth file operation performance.
This operation includes functions such as OPEN, READ, and WRITE the file. It is user-friendly and therefore is used to interact with the user. The logical layer is the topmost layer. It processes and forwards the user request to the file system's lower layer. The second layer is optional and is not available in many file systems. The work of the second layer is to provide support for multiple concurrent instances of physical file systems. This increases efficiency and allows the performing of multiple tasks simultaneously. It creates a virtual file system where each instance is considered an individual file system implementation.
The third or the bottom-most layer is the physical layer of the file system that deals with memory management and manages the buffering in the data transmission. The physical operation is performed and handled by this layer. It is concerned with the operations associated with the storage device and ensuring that the processed physical blocks are read or written on the memory. It interacts between the channel and the driver in the device to drive the storage in the system.
Different types of File Systems
The file system can be classified into various types depending upon the type of driver or its functioning. Some of the file systems are mentioned below:
- Disk File System
As the name suggests, the system on the disk can randomly address the data. It also anticipates allowing the driver to quickly access the data stored in the disk. For any other file system, it requires a lot of time to address the data on the disk, whereas this system can perform the task in less time. Since it does not store the data sequentially, different users can store and access the data on the disk simultaneously by using DFS. - Flash File System
It is used for managing the flash memory in the system. The primary function of the flash file system is to implement restrictions, increase the performance and provide additional features to the flash memory. It is beneficial to use the flash file system for the flash system. DFS can also be used for flash memory devices, but it is not very efficient and hence not advised. - Tape File System
Tape is also a type of storage media though it is hardly used nowadays. A tape file system allows the user to store the files on the tape. Magnetic tapes are preferred over CDs and DVDs as the user can access the data stored in the tape even after a long time. It was easy to preserve the data stored in the magnetic tape. The creation and preservation of the data was a major hurdle for general file purposes that the tape file system overcame. - Database File Systems
Databases are a popular way of storing data. A database file management data is used to store the data in the form of databases rather than storing the data in a hierarchical structure. In Database File System, the data is organized using the different characteristics of the data. For example: if the data is about the books in the library, it will be stored based on the author or genre of the book. - Transactional File System
This system allows the user to perform two or more file system operations simultaneously by implementing the operations as a transaction. The application specifies whether it wants to operate normally or as a transaction. In case when the operation is performed as a transaction, a control is provided to the program.
Certain programs may require several changes in the file system, and if they fail to perform all the changes, it may harm the system as that may corrupt the system or leave it in a suspended state. This situation can be prevented using the transactional file system. For example, if the software can change the configuration files or amend the executable when performing an update on the system. But the software is interrupted in between, and the pupation cannot be complemented. This may lead to the failure of the entire system. - Network File System
It is generally not used on personal computers. The clients that provide file system-like services include FTP, WebDAV, NFS, etc. They are designed to provide access to the file stored on the servers. This enables the user to remotely access the data stored in the central servers using proper credentials. The remote system uses the local interface to establish the connection. Once the link is established, the system program can easily create, update or access the files and directories available on the server. - Shared Disk File System
This file system is used when multiple systems depend on a single external disk to store the data. It allows all the machines to access the disk subsystem, which otherwise can lead to collisions and traffic. It determines which subsystem will access the external disk to prevent collisions. It allows efficient transmission of data in this scenario. It is also cost-effective as the user must invest in only one external disk subsystem to run many machines. - Minimal File System
In the 1970s, when the microcomputers were launched in the market and made available to the general public, storage was always an issue. It means that the storage devices had very limited capacity, and devices such as disks and digital tapes were too expensive to be afforded by the people. New cheaper storage media devices such as audio cassettes were introduced to overcome this hurdle. The minimal file system was developed to manage the file operations in the audio cassette tape. It was a cheap yet effective replacement for the expensive magnetic tapes. All instructions to operate the cassette recorder were provided on it. The user can click the record button to write the data on the cassette, and the user was required to press play to read the data from it. The user pressed enter from the keyword to stop the read or write operation. - Flat File System
There are no subdirectories in flat systems, meaning the data is not stored hierarchically. All the file and the data is stored in a single directory. This system is no longer in use because of the limited storage of the single directory. This system was implemented when we used storage devices such as a floppy disk with equivalent storage to a single directory.