Operating Systems - In-Depth Class Notes
Operating Systems - In-Depth Class Notes
Primary functions:
Process Management
Memory Management
File System Management
Device Management
Security and Access Control
2. Process Management
A process is a program in execution; it includes code, data, stack, and heap.
Process States:
New
Ready
Running
Waiting (Blocked)
Terminated
Context Switching: The act of saving and restoring the state (context) of a CPU
so that execution can be resumed from the same point later.
Schedulers:
Scheduling Algorithms:
FCFS (First-Come-First-Serve)
SJF (Shortest Job First)
RR (Round Robin)
Priority Scheduling
Multilevel Queue
Concurrency Issues:
Race Conditions
Deadlocks
Starvation
Livelock
Synchronization:
Critical Section Problem: Ensures only one process/thread accesses shared data
at a time.
4. Deadlocks
Deadlock: A set of processes are blocked because each process is holding a
resource and waiting for another.
Necessary Conditions:
Mutual Exclusion
Hold and Wait
No Preemption
Circular Wait
Handling Methods:
Prevention
Avoidance (Banker's Algorithm)
Detection and Recovery
5. Memory Management
Main Memory: Fast, volatile memory that stores processes during execution.
Contiguous Allocation
Paging: Memory divided into fixed-size pages.
Segmentation: Memory divided into segments of different lengths.
Paging Concepts:
Page Table
TLB (Translation Lookaside Buffer)
Internal vs External Fragmentation
Virtual Memory:
6. File Systems
File: A collection of related information stored on secondary storage.
File Operations:
7. Input/Output Systems
I/O Devices: Disk, Keyboard, Mouse, Monitor, Network Interface
I/O Techniques:
Programmed I/O
Interrupt-driven I/O
DMA (Direct Memory Access)
Authentication Methods:
Security Measures:
Types:
Full Virtualization
Para-virtualization
OS-level Virtualization (Containers)
Modular structure
Everything-is-a-file paradigm
Shell interface
Windows:
Hybrid kernel
GUI-centric
Extensive API support
Note: For practical learning, try writing shell scripts, exploring /proc in
Linux, and simulating scheduling/memory algorithms in code. Refer to "Operating
System Concepts" by Silberschatz for deeper understanding.