File Management in Operating System
Overview
File management is one of the basic but important features provided by the operating system. File management in the operating system is nothing but software that handles or manages the files (binary, text, pdf, docs, audio, video, etc.) present in computer software.
The file system in the operating system is capable of managing individual as well as groups of files present in the computer system. The file system in the operating system tells us about the location, owner, time of creation and modification, type, and state of a file present on the computer system.
What is File Management in an Operating System?
Before learning about the file system in the operating system, let us first get a good grasp of operating systems and files.
Files is a collection of co-related information that is recorded in some format (such as text, pdf, docs, etc.) and is stored on various storage mediums such as flash drives, hard disk drives (HDD), magnetic tapes, optical disks, and tapes, etc. Files can be read-only or read-write. Files are simply used as a medium for providing input(s) and getting output(s).
Now, an Operating System is nothing but a software program that acts as an interface between the hardware, the application software, and the users. The main aim of an operating system is to manage all the computer resources. So, we can simply say that the operating system gives a platform to the application software and other system software to perform their task.
Refer to the diagram below to understand the value and working of the operating system.
The features of an operating system are:
- Provide security to system and application software.
- memory management.
- disk management.
- I/O operations.
- file management, etc.
So, file management is one of the basic but important features provided by the operating system. The file management in the operating system is nothing but software that handles or manages the files (binary, text, pdf, docs, audio, video, etc.) present in computer software. The file system in the operating system is capable of managing individual as well as groups of files present in the computer system.
The file management in the operating system manages all the files present in the computer system with various extensions (such as .exe, .pdf, .txt, .docx, etc.)
We can also use the file system in the operating system to get details of any file(s) present on our system. The details can be:
- location of the file (the logical location where the file is stored in the computer system)
- the owner of the file (who can read or write on the particular file)
- when was the file created (time of file creation and modification time)
- a type of file (format of the file for example text, pdfs, docs, etc.)
- state of completion of the file, etc.
For file management in the operating system or to make the operating system understand a file, the file must be in a predefined structure or format. There are three types of file structures present in the operating systems:
-
text file: A text file is a non-executable file containing a sequence of numbers, symbols, and letters organized in the form of lines.
-
source file: A source file is an executable file that contains a series of functions and processes. In simple terms, we can say that a source file is a file that contains the instructions of a program.
-
object file: An object file is a file that contains object codes in the form of assembling language code or machine language code. In simple terms, we can say that object files contain program instructions in the form of a series of bytes and are organized in the form of blocks.
Properties of File Management in Operating System
After learning about the properties of file management in operating systems, let us now learn about the properties of file management in operating systems.
-
The files are arranged or grouped into a more complex structure i.e. tree which reflects the relationship between the various files. File systems work in a similar way to the way that libraries organize books. Hierarchical file systems usually have a special directory at the root. It can be imagined to be similar to a tree.
Refer to the structure provided below for better visualization.
-
Every file is associated with some name and some access permissions that tell us who can access the files in which mode (read or write).
Refer to the example below for a better understanding.
In the example above, we have the access permission depicted for a particular file. Here r tells that the file is readable, w tells that the file is writeable, and x tells us that the file is executable. While the dash (-) symbol says no permission is given.
Now as we know in LINUX-based OS, there are three permission groups (owner, group, and other). The first character tells us the type of file (either file or directory). Now the next three characters represent the permission of the owner, the next three represent the permissions of a group and the last three characters represent the permissions of the other.
-
Whenever a user logs off then the file stored on the secondary storage device does not get erased. If the data is stored in the primary memory like RAM the data gets lost.
Functions of File Management in Operating System
Now let us talk about some of the most important functions of file management in operating systems.
- Allows users to create, modify, and delete files on the computer system.
- Manages the locations of files present on the secondary memory or primary memory.
- Manages and handles the permissions of a particular file for various users and groups.
- Organizes the files in a tree-like structure for better visualization.
- Provides interface to I/O operations.
- Secures files from unauthorized access and hackers.
Objectives of File Management in Operating System
In the last section, we gained a good basic understanding of files, operating systems, and file management in operating systems. Let us now learn some of the objectives of file management in operating systems.
-
The file management in the operating system allows users to create a new file, and modify and delete the old files present at different locations of the computer system.
-
The operating system file management software manages the locations of the file store so that files can be extracted easily.
-
As we know, process shares files so, one of the most important features of file management in operating systems is to make files sharable between processes. It helps the various processes to securely access the required information from a file.
-
The operating system file management software also manages the files so that there is very little chance of data loss or data destruction.
-
The file management in the operating system provides input-output operation support to the files so that the data can be written, read, or extracted from the file(s).
-
It also provides a standard input-output interface for the user and system processes. The simple interface allows the easy and fast modification of data.
-
The file management in the operating system also manages the various user permissions present on a file. There is three user permission provided by the operating system, they are: read, write, and execute.
-
The file management in the operating system supports various types of storage devices such as flash drives, hard disk drives (HDD), magnetic tapes, optical disks, tapes, etc., and it also allows the user(s) to store and extract them conveniently.
-
It also organizes the files in a hierarchal manner in the form of files and folders (directories) so that management of these files can be easier from the user's perspective as well. Refer to the diagram below for better visualization.
Advantages of File Management in OS
Some of the main advantages that the file system in the operating system provides are:
-
Protection of the files from unauthorized access.
-
Recovers the free space created when files are removed or deleted from the hard disk.
-
Assigns the disk space to various files with the help of disk management software of the operating system.
-
As we know, a file may be stored at various locations in the form of segments so the file management in the operating system also keeps track of all the blocks or segments of a particular file.
-
Helps to manage the various user permissions so that only authorized persons can perform the file modifications.
-
It also keeps our files secure from hackers with the help of security management in the operating system.
Disadvantages of File Management in OS
Some of the main advantages that the file system in the operating system provides are:
-
If the size of the files becomes large then the management takes a good amount of time due to hierarchical order.
-
To get more advanced management features, we need an advanced version of the file management system. One of the advanced features is the document management feature (DMS) which can organize important documents.
-
The file system in the operating system can only manage the local files present in the computer system.
-
Security can be an issue sometimes as a virus in a file can spread across the various other files due to tree-like (hierarchal) structure.
-
Due to the hierarchal structure, file accessing can be slow sometimes.
Examples of File Management in Operating System
An example of file management in the operating system is a file manager or a file browser. File browsers are user interface that is developed to manage various files and folders present in the operating system.
Some of the most common operations provided by the file browser of almost every operating system are:
- file creation.
- file modification.
- file deletion.
- file transfer.
- file renaming.
- file copying and moving.
- changing file creation.
Examples of file browsers are:
- Windows file manager (This PC).
- Finder.
- Dolphin.
- One Drive.
- GNOME Files, etc.
Take your first step towards mastering operating systems. Enroll in our Free Operating System course and develop a comprehensive understanding of OS.
Conclusion
- File management is one of the basic but important features provided by the operating system. File management in the operating system is software that handles or manages the files present in computer software.
- The file system in the operating system is capable of managing individual as well as a group of files present in the computer system.
- The file system in the operating system tells us about the location, owner, time of creation and modification, type, and state of a file present on the computer system.
- The file management in the operating system allows users to create a new file, and modify and delete the old files present at different locations of the computer system.
- Processes share files so the file management in the operating system makes files sharable between processes. It helps the various processes to securely access the required information from a file.
- The file management in the operating system provides input-output operation support to the files so that the data can be written, read, or extracted from the file(s).
- It organizes the files in a hierarchal manner in the form of files and folders (directories) so that management of these files can be easier from the user's perspective as well.