Election Day- Use Code DEMOCRACY24

Register Now

Operating Systems (File System) - Part 7

Published on Saturday, February 27, 2016
Hi Folks,
operating system
Continuing with Operating system, we'll cover File System today. Previous article on 'Memory Management' Can be found at click here. Raise your doubts/feedback in comments section.

This article is a part of PK Series for IT officers exam.

What is a file?

A file is a collection of data or information which has a name. A file system is the way in which files are named and stored and retrieved logically. Attributes of a file are listed as below:
  • Name - in human readable form
  • Identifier - unique number which identifies a file within a file system.
  • Type - text file, executable file, program file
  • Location - pointer to location on device
  • Size - file size in b/kb/mb
  • Protection - authorizations about reading, writing and executing
  • Time, Date and User Identification- for security and monitoring purpose
  • Metadata about files stored on the disk
  • Operations - create, write, read, delete, truncate, open, close etc. 
Common file types and their extensions are listed below:
  • executable - .exe, .com, .bin
  • object - .obj
  • source code - .c, .cc, .java, .pas
  • text - .doc, .txt
  • batch - .bat, .sh
  • word processor - .wp, .rtf, .doc
  • library - .lib, .dll
  • print or view - .ps, .pdf, .jpg
  • archive - .arc, .zip, .tar
  • multimedia - .mov, .mpeg, .avi, .mp3

File Format and File Access Methods

File format is the structure of how information is stored in a file. There are different formats for storing specific types of information as has been explained above with files and their extensions.

File access refers to the manner in which information of file can be accesses. There are three knows ways to access a file:

1. Sequential Access

In this, information in the file is processed in a specific order i.e one record after another. Compilers access files sequentially.

2. Direct Access 

In this, records need not to be accessed in any sequence. Each record has its own address and thus can be directly accessed by referencing that address.

3. Indexed Sequential Access

Its an extension of sequential access in which an index is create for a file which contains pointers to memory blocks. These pointers are used to access files directly.

File system Layers

Let's look at the flow diagram below and then understand about roles of layers of a file system.
File System

1. Device Drivers

They manage I/O devices at I/O control layer.

2. Basic file system

It translates the commands to device driver. Along with that, it manages memory buffers and caches.

3. File Organization Module

It understand logical address and physical blocks and translates logical to physical . It also manages free space and disk allocation.

4. Logical File System 

It manages metadata i.e information about files in the file system by maintaining file control blocks (inodes in unix).

5. Application Programs

They use the information with in a file and manipulate it.

Partitions and Mounting

A partition can be a volume on disk containing a file system or without it (raw). Root partition contains the OS usually the primary one.

Mounting takes place before a computer can use any kind of storage device. A mount point is a physical location in the partition. Mount point forms the connection between file system containing the mount point and file system to be mount. File systems can be mounted in below ways in UNIX:
  • manually with 'MOUNT' command
  • Automatically upon system boot. Information for that is stored in /etc/fstab file. 
  • Automatically when the file system is accesses, also called auto mounting. E.g.- Plug and Play USBs when used over linux distributions. In early days of linux, external flash drives had to be mounted manually before accessing.

 OS fact of the day

 Android operating system was developed by Android Inc in 2004. Later google bought it in 2005 at price of $50 million. Its a Linux based software system.
ebook store

About us

ramandeep singh

Ramandeep Singh, your guide to banking and insurance exams. With 14 years of experience and 5000+ selections, Ramandeep understands the path to success, having transitioned himself from Dena Bank and SBI. He's passionate about helping you achieve your banking and insurance dreams.

  • Follow me:
Close Menu
Close Menu