1. Introduction to Operating Systems
- Definition:
- An OS is software that acts as an intermediary between computer hardware and the user, providing an environment for execution.
- Functions of an OS:
- Process Management: Handling processes, including creation, scheduling, and termination.
- Memory Management: Allocating memory to processes and ensuring efficient use.
- File System Management: Managing files, directories, and permissions.
- Device Management: Managing hardware devices and providing drivers.
- Security and Access Control: Protecting data and managing user access.
- Process:
- A program in execution, consisting of a program counter, stack, and data.
- Process Scheduling:
- Algorithms: First-Come-First-Served (FCFS), Shortest Job Next (SJN), Round Robin (RR), Multilevel Queue Scheduling.
- Concurrency and Synchronization:
- Ensuring that multiple processes execute safely, without conflicts.
- Mechanisms: Semaphores, Mutexes, Monitors, Deadlock Prevention.
- Inter-Process Communication (IPC):
- Communication between processes via pipes, message queues, shared memory.
- Memory Hierarchy:
- Registers, Cache, Main Memory, Disk Storage.
- Techniques:
- Paging: Dividing memory into fixed-size pages.
- Segmentation: Dividing memory into variable-sized segments.
- Virtual Memory: Using disk storage as an extension of RAM (e.g., swapping).
- Memory Allocation:
- Fixed Partitioning, Dynamic Partitioning, Buddy System.
- File Concepts:
- File attributes, file types, file names, and file access permissions.
- File Operations:
- Creation, deletion, reading, writing, and manipulation of files.
- File System Types:
- FAT (File Allocation Table), NTFS, ext4, HFS+.
- Directory Structure:
- Single-level, Two-level, Hierarchical, and Network file systems (NFS).
5. Device Management
- I/O Management:
- Communication between the OS and hardware devices (input devices, output devices, storage).
- Device Drivers:
- Programs that control and facilitate communication with hardware devices.
- I/O Scheduling Algorithms:
- FCFS, SSTF (Shortest Seek Time First), SCAN, C-SCAN.
6. Security and Protection
- Access Control:
- Authentication (e.g., passwords, biometrics) and authorization (user permissions).
- Malware Prevention:
- Virus protection, firewalls, and system monitoring.
- Encryption:
- Securing data using cryptographic methods.
- Audit Trails:
- Recording system activities to detect unauthorized actions.
- Batch OS:
- Executes a series of jobs without interaction (e.g., early mainframes).
- Time-Sharing OS:
- Multiple users can share system resources (e.g., UNIX, Linux).
- Real-Time OS:
- Meets time constraints and responds immediately to inputs (e.g., embedded systems, robotics).
- Distributed OS:
- Manages a collection of independent systems as one (e.g., Google File System, Hadoop).
- Network OS:
- Supports networking features and remote access (e.g., Windows Server).
- Definition:
- Running multiple OS instances on a single physical machine using a hypervisor.
- Types:
- Full Virtualization: The guest OS is unaware it’s being virtualized (e.g., VMware, Hyper-V).
- Paravirtualization: The guest OS is aware and cooperates with the hypervisor (e.g., Xen).
- Containers:
- Lightweight virtualization where applications run in isolated environments (e.g., Docker, Kubernetes).
- Metrics:
- CPU Utilization, Memory Utilization, I/O Throughput, Response Time.
- Load Balancing:
- Distributing work evenly across available resources to optimize performance.
- Benchmarking:
- Comparing the performance of different systems or configurations.