Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Major Activities of an Operating System with Regard to Secondary Storage Management
Secondary storage devices are non-volatile devices where data is stored for long-term storage. Disks are the mainly used secondary storage devices, providing the bulk of secondary storage in modern operating systems.
The main activity performed in secondary storage management is disk scheduling. This involves determining the order in which disk I/O requests are serviced to minimize seek time and optimize performance. There are many disk scheduling algorithms, with the most important being FCFS, SSTF, SCAN, and LOOK scheduling.
All the disk scheduling algorithms are explained using the following requests for the disk −
10, 95, 23, 78, 80
First Come First Served (FCFS) Scheduling
In FCFS scheduling, requests are serviced in their arrival order. This algorithm is fair as it allows all requests a chance, but it does not provide the fastest possible service due to potentially large seek times.
In the above example, requests are serviced in arrival order: 10, 95, 23, 78, 80. The seek head starts at position 50.
Shortest Seek Time First (SSTF) Scheduling
In SSTF scheduling, the request closest to the current head position is served first. This minimizes seek time but may cause starvation for requests located far from the current head position.
In the above example, requests are serviced in order 23, 10, 78, 80, 95. Starting at 50, the algorithm picks 23 (closest), then 10, and continues with the remaining requests.
SCAN Scheduling
In SCAN scheduling (also called the elevator algorithm), the head moves in one direction servicing all requests until it reaches the end of the disk, then reverses direction. This provides more uniform wait times compared to SSTF.
