Intro
Introduction to Resource Management
The operating system (OS) acts as the intermediary between the user and the hardware. One of its most important responsibilities is managing the computer’s resources.
These resources include:
- CPU – for processing tasks
- Memory – for temporary data storage
- Storage – for long-term data storage
- Input/Output (I/O) devices – for interaction with the system
By managing these efficiently, the OS ensures optimal performance, fairness among users, and security across all running processes.
CPU
CPU Management
The CPU is the brain of the computer, and the OS determines how it is used. Since multiple processes often compete for CPU time, the OS uses scheduling algorithms to decide which process runs next.
Common scheduling strategies include:
- Round Robin – gives each process a fixed time slot
- Priority Scheduling – assigns CPU based on priority levels
- Multilevel Queues – categorizes processes and uses different strategies for each group
The OS handles:
- Switching between tasks (context switching)
- Interrupt handling for urgent tasks
- Maintaining responsiveness and CPU utilization
Memory
Memory Management
The OS manages both the physical and virtual memory of a system. It ensures that each process has enough memory to execute safely without interfering with others.
Techniques used include:
- Partitioning – dividing memory into fixed or variable sizes
- Paging – splitting memory into equal-sized blocks for better allocation
- Virtual Memory – allowing programs to use more memory than physically available via disk swapping
Good memory management improves speed and prevents errors like crashes, memory leaks, and illegal access.
Storage
Storage & File Systems
The OS handles how data is stored, organized, and retrieved from hard drives and other storage devices. It provides the structure for saving files and manages file-related permissions.
Key responsibilities:
- Organizing data in files and directories
- Ensuring files are saved securely and efficiently
- Maintaining metadata, such as timestamps and file size
- Using disk scheduling algorithms to optimize performance
File systems like FAT32, NTFS, or ext4 define how the OS interacts with stored data.
I/O
I/O Device Management
Input/output devices like keyboards, printers, and disk drives must be carefully managed to ensure smooth operation. The OS uses device drivers to communicate with hardware and provides a consistent interface for software to access these devices.
Functions include:
- Buffering and caching to reduce I/O wait times
- Polling or interrupt-based communication
- Scheduling access when multiple processes need the same device
- Handling errors and device readiness
Efficient I/O management ensures data is transferred reliably and quickly between the CPU and peripherals.
Security
Security & Protection
The OS is responsible for protecting both data and resources from unauthorized access and malicious behavior. It ensures that each user and process can only access what they are permitted to.
Security features include:
- User authentication – validating login credentials
- Access control – using permissions and ACLs
- Process isolation – keeping processes separate to avoid interference
- Logging and auditing – tracking access and changes for accountability
Without proper security, a system would be vulnerable to breaches, data loss, or system failure.
Efficiency
Efficiency & Fairness
An effective OS not only manages resources—it does so in a way that maximizes system performance while ensuring fair access for all users and processes.
The OS constantly makes decisions to:
- Maximize CPU and memory usage
- Minimize wait times and bottlenecks
- Allocate resources fairly, especially in multi-user environments
- Adapt to changing system demands in real time
This balance between efficiency and fairness is key to maintaining a responsive, stable computing experience.