Storage Management
Storage Management
Disk Management
Disk management focuses on organizing, formatting, and controlling storage devices like hard
drives and SSDs. It ensures proper data access and management.
1. Partitioning:
Divides a disk into sections, with each partition acting as a separate logical disk.
Types of partitions:
o Primary Partition: The main bootable sections of the disk.
o Extended Partition: Contains multiple logical drives.
2. Formatting:
Prepares partitions by creating a file system such as FAT32, NTFS, or ext4.
Adds metadata like file allocation tables or anode’s for data organization.
3. Mounting and Unmounting:
Mounting: Links a partition or device to the operating system's file system tree.
Unmounting: Disconnects the device safely, ensuring all data has been written.
4. Bad Block Management:
Identifies damaged disk sectors to prevent data loss.
Uses techniques like error correction and reallocation to handle bad blocks.
Disk Scheduling
Disk scheduling determines the sequence in which disk I/O requests are processed, aiming to
optimize seek time, latency, and throughput.
1. Objectives of Disk Scheduling:
Minimize seek time: Time taken to move the disk head to the correct position.
Minimize rotational latency: Delay caused by waiting for the disk to rotate to the correct
sector.
Fair allocation of disk resources among processes.
2. Disk Scheduling Algorithms:
First-Come, First-Served (FCFS): Processes requests in the order they arrive.
o Simple but can lead to poor performance if requests are scattered.
Shortest Seek Time First (SSTF): Prioritizes the nearest request.
o Reduces seek time but can cause starvation of distant requests.
Disk Structure
Disk structure describes how data is physically and logically organized on a storage device.
1. Physical Disk Structure:
Platters: Disks have multiple spinning platters coated with magnetic material.
Tracks: Concentric circles on each platter.
Sectors: Tracks are divided into small storage units called sectors, typically 512 bytes or
4 KB in size.
Cylinders: A group of tracks at the same distance from the spindle across all platters.
2. Logical Disk Structure:
File systems abstract physical storage into logical structures like files, directories, and
metadata.
Logical structures include:
o File Allocation Table (FAT): Maps files to their corresponding disk sectors.
o Inodes: Store metadata about files, such as size, type, and permissions.
3. Formatting:
Low-Level Formatting: Divides the disk into sectors and creates sector headers for data
synchronization.
High-Level Formatting: Creates a file system, organizing the logical structure for user
data.
Swap-Space Management
Swap space is a part of secondary storage used to supplement physical memory. It extends virtual
memory and allows multitasking even when RAM is full.
1. Purpose:
Temporarily stores pages of processes not currently in use.
Helps maintain system performance during memory overcommitment.
2. Types of Swap Space Allocation:
Fixed Allocation: Pre-allocated space reserved for swap during system setup.
Dynamic Allocation: Space is allocated and released as needed, depending on demand.
3. Swap Implementation Methods:
Swap Partition: A dedicated disk partition exclusively for swap.
Swap File: A file within the file system used as swap space.
4. Optimization Techniques:
Place swap partitions on fast disks (e.g., SSDs) for better performance.
Configure sufficient swap space to handle peak memory demands.