hamburger

Operating System: File Systems

By BYJU'S Exam Prep

Updated on: September 25th, 2023

An operating system is a fundamental software component that manages computer hardware and software resources, providing a platform for other software applications to run efficiently. Among its many crucial functions, an operating system includes the management of file systems. A file system is a method of organizing and storing files on a computer or other storage devices, enabling users and applications to access and manipulate data.

It provides a structured and efficient way to store, retrieve, and manage files, ensuring data integrity, security, and efficient utilization of storage space. In this article, we will explore the role of file systems in operating systems, examining their key features, and types, and how they contribute to the overall functionality and performance of computer systems.

Download Complete Operating System Formula Notes PDF

Download Formula Notes PDF for Compiler Design

Operating System: File Systems

Logically related data items on the secondary storage are usually organized into named collections called files. A file may contain a report or an executable program as a set of commands to the operating system. A file often appears to the users as a linear array of characters or record structures.

The file system consists of two parts:

  1. A collection of files
  2. A directory structure

The file management system can be implemented as one or more layers of the operating system.

The common responsibilities of the file management system include the following

  • Mapping of access requests from logical to physical file address space.
  • Transmission of file elements between main and secondary storage.
  • Management of the secondary storage such as keeping track of the status allocation and deallocation of space.
  • Support for the protection and sharing of files and the recovery and possible restoration of the files after system crashes.

File Attributes

Each file is referred to by its name. The file is named for the convenience of the users and when a file is named, it becomes independent of the user and the process. Below are file attributes

  • Name
  • Type
  • Location
  • Size
  • Protection
  • Time and date

Disk Scheduling

One of the responsibilities of the OS is to use the hardware efficiently. For the disk drives, meeting this responsibility entails having fast access time and large disk bandwidth.

Access time has two major components

  • Seek time is the time for the disk arm to move the heads to the cylinder containing the desired sector.
  • The rotational latency is the additional time for the disk to rotate the desired sector to the disk head. It is not fixed, so we can take the average value.

Disk Scheduling

Disk bandwidth is the total number of bytes transferred, divided by the total time between the first service and the completion of the last transfer.

FCFS Scheduling

This is also known as First In First Out (FIFO) simply queues processes in the order that they arrive in the ready queue.

The following features which FIFO schedule has.

  • First come first served scheduling.
  • Processes request sequentially.
  • Fair to all processes, but it generally does not provide the fastest service.

FCFS Scheduling

Shortest Seek Time First (SSTF) Scheduling

It selects the request with the minimum seek time from the current head position. SSTF scheduling is a form of SJF scheduling that may cause starvation of some requests. It is not an optimal algorithm but its improvement over FCFS.

Shortest Seek Time First (SSTF) Scheduling

SCAN Scheduling

In the SCAN algorithm, the disk arm starts at one end of the disk and moves toward the other end, servicing requests as it reaches each cylinder until it gets to the other end of the disk. At the other end, the direction of head movement is reversed and servicing continues. The head continuously scans back and forth across the disk. The SCAN algorithm is sometimes called the elevator algorithm since the disk arm behaves just like an elevator in a building, first servicing all the requests going up and then reversing to service requests the other way.

SCAN Scheduling

C-SCAN Scheduling

Circular SCAN is a variant of SCAN, which is designed to provide a more uniform wait time. Like SCAN, C-SCAN moves the head from one end of the disk to the other, servicing requests along the way. When the head reaches the other end, however, it immediately returns to the beginning of the disk without servicing any requests on the return trip. The C-SCAN scheduling algorithm essentially treats the cylinders as a circular list that wraps around from the final cylinder to the first one.

C-SCAN Scheduling

C-LOOK Scheduling

This is just an enhanced version of C-SCAN. In this, the scanning doesn’t go past the last request in the direction that it is moving. It too jumps to the other end but not all the way to the end. Just to the furthest request.

C-LOOK Scheduling

Download Byjus Exam Prep App for the best Preparation

Online Classroom Program

BYJU’S Exam Prep Test Series

Our Apps Playstore
POPULAR EXAMS
SSC and Bank
Other Exams
GradeStack Learning Pvt. Ltd.Windsor IT Park, Tower - A, 2nd Floor, Sector 125, Noida, Uttar Pradesh 201303 help@byjusexamprep.com
Home Practice Test Series Premium