File Systems

What is a File System?

A File System is generally known as a software program that facilitates organizing and managing files stored within the systems for the use of users and applications. The file management and organization may include accessing, updating as well as performing other file operations.

File organization and management is an important aspects of system operation.

Introduction to File

In simplest terminology, no matter what the content holds, an organized format of the information is called a file.

For instance, consider that we need to develop an application program, so, a program is itself a file. Along with that at the time of compilation of the program file, we get object code, also regarded as executable which is nothing but again a file. Basically, the output which the compiler gives is also a file.

Some other examples include when we download and save images from the internet which becomes an image file. Not only this, if the saved data is audio or video then it turns out to be an audio file or video file respectively.

This means everything within the system revolves around files.

If we discuss it from the basic level then we know that the computer is responsible for storing and processing information. There are two types of memories that are responsible for storage and operation functions and these are primary and secondary memory.

The primary one is of volatile nature and stores the data temporarily. This means that the information is only stored till the time, the system is connected to power and once power is lost, the whole information gets lost.

The secondary memory is quite different from the former one as it shows non-volatility. This corresponds to storing the data permanently even when power is lost as here data is stored on disks or drives. The data within secondary memory is stored and can be accessed later.

The data in the non-volatile memory can be made available to the web all the time and this data is regarded as a file.

All this discussion is made to make you understand that when information is stored within the system then at the time of using the system, the users are engaged in managing and organizing the files.

Organization of Files

When a user is working on a system, then his or her first need is able to access the required file which is present in the non-volatile memory. The file system within the computer must be such that it must locate the file when the user searches for the file.

Now, the question arises, how this can be achieved?

So, every file must have its unique identification i.e., file name.

Suppose there is a compiler operation, so the associated files of the compiler’s course include a combination of pages. In a similar way, if there is an operating system operation, then the file having the particular set of pages must be organized together at an individual basis.

Within a file system, multiple files are grouped together under a certain category. Under this category, a file folder is made that includes the compiler’s course pages and the OS course pages, for instance. The separate folders of compilers course and OS course are stored together within a separate folder. This folder-defining technique is defined by MAC OS.

The file organization is of hierarchical nature. We have already discussed that several files are distinguished by their distinct names.

Suppose there is a file named ReadMe that stores information regarding what is stored in each directory within the system. In a directory there can only be a single file with a name directory, however, within multiple subdirectories within this single directory, there can be another file that is named ReadMe.

However, sometimes the systems require to have distinction amongst file types and so here the files need specific name extensions as well.

For example, in the case of MSDOS, the executable files use extension .COM or .EXE. While in the case of C or Pascal compilers, the file extensions are like .c or .p, respectively.

File Attributes

Let us now discuss some fundamental file attributes:

  • Name: It is one of the basic attributes and is the only information that is present in a human-readable format.
  • Type: It is present where the system supports different types.
  • Identifier: A unique tag (number) is present that helps in the identification of files within the file system.
  • Size: The current size of the specific file.
  • Location: This shows the file location on the device through a pointer.
  • Protection: This attribute is associated with the controllability of files regarding who can read, write and execute the respective file.
  • Time and Date: This is used for data protection and security usage monitoring.

The directory structure stores the information regarding the files and all this is maintained within the disk.

File System Operation

Till now we have got the idea that an organized form of information is regarded as a file. For adequate and easy abstraction of files, it is necessary that files must be stored within the secondary memory in such a way that it exhibits a logical view. This depicts the physical sight of files within the system.

The file system in terms of software provides a logical view of any file within the system. While the same at another level gives the physical view of the operating system.

Hence, simply one can say that the operating system holds all the information of a file whenever like location, name, etc. when it is needed to be accessed for file-based operations.

As per operational needs, the user must have the ability to create a file within the system. The one who is responsible for file creation is regarded as the owner of the file. The creator of the file is entitled for saving, and storing the file, not only this, he is liable for reading or writing the contents within the file. For updating any file, write capability is necessarily required by the user.

Some other authorizations of the owner of the file are renaming, replicating, or deleting the file. Also, changes like cutting, copying, and pasting from a different file can also be done by the user.

If we talk about other management operations of the file system then it includes indicates showcasing who else other than the owner is authorized to perform read, write, or execute operations within this file. The movement of files between the directories is also done by the user.

In order to perform all these tasks within the system, the operating system provides adequate services. In Unix, visual editor vi is used for ASCII file editing. While for stream editing of files, editor sed is used.

The tabular representation given below shows the various file operations:

UsageEditor Based OperationOS Terminology
OpenUnder FILE menu OPENOPEN command exists with read/write operation
CloseUnder FILE menu CLOSE or QUITFile close option is present
CreateUnder FILE menu NEWCREATE command exists
ReadOpen to ReadSpecified at the time of open
WriteSave to WriteSpecified during open
Cut and PasteVia bufferCDE, desktop operation is used
Rename or CopyUse SAVE ASCopy command is used
DeleteUnder FILE use deleteCommand remove or delete is used
Join FilesConcatenation possible
RelocateCommand move is present

We must note here that file size information is quite necessary at the time of operation. More simply, the idea of a number of lines, words, or characters present in a file is necessary to have by the user. In shell commands, a suite of word-counting programs is needed. Sometimes, when there is a large number of files then longer file names are required. For example, for program files, the prefix ‘prog’ can be used.

Hence, we can say that a file system operation relies on various factors and the operating system is responsible for performing the same.

Leave a Reply

Your email address will not be published. Required fields are marked *