| Function | Description | Example |
|---|---|---|
| Process Management | Manage processes and threads | Process creation, scheduling, synchronization |
| Memory Management | Manage primary memory allocation | Virtual memory, paging, segmentation |
| File System Management | Manage files and directories | File creation, deletion, access control |
| I/O Management | Manage input/output devices | Device drivers, buffering, spooling |
| Security and Protection | Protect system and user data | Access control, authentication, encryption |
| Networking | Manage network communication | Network protocols, data transmission |
| Error Detection | Detect and handle system errors | Hardware failure detection, error recovery |
| State | Description | Transition Trigger |
|---|---|---|
| New | Process being created | Process creation request |
| Ready | Process waiting for CPU allocation | Admitted by OS, waiting for scheduler |
| Running | Process currently executing | Scheduled by CPU scheduler |
| Waiting | Process waiting for I/O or event | Waiting for I/O completion, resource, signal |
| Terminated | Process finished execution | Process completed or killed |
| Blocked | Process waiting for resource | Waiting for unavailable resource |
| Algorithm | Strategy | Advantages | Disadvantages | Use Case |
|---|---|---|---|---|
| FCFS (First-Come, First-Served) | First arrived, first served | Simple, fair | Convoy effect, poor average waiting time | Batch systems |
| SJF (Shortest Job First) | Shortest job executes first | Minimum average waiting time | Starvation, hard to predict job length | Theoretical optimization |
| SRTF (Shortest Remaining Time First) | Preemptive version of SJF | Optimal average waiting time | Starvation, overhead | Real-time systems |
| Round Robin | Fixed time quantum per process | Good response time, fair | Context switching overhead | Time-sharing systems |
| Priority Scheduling | Higher priority executes first | Flexible, can prioritize | Starvation possible | Real-time systems |
| Multilevel Queue | Processes in different priority queues | Different scheduling for different types | Potential starvation | Multiple process types |
| Multilevel Feedback Queue | Dynamic priority adjustment | Prevents starvation, responsive | Complex implementation | General-purpose systems |
| Concept | Description | Advantages | Disadvantages |
|---|---|---|---|
| Contiguous Allocation | Each process gets contiguous memory block | Simple, efficient | External fragmentation, memory waste |
| Paging | Divide memory into fixed-size pages | No external fragmentation, efficient | Internal fragmentation, page table overhead |
| Segmentation | Divide memory into variable-size segments | Natural program structure, sharing possible | External fragmentation, complex |
| Virtual Memory | Extend physical memory with disk space | Larger logical address space, process isolation | Performance overhead, complexity |
| Page Replacement | Replace pages when memory is full | Efficient memory utilization | Page fault overhead |
| Algorithm | Strategy | Advantages | Disadvantages |
|---|---|---|---|
| Optimal (OPT) | Replace page used farthest in future | Theoretical minimum page faults | Impractical, requires future knowledge |
| FIFO (First In, First Out) | Replace oldest page | Simple implementation | Belady's anomaly possible |
| LRU (Least Recently Used) | Replace least recently used page | Good performance, stack algorithm | Implementation overhead |
| LFU (Least Frequently Used) | Replace least frequently used page | Considers frequency | May keep old popular pages |
| Clock Algorithm | Approximation of LRU using reference bit | Good performance, simple | Approximation of LRU |
| Second Chance | FIFO with reference bit check | Better than FIFO | Still FIFO-based |
| Concept | Description | Implementation | Use Case |
|---|---|---|---|
| Critical Section | Code segment accessing shared resources | Entry/exit protocols | Shared resource access |
| Mutex | Mutual exclusion lock | Binary semaphore | Exclusive access to resource |
| Semaphore | Integer variable for synchronization | Wait and signal operations | Resource counting, synchronization |
| Monitor | High-level synchronization construct | Condition variables, locks | Structured synchronization |
| Producer-Consumer | Coordination between processes | Buffer, semaphores | Data sharing between processes |
| Reader-Writer | Multiple readers, single writer | Read-write locks | Database access, file sharing |
| Dining Philosophers | Resource allocation problem | Resource ordering, deadlock prevention | Deadlock avoidance |
| Condition | Description | How to Handle | Example |
|---|---|---|---|
| Mutual Exclusion | Resource cannot be shared | Resource sharing where possible | Printer cannot be shared |
| Hold and Wait | Process holds resources while waiting | Request all resources at once | Process holds disk, waits for printer |
| No Preemption | Resources cannot be forcibly taken | Allow resource preemption | Cannot take resources from process |
| Circular Wait | Cycle of processes waiting for each other | Resource ordering | P1 waits for P2, P2 waits for P1 |
| Concept | Description | Advantages | Disadvantages |
|---|---|---|---|
| Contiguous Allocation | File stored in contiguous blocks | Fast access, simple | External fragmentation, difficult to grow |
| Linked Allocation | File stored as linked list of blocks | No external fragmentation, easy to grow | No random access, pointer overhead |
| Indexed Allocation | Index block contains pointers to file blocks | Random access, no external fragmentation | Index block overhead |
| Free Space Management | Track available disk space | Efficient space utilization | Management overhead |
| Virtual File System | Abstraction layer for different file systems | Multiple file system support | Additional complexity |
| Concept | Description | Implementation | Example |
|---|---|---|---|
| Authentication | Verifying user identity | Passwords, biometrics, certificates | Login with username/password |
| Authorization | Granting access rights | Access control lists, capabilities | File permissions |
| Access Control | Controlling resource access | Discretionary, mandatory, role-based | File read/write permissions |
| Encryption | Protecting data confidentiality | Symmetric, asymmetric encryption | File encryption |
| Auditing | Monitoring security-related events | Log security events | Access logs, system logs |
| Category | System Call | Purpose | Example |
|---|---|---|---|
| Process Control | fork(), exec(), wait(), exit() | Create, execute, wait, terminate processes | Create child process |
| File Management | open(), read(), write(), close() | File operations | Read from file |
| Device Management | ioctl(), read(), write() | Device operations | Read from device |
| Information Maintenance | getpid(), time(), getuid() | Get system information | Get process ID |
| Communications | pipe(), shmget(), mmap() | Process communication | Create pipe for IPC |
| Protection | chmod(), umask(), chown() | Set access permissions | Change file permissions |
| Concept | Description | Advantages | Disadvantages |
|---|---|---|---|
| Full Virtualization | Complete simulation of hardware | Runs unmodified OS, good isolation | Performance overhead |
| Para-virtualization | Guest OS modified to work with hypervisor | Better performance than full virtualization | Requires guest OS modification |
| Hardware-assisted Virtualization | Hardware support for virtualization | Good performance, security | Requires special hardware |
| Containerization | OS-level virtualization | Lightweight, fast, efficient | Less isolation than full VM |