How the operating system helps in file system management and communication process?

In a computer, a file system -- sometimes written filesystem -- is the way in which files are named and where they are placed logically for storage and retrieval. Without a file system, stored information wouldn't be isolated into individual files and would be difficult to identify and retrieve. As data capacities increase, the organization and accessibility of individual files are becoming even more important in data storage.

Digital file systems and files are named for and modeled after paper-based filing systems using the same logic-based method of storing and retrieving documents.

File systems can differ between operating systems (OS), such as Microsoft Windows, macOS and Linux-based systems. Some file systems are designed for specific applications. Major types of file systems include distributed file systems, disk-based file systems and special purpose file systems.

How file systems work

A file system stores and organizes data and can be thought of as a type of index for all the data contained in a storage device. These devices can include hard drives, optical drives and flash drives.

File systems specify conventions for naming files, including the maximum number of characters in a name, which characters can be used and, in some systems, how long the file name suffix can be. In many file systems, file names are not case sensitive.

Along with the file itself, file systems contain information such as the size of the file, as well as its attributes, location and hierarchy in the directory in the metadata. Metadata can also identify free blocks of available storage on the drive and how much space is available.

How the operating system helps in file system management and communication process?
Example of a file tree diagram

A file system also includes a format to specify the path to a file through the structure of directories. A file is placed in a directory -- or a folder in Windows OS -- or subdirectory at the desired place in the tree structure. PC and mobile OSes have file systems in which files are placed somewhere in a hierarchical tree structure.

Before files and directories are created on the storage medium, partitions should be put into place. A partition is a region of the hard disk or other storage that the OS manages separately. One file system is contained in the primary partition, and some OSes allow for multiple partitions on one disk. In this situation, if one file system gets corrupted, the data in a different partition will be safe.

File systems and the role of metadata

File systems use metadata to store and retrieve files. Examples of metadata tags include:

  • Date created
  • Date modified
  • Last date of access
  • Last backup
  • User ID of the file creator
  • Access permissions
  • File size

Metadata is stored separately from the contents of the file, with many file systems storing the file names in separate directory entries. Some metadata may be kept in the directory, whereas other metadata may be kept in a structure called an inode.

In Unix-like operating systems, an inode can store metadata unrelated to the content of the file itself. The inode indexes information by number, which can be used to access the location of the file and then the file itself.

An example of a file system that capitalizes on metadata is OS X, the OS used by Apple. It allows for a number of optimization features, including file names that can stretch to 255 characters.

File system access

File systems can also restrict read and write access to a particular group of users. Passwords are the easiest way to do this. Along with controlling who can modify or read files, restricting access can ensure that data modification is controlled and limited.

File permissions such as access or capability control lists can also be used to moderate file system access. These types of mechanisms are useful to prevent access by regular users, but not as effective against outside intruders.

Encrypting files can also prevent user access, but it is focused more on protecting systems from outside attacks. An encryption key can be applied to unencrypted text to encrypt it, or the key can be used to decrypt encrypted text. Only users with the key can access the file. With encryption, the file system does not need to know the encryption key to manage the data effectively.

Types of file systems

There are a number of types of file systems, all with different logical structures and properties, such as speed and size. The type of file system can differ by OS and the needs of that OS. The three most common PC operating systems are Microsoft Windows, Mac OS X and Linux. Mobile OSes include Apple iOS and Google Android.

Major file systems include the following:

File allocation table (FAT) is supported by the Microsoft Windows OS. FAT is considered simple and reliable, and it is modeled after legacy file systems. FAT was designed in 1977 for floppy disks, but was later adapted for hard disks. While efficient and compatible with most current OSes, FAT cannot match the performance and scalability of more modern file systems.

Global file system (GFS) is a file system for the Linux OS, and it is a shared disk file system. GFS offers direct access to shared block storage and can be used as a local file system.

GFS2 is an updated version with features not included in the original GFS, such as an updated metadata system. Under the terms of the GNU General Public License, both the GFS and GFS2 file systems are available as free software.

Hierarchical file system (HFS) was developed for use with Mac operating systems. HFS can also be referred to as Mac OS Standard, and it was succeeded by Mac OS Extended. Originally introduced in 1985 for floppy and hard disks, HFS replaced the original Macintosh file system. It can also be used on CD-ROMs.

The NT file system -- also known as the New Technology File System (NTFS) -- is the default file system for Windows products from Windows NT 3.1 OS onward. Improvements from the previous FAT file system include better metadata support, performance and use of disk space. NTFS is also supported in the Linux OS through a free, open-source NTFS driver. Mac OSes have read-only support for NTFS.

Universal Disk Format (UDF) is a vendor-neutral file system used on optical media and DVDs. UDF replaces the ISO 9660 file system and is the official file system for DVD video and audio as chosen by the DVD Forum.

File system vs. DBMS

Like a file system, a database management system (DBMS) efficiently stores data that can be updated and retrieved. The two are not interchangeable, however. While a file system stores unstructured, often unrelated files, a DBMS is used to store and manage structured, related data.

A DBMS creates and defines the restraints for a database. A file system allows access to single files at a time and addresses each file individually. Because of this, functions such as redundancy are performed on an individual level, not by the file system itself. This makes a file system a much less consistent form of data storage than a DBMS, which maintains one repository of data that is defined once.

The centralized structure of a DBMS allows for easier file sharing than a file system and prevents anomalies that can occur when separate changes are made to files in a file system.

There are methods to protect files in a file system, but for heavy-duty security, a DBMS is the way to go. Security in a file system is determined by the OS, and it can be difficult to maintain over time as files are accessed and authorization is granted to users.

A DBMS keeps security constraints high, relying on password protection, encryption and limited authorization. More security does result in more obstacles when retrieving data, so in terms of general, simple-to-use file storage and retrieval, a file system may be preferred.

File systems definition evolves

While previously referring to physical, paper files, the term file system was used to refer to digital files as early as 1961. By 1964, it had entered general use to refer to computerized file systems.

The term file system can also refer to the part of an OS or an add-on program that supports a file system. Examples of such add-on file systems include the Network File System (NFS) and the Andrew File System (AFS).

In addition, the term has evolved to refer to the hardware used for nonvolatile storage, the software application that controls the hardware and architecture of both hardware and software.

How does an operating system help with file management?

The OS manages how data is organised into files. This makes it easier for the user to see files using programs like the Windows File Explorer or Mac OS X Finder. The OS organises where and how files are stored, deleted, read, found and repaired.

How the operating system helps keep your computer organized and manages files and folders?

The OS allows you to organize the contents of your computer in a hierarchical structure of directories that includes files, folders, libraries, and drives. Windows Explorer helps you manage your files and folders by showing the location and contents of every drive, folder, and file on your computer.

How does OS perform the function as a file manager?

It is done by allowing the user the access to shared files and public directories. The operating system must also protect it's file from system malfunctions or tampering of files. Allocating each file when the user is granted access to them, and recording their use.