Logo

dev-resources.site

for different kinds of informations.

Storage Management: Operating System

Published at
1/3/2025
Categories
os
linux
ubuntu
beginners
Author
harshm03
Categories
4 categories in total
os
open
linux
open
ubuntu
open
beginners
open
Author
8 person written this
harshm03
open
Storage Management: Operating System

Guide to Storage Management and Magnetic Disks


Introduction to Storage Management

Storage management refers to the strategies, methods, and tools used to optimize the storage, retrieval, and organization of data within a computer system. It encompasses primary storage (RAM), secondary storage (e.g., hard drives, SSDs), and tertiary storage (e.g., tapes, optical disks).


Magnetic Disks

Magnetic disks are the backbone of secondary storage in modern computing, offering cost-effective and reliable storage for large amounts of data. They are designed to store information magnetically on rotating platters.


Structure of a Magnetic Disk

  1. Disk Platter:

    • Flat, circular disks made of a non-magnetic material coated with a magnetic layer.
    • Common diameters: 1.8 to 3.5 inches.
  2. Tracks:

    • Concentric circles on the platter where data is magnetically recorded.
    • Tracks are divided into sectors, the smallest addressable unit on the disk.
  3. Cylinders:

    • A set of tracks vertically aligned across all platters at a given arm position.
  4. Sectors:

    • Small segments of tracks where actual data is stored.
    • Typically, sectors are 512 bytes or 4 KB in size.
  5. Read-Write Heads:

    • Mechanisms that β€œfly” just above the platter surface to read or write data.
    • There is one head for each platter surface.
  6. Arm Assembly:

    • Moves the read-write heads across the platter surface to access data.
  7. Spindle:

    • Rotates the platters at high speed (measured in RPM).

Disk Speed

  1. Rotational Speed:

    • Determines how fast the platter spins.
    • Common RPM values: 5,400, 7,200, 10,000, 15,000.
  2. Transfer Rate:

    • The speed at which data is transferred between the disk and the computer.
    • Measured in megabytes per second (MB/s).
  3. Positioning Time (Random Access Time):

    • The total time required to access a specific piece of data.
    • Seek Time: Time to move the read-write head to the correct track.
    • Rotational Latency: Time for the desired sector to rotate under the head.

Disk Scheduling Algorithms

Disk scheduling algorithms optimize the order in which read/write requests are processed, reducing seek time and improving overall system performance.

1. First-Come, First-Served (FCFS)

  • Requests are processed in the order they arrive.
  • Advantages:
    • Simple and fair.
  • Disadvantages:
    • May result in long seek times due to unoptimized movement.

2. Shortest Seek Time First (SSTF)

  • Requests closest to the current head position are served first.
  • Advantages:
    • Reduces seek time compared to FCFS.
  • Disadvantages:
    • May cause starvation for requests far from the head.

3. SCAN (Elevator Algorithm)

  • The head moves in one direction, servicing requests until it reaches the end, then reverses direction.
  • Advantages:
    • Reduces variance in response times.
  • Disadvantages:
    • Some requests may wait longer if they are in the direction not currently being serviced.

4. CSCAN (Circular SCAN)

  • Similar to SCAN, but after reaching the end, the head returns directly to the beginning without servicing requests on the way back.
  • Advantages:
    • Provides a more uniform response time than SCAN.
  • Disadvantages:
    • Higher initial seek time when the head jumps back to the start.

5. LOOK

  • Similar to SCAN but stops when no more requests exist in the current direction.
  • Advantages:
    • Reduces unnecessary movement compared to SCAN.
  • Disadvantages:
    • May still cause some delays for distant requests.

6. CLOOK

  • Similar to CSCAN but stops at the last request in the direction before jumping back to the start.
  • Advantages:
    • More efficient than CSCAN in some cases.
  • Disadvantages:
    • Increased complexity compared to SCAN or LOOK.

Key Metrics in Disk Scheduling

  1. Seek Time: Time to move the disk head to the desired track.
  2. Rotational Latency: Time to rotate the desired sector under the head.
  3. Throughput: Number of requests serviced in a given time period.
  4. Response Time: Total time from request submission to completion.

Conclusion

Effective storage management is crucial for maintaining the performance and reliability of a computer system. Magnetic disks, with their intricate structure and operations, form the cornerstone of secondary storage. Optimizing their usage through disk scheduling algorithms like FCFS, SSTF, SCAN, and others ensures reduced latency, increased throughput, and balanced resource utilization.

os Article's
30 articles in total
Favicon
Critical Section Problem: Process Synchronization
Favicon
Reader Writer Problem: Process Synchronization
Favicon
Protection and Security: Operating System
Favicon
Storage Management: Operating System
Favicon
Process Management: Operating System
Favicon
Introduction to Operating System
Favicon
Memory Management: Operating System
Favicon
Process Synchronization and Deadlock: Operating System
Favicon
OpenBSD 7.5 γ‚’ 7.6 へ をップグレード
Favicon
Understanding Commodore Operating Systems
Favicon
NixOS - A Unique Linux Distribution
Favicon
Remove Windows software completely
Favicon
OpenBSD Upgrade 7.5 to 7.6
Favicon
Chrome OS Guide to go from Zero to DevOps Hero in a nutshell
Favicon
Understanding the Core Components of an Operating System and How They Work
Favicon
Contribuindo para o FreeBSD
Favicon
Unveiling the Magic Behind Your Computer: A Deep Dive into Operating Systems
Favicon
10 Useful but Rarely Used OS Functions in Python
Favicon
How to Fix Lenovo Thinkpad X1 Extreme Gen freezing without blue screen
Favicon
Unlock 1 Billion NYC Taxi Rides: A Step-by-Step Guide
Favicon
Overlooked Vulnerabilities in Modern Mobile Operating Systems: A Comprehensive Guide
Favicon
OS Development (The truth)
Favicon
Building a 32-Bit Operating System: A Beginner-Friendly Project
Favicon
Kernel vs Operating System
Favicon
Deadlock | Valorant
Favicon
chroot system call
Favicon
How the Operating System Manages Hardware Resources in a Complete System
Favicon
Total Madness #2: Async Locks
Favicon
10 Livros sobre Sistemas Operacionais que vale a pena vocΓͺ ler
Favicon
πŸ–₯️ Windows vs macOS: The AI Security Showdown πŸ›‘οΈ

Featured ones: