UNIT TITLE: COMPUTER OPERATING SYSTEM
TOPIC 1: UNDERSTAND SECONDARY STORAGE
MANAGEMENT
1.0 Introduction
In computing, secondary storage (also called auxiliary storage or external memory) refers
to non-volatile devices that store data permanently, even when the computer is turned off.
Unlike primary memory (RAM), which is temporary and limited, secondary storage
provides long-term data retention and large capacity.
Examples include:
• Hard Disk Drives (HDD)
• Solid State Drives (SSD)
• Optical Discs (CD, DVD, Blu-ray)
• USB Flash Drives
• External Drives and Cloud Storage
Secondary storage is essential for storing the operating system, application software, and user
data such as documents, images, and videos.
2.0 Disk Structure
A disk (especially a hard disk) is made up of multiple platters coated with magnetic material.
Each platter is divided into tracks, sectors, and cylinders.
Components of Disk Structure:
1. Platter:
The circular disk where data is magnetically stored.
2. Track:
A concentric circle on the surface of the platter where data is written.
3. Sector:
A section of a track — the smallest unit of storage on a disk (commonly 512 bytes or
4 KB).
4. Cylinder:
A group of tracks located vertically on all platters that share the same radius.
5. Cluster:
A group of sectors that the OS treats as a single unit for data management.
Diagram (description):
Imagine a series of rings (tracks) on a CD. Each ring is divided into small slices (sectors).
The combination of rings at the same distance across multiple platters forms a cylinder.
3.0 Disk Management
Disk Management refers to the set of operations performed by the operating system to
control how data is stored, organized, retrieved, and maintained on secondary storage.
Functions of Disk Management:
1. Partitioning:
Dividing a physical disk into separate logical parts called partitions.
2. Formatting:
Preparing a partition for use by an operating system, creating file systems (e.g.,
NTFS, FAT32, EXT4).
3. Defragmentation:
Reorganizing fragmented data to improve access speed.
4. Mounting/Unmounting:
Making disks accessible or safely removing them.
5. Error Checking and Repair:
Detecting and fixing disk errors (using tools like CHKDSK).
6. Backup and Recovery:
Ensuring data safety through duplication and restoration procedures.
4.0 Disk Scheduling
Disk scheduling determines the order in which disk I/O requests are processed to improve
performance.
Since the disk arm moves physically, minimizing seek time improves speed.
Common Scheduling Algorithms:
Algorithm Description Advantage Limitation
FCFS (First Requests are served in the Simple and Slow average
Come First Serve) order they arrive. fair. response time.
SSTF (Shortest Serves the request nearest to Faster than May cause
Seek Time First) current head position. FCFS. starvation for
distant requests.
SCAN (Elevator Head moves in one direction, Reduces arm May delay requests
Algorithm) serving all requests, then movement. on far ends.
reverses.
C-SCAN Similar to SCAN, but returns Uniform wait More arm
(Circular SCAN) immediately to start instead time. movement.
of reversing.
5.0 Disk Performance and Optimization
To ensure smooth disk operation, operating systems employ various optimization techniques:
• Caching: Temporarily storing frequently accessed data.
• Buffering: Using memory to balance read/write speed differences.
• Spooling: Queuing print or I/O jobs for efficient processing.
• Compression: Reducing file size to save space.
• Disk Quotas: Limiting user space usage on shared systems.
6.0 Disk Maintenance and Protection
Regular maintenance helps prevent data loss and prolong disk life:
• Perform regular backups to external drives or cloud.
• Use antivirus and firewall protection.
• Avoid sudden shutdowns and physical shocks.
• Monitor SMART disk health indicators.
• Keep disks clean and ventilated to avoid overheating.
7.0 Importance of Secondary Storage Management
Effective secondary storage management ensures:
• Reliable data storage and retrieval
• Faster system performance
• Extended hardware lifespan
• Improved organization and efficiency
• Data integrity and recovery in case of failure
TOPIC 2: UNDERSTAND FILE MANAGEMENT
SYSTEMS
1.0 Introduction
A File Management System (FMS) is a crucial part of an operating system that controls
how data is created, organized, stored, retrieved, and secured on secondary storage.
It provides the structure that allows users and applications to easily locate and manage files.
A file is a collection of related information recorded on a secondary storage device, such as a
hard disk or SSD.
Examples include text documents, images, videos, software programs, and databases.
2.0 Objectives of File Management
The main objectives of file management are:
• To ensure efficient data storage and retrieval
• To provide security and access control
• To support data sharing among multiple users or applications
• To maintain data integrity and consistency
• To organize and structure stored information logically
3.0 File Organization
File organization refers to the way records are arranged and accessed within a file.
Choosing the right organization method impacts access speed and efficiency.
Types of File Organization:
Type Description Advantages Disadvantages
Sequential Records are stored one Simple and Slow for random
Organization after another, usually in efficient for batch access.
order of creation or key processing.
value.
Indexed Combines sequential Speeds up search More complex and
Sequential storage with an index for operations. requires extra space
Organization faster access. for index.
Direct (Random) Records are stored in Very fast access Collisions may occur;
Organization locations determined by for direct not ideal for
a hashing function. lookups. sequential reads.
Heap Records are stored in any Easy to insert Slow searching and
Organization available space; no new data. sorting.
specific order.
Example:
Bank transaction files may use sequential organization for daily processing, while database
systems often use indexed sequential or random organization.
4.0 File Operations
Operating systems provide a set of operations to manipulate files effectively.
Common File Operations:
1. Creation: Making a new file and allocating space for it.
2. Opening: Preparing the file for reading or writing.
3. Reading: Retrieving data from a file.
4. Writing: Adding or modifying data.
5. Appending: Adding data at the end of a file.
6. Closing: Releasing system resources used by the file.
7. Deleting: Removing a file permanently.
8. Renaming: Changing the file’s name or location.
Note:
The OS uses a File Control Block (FCB) to store file metadata (e.g., file size, creation date,
permissions).
5.0 Directory Structure
Directories help organize files systematically and enable efficient file management.
Types of Directory Structures:
Type Description Example
Single-level All files stored in one directory. Simple but confusing for
Directory many files.
Two-level Each user has their own directory under Good for multi-user
Directory the root. systems.
Tree-structured Files organized in a hierarchical tree Most common (e.g.,
Directory (folders, subfolders). Windows, Linux).
Acyclic Graph Files can appear in multiple directories Flexible but complex to
Directory via shortcuts or links. manage.
General Graph Allows complete freedom in linking May cause loops and
Directory files and directories. confusion.
Example:
Windows uses a tree structure with directories like:
C:\Users\Documents\Projects\[Link]
6.0 File Access Methods
Access methods define how information is retrieved from a file.
Types:
• Sequential Access: Data read in order, from beginning to end (e.g., audio, video
files).
• Direct Access: Data read from any location using its address (e.g., databases).
• Indexed Access: Uses an index to locate data quickly (e.g., search engines, libraries).
7.0 File Protection and Security
File protection ensures that data is secure from unauthorized access or modification.
Techniques include:
1. Access Rights:
o Read (R): View only
o Write (W): Modify
o Execute (X): Run a program
o Delete (D): Remove the file
2. Authentication:
o Verifying user identity through passwords or biometrics.
3. Encryption:
o Encoding data so only authorized users can read it.
4. Backups:
o Regular copies to prevent loss due to damage or corruption.
5. Permissions Models:
o Role-based access (e.g., Administrator, Guest, User).
8.0 Importance of File Management
Effective file management ensures:
• Easy access to data and improved efficiency
• Data consistency and integrity
• Reduced duplication and storage wastage
• Protection of sensitive information
• Smooth sharing of data among users and applications
9.0 Common File Systems
Operating systems use file systems to define how data is stored and organized on storage
devices.
OS Common File System Description
Windows FAT32, NTFS NTFS supports permissions and large files.
Linux EXT3, EXT4 Supports journaling and better security.
macOS APFS, HFS+ Optimized for flash and SSD storage.