Operating System Notes for Placements and Interviews
Operating system notes for placement interviews: processes, threads, CPU scheduling, deadlocks, paging, virtual memory and file systems, with worked examples.
- Notes: 12
- Reading time: about 3 hours
- Cost: Free, no sign-in needed
Processes, threads, CPU scheduling, synchronization, deadlocks, memory, virtual memory, file systems and disk scheduling.
Read in this order
- Introduction to Operating Systems — What an operating system does, kernel mode vs user mode, how a system call works, the types of OS from batch to real-time, and monolithic vs microkernel.
- Processes and Threads — What a process and a thread are, what a PCB holds, the process state diagram, how a context switch works, fork() and exec(), and the multithreading models.
- CPU Scheduling Algorithms — CPU scheduling in operating systems: FCFS, SJF, SRTF, priority with aging, Round Robin and multilevel queues, all run on one example with Gantt charts.
- Process Synchronization — Race conditions, the critical section problem and its three requirements, Peterson's solution, test-and-set, mutex locks, semaphores and monitors in the OS.
- Classic Synchronization Problems — Classic OS synchronization problems with semaphores: bounded-buffer producer-consumer, readers-writers starvation, dining philosophers without deadlock.
- Deadlocks in Operating Systems — Deadlocks in OS: the four Coffman conditions, resource allocation graphs, prevention, avoidance with a worked Banker's algorithm, detection and recovery.
- Memory Management — Memory management in OS: logical vs physical addresses, the MMU, first, best and worst fit worked out, fragmentation, paging and segmentation.
- Virtual Memory and Demand Paging — Virtual memory in operating systems: demand paging, how a page fault is handled, TLB effective access time worked out, multi-level page tables and thrashing.
- Page Replacement Algorithms — Page replacement algorithms in OS: FIFO, Optimal, LRU and clock worked frame by frame, their fault counts, and Belady's anomaly with 3 vs 4 frames.
- File Systems — File systems in OS: attributes, access methods, directory structures, contiguous, linked and indexed allocation, inodes worked out, free space and FAT.
- Disk Scheduling Algorithms — Disk scheduling in OS: seek time and rotational latency, then FCFS, SSTF, SCAN, C-SCAN, LOOK and C-LOOK on one queue with total head movement.
- Inter-Process Communication — Inter-process communication in OS: shared memory vs message passing, pipes and FIFOs, message queues, sockets and signals, compared, with C examples.
Test yourself
- Operating Systems · Basic proctored skill test with a verifiable credential
- Operating Systems · Intermediate proctored skill test with a verifiable credential