Understanding File Management System in Operating System

Abhishek
6 min readFeb 28, 2020

by Abhishek Yernagula(Data Science Student)

Introduction

File management is one of the basic and important features of operating system. Operating system is used to manage files of computer system. All the files with different extensions are managed by operating system.

A file is collection of specific information stored in the memory of computer system. File management is defined as the process of manipulating files in computer system, it management includes the process of creating, modifying and deleting the files.

The following are some of the tasks performed by file management of operating system of any computer system:

  1. It helps to create new files in computer system and placing them at the specific locations.
  2. It helps in easily and quickly locating these files in computer system.
  3. It makes the process of sharing of the files among different users very easy and user friendly.
  4. It helps to stores the files in separate folders known as directories. These directories help users to search file quickly or to manage the files according to their types or uses.
  5. It helps the user to modify the data of files or to modify the name of the file in the directories.

he above figure shows the general hierarchy of the storage in an operating system. In this figure the root directory is present at the highest level in the hierarchical structure. It includes all the subdirectories in which the files are stored. Subdirectory is a directory present inside another directory in the file storage system. The directory base storage system ensures better organization of files in the memory of the computer system.

Origin of the term

Before the advent of computers the term file system was used to describe a method of storing and retrieving paper documents. By 1961 the term was being applied to computerized filing alongside the original meaning. By 1964 it was in general use.

he file management of function in operating system (OS) is based on the following concepts:

  1. File Attributes
    It specifies the characteristics of the files such as type, date of last modification, size, location on disk etc. file attributes help the user to understand the value and location of files. File attributes is one most important feature. It is uses to describe all the information regarding particular file.
  2. File Operations
    It specifies the task that can be performed on a file such as opening and closing of file.
  3. File Access permission
    It specifies the access permissions related to a file such as read and write.
  4. File Systems
    It specifies the logical method of file storage in a computer system. Some of the commonly used files systems include FAT and NTFS.

The system may contain features like:

  • Assigning queued document numbers for processing
  • Owner and process mapping to track various stages of processing
  • Report generation
  • Notes
  • Status
  • Create, modify, copy, delete and other file operations

File systems and operating systems

  1. Unix and Unix-like operating systems

Unix like operating systems create a virtual file system, which makes all the files on all the devices appear to exist in a single hierarchy. This means, in those systems, there is one root directory, and every file existing on the system is located under it somewhere. Unix-like systems can use a RAM disk or network shared resource as its root directory.

2. Linux

Linux supports numerous file systems, but common choices for the system disk on a block device include XFS, JFS, and btrsfs. For raw flash without a flash translation layer(FTL) or Memory Technology Device(MTD), there are UBIFS, JFFS 2 and YAFFS, among others. SquashFS is a common compressed read-only file system.

3. macOS

macOS uses the Apple File System(APFS), which recently replaced a file system inherited from classic mac old called HFS Plus(HFS+). Apple also uses the term “Mac OS Extended” for HFS+.HFS Plus is a metadata-rich and case-preserving but (usually) case-insensitive file system. Due to the Unix roots of macOS, Unix permissions were added to HFS Plus. Later versions of HFS Plus added journaling to prevent corruption of the file system structure and introduced a number of optimizations to the allocation algorithms in an attempt to defragment files automatically without requiring an external defragmenter.

4. Microsoft Windows

Windows makes use of the FAT, NTFS, exFAT , Live File System and ReFS file systems (the last of these is only supported and usable in Windows Servers, Windows 8,8.1,10.

Aspects of file systems

1.Space management

File System Fragmentation occurs when unused space or single files are not contiguous. As a file system is used, files are created, modified and deleted. When a file is created the file system allocates space for the data. Some file systems permit or require specifying an initial space allocation and subsequent incremental allocations as the file grows. As files are deleted the space they were allocated eventually is considered available for use by other files. This creates alternating used and unused areas of various sizes. This is free space fragmentation. When a file is created and there is not an area of contiguous space available for its initial allocation the space must be assigned in fragments. When a file is modified such that it becomes larger it may exceed the space initially allocated to it, another allocation must be assigned elsewhere and the file becomes fragmented.

2. Filenames

A filename (or file name) is used to identify a storage location in the file system. Most file systems have restrictions on the length of filenames. In some file systems, filenames are not case sensitive(i.e., the names MYFILE and myfile refer to the same file in a directory); in others, filenames are case sensitive (i.e., the names MYFILE, MyFile , and myfile refer to three separate files that are in the same directory).

3. Directories

File systems typically have directories (also called folders) which allow the user to group files into separate collections. This may be implemented by associating the file name with an index in a table of contents or an inode in a Unix-like file system. Directory structures may be flat (i.e. linear), or allow hierarchies where directories may contain subdirectories. The first file system to support arbitrary hierarchies of directories was used in the Multics operating system.

File system as an abstract user interface

In some cases, a file system may not make use of a storage device but can be used to organize and represent access to any data, whether it is stored or dynamically generated (e.g. procfs).

Limitations

  1. Converting the type of a file system

It may be advantageous or necessary to have files in a different file system than they currently exist. Reasons include the need for an increase in the space requirements beyond the limits of the current file system. The depth of path may need to be increased beyond the restrictions of the file system. There may be performance or reliability considerations. Providing access to another operating system which does not support the existing file system is another reason.

2. Long file paths and long file names

In hierarchical file systems, files are accessed by means of a path that is a branching list of directories containing the file. Different file systems have different limits on the depth of the path. File systems also have a limit on the length of an individual filename.

Copying files with long names or located in paths of significant depth from one file system to another may cause undesirable results. This depends on how the utility doing the copying handles the discrepancy.

--

--

Abhishek

writer with epic wanderlust. finding beauty in the everyday. you’ve got this. nyc