Operating System (OS) Notes
1. Introduction to Operating System
An Operating System is system software that acts as an interface between users and computer
hardware. Examples: Windows, Linux, macOS, Android.
Functions: Process management, Memory management, File management, Device management,
Security, User Interface.
2. Process Management
Process: A program in execution. Process states: New, Ready, Running, Waiting, Terminated.
Scheduling Algorithms: FCFS, SJF, Priority Scheduling, Round Robin.
3. Threads
Thread is the smallest unit of CPU execution. Types: User-level threads and Kernel-level threads.
4. CPU Scheduling
Objectives: Maximize CPU utilization and throughput, minimize waiting time, turnaround time, and
response time.
5. Deadlocks
Deadlock occurs when processes wait indefinitely for resources held by each other.
Necessary Conditions: Mutual Exclusion, Hold and Wait, No Preemption, Circular Wait.
Methods: Prevention, Avoidance (Banker's Algorithm), Detection and Recovery.
6. Memory Management
Techniques: Contiguous Allocation, Paging, Segmentation, Virtual Memory.
Paging eliminates external fragmentation.
Virtual Memory allows execution of processes larger than physical memory.
7. Page Replacement Algorithms
FIFO, Optimal, LRU, LFU.
8. File System
File: Collection of related information stored on secondary storage.
Directory structures: Single-level, Two-level, Tree-structured.
9. Disk Scheduling
Algorithms: FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK.
10. Security and Protection
Authentication, Authorization, Access Control, Encryption, Firewalls.
Important Viva Questions
• What is an Operating System? • Difference between Process and Thread. • What is Deadlock? •
Explain Paging and Segmentation. • What is Virtual Memory? • Explain FCFS and Round Robin
Scheduling. • What is a Semaphore? • What is Thrashing? • Explain Banker’s Algorithm.