Definition
An Operating System (OS) is a special software that controls all the hardware resources of a computer and manages all applications/programs. It acts as an intermediary between the user and the computer hardware. The OS provides a platform on which user programs can run and manages all hardware and software resources of the computer system.
Main Functions of Operating System
1. Process Management
- Creating, scheduling, and terminating processes
- Allocating CPU time to different processes
- Managing process execution and context switching
- Handling synchronization between processes
2. Memory Management
- Allocating memory to processes when needed
- Deallocating memory when process completes
- Managing virtual memory and paging
- Protecting memory from unauthorized access
3. File Management
- Creating, reading, writing, and deleting files
- Organizing files in directories
- Managing file access permissions
- Implementing storage allocation strategies
4. Device Management
- Controlling all input/output devices (printer, disk, keyboard, mouse)
- Managing device drivers
- Handling device scheduling
- Providing device independence to applications
5. Security and Protection
- Authentication (verifying user identity through password)
- Authorization (controlling what resources users can access)
- Data protection and privacy
- Protection from unauthorized or accidental access
6. User Interface
- Command Line Interface (CLI) - text-based commands
- Graphical User Interface (GUI) - icons, windows, menus
- Managing user interaction with system
Types of Operating Systems
1. Batch Operating System
- Processes jobs in batches without user interaction
- Jobs submitted together, processed sequentially
2. Time-Sharing Operating System
- Multiple users interact simultaneously
- CPU time divided among users
3. Real-Time Operating System
- Must respond within guaranteed time limits
- Used in time-critical applications
4. Personal Computer Operating System
- Designed for single user with user-friendly interface
5. Distributed Operating System
- Manages resources across multiple networked computers
6. Parallel Operating System
- Multiple processors work simultaneously
Goals of Operating System
- Efficiency - Maximize resource utilization
- User Convenience - Provide easy interface
- Fairness - Allocate resources equitably
- Reliability - Ensure stability and integrity
- Security - Protect resources and data
- Performance - Minimize response and turnaround time
- Flexibility - Support variety of applications
Key Components
- Kernel - Core of OS managing resources
- Shell - Command interpreter
- File System - Data storage management
- Device Drivers - Control hardware
- Scheduler - Process execution order
- Memory Manager - Memory allocation
- I/O Manager - Input/output management
- Utilities - System maintenance programs
Advantages
- Allows multiple programs to run simultaneously
- Provides convenient user interface
- Manages hardware efficiently
- Provides data security and protection
- Prevents program interference
- Enables resource sharing
- Simplifies programming
- Abstracts hardware complexity
Disadvantages
- Takes system memory and processing power
- Adds system complexity
- Reduces processing speed due to overhead
- Requires continuous maintenance
- Can be expensive
- Vulnerable to cyber attacks
- Compatibility issues possible
- Difficult to troubleshoot