Operating Systems
Processes, CPU scheduling, synchronization semaphores, deadlocks, virtual memory, paging & disk I/O.
Published Study Notes & Chapters (5)
CPU Scheduling, Semaphores & Deadlock Banker’s Formula
TAT/WT numericals, counting semaphore wait/signal invariants, and minimum/maximum resource deadlock formulas.
Virtual Memory, Multi-Level Paging & TLB Effective Access Time
Virtual/physical address bit calculations, optimal page size for multi-level page tables, EMAT, and Belady’s anomaly.
Page Replacement (FIFO, LRU, Optimal), Unix Inodes & Disk Arm Scheduling
FIFO Belady’s anomaly vs stack algorithms (LRU/Optimal), Unix inode maximum file size formula, and FCFS / SSTF / SCAN / C-SCAN / C-LOOK disk head movement numericals.
Page Replacement Logics (Animated): Belady’s Anomaly in FIFO vs LRU & Optimal Stack Property
Interactive frame-by-frame proof of Belady’s Anomaly (9 faults with 3 frames vs 10 faults with 4 frames under FIFO!), Mattson’s Stack Inclusion Property, Second-Chance Clock, and Working-Set Thrashing.
OS 2027 Rank-Decider: Hardware CAS/TestAndSet, Priority Inversion, Copy-on-Write & File I/O
Why naive TestAndSet/CAS spinlocks violate Bounded Waiting, Priority Inversion & Priority Inheritance, Copy-on-Write (COW) fork() page sharing, and Contiguous vs Linked vs FAT vs Indexed disk block seeks.
Solved Operating Systems PYQs & Practice Questions
Launch Timed Mock (14 Qs)Consider Peterson’s two-process software synchronization solution using shared flag[0..1] and turn. Which of the three Critical Section requirements (Mutual Exclusion, Progress, Bounded Waiting) does it satisfy on a sequentially consistent processor?
Four processes arrive at times with CPU burst times respectively. Under SRTF (Shortest Remaining Time First) preemptive scheduling, what is the average turnaround time?
A system has processes, each requiring at most identical units of resource . What is the minimum number of units of that guarantees the system is always deadlock-free?
A counting semaphore is initialized to . Subsequently, wait(P) operations and signal(V) operations are completed on . What is the current value of ?
A C program executes fork(); fork(); fork(); sequentially without any conditional branching. Including the initial parent process, how many child processes are newly created?
A system has processes, and each process requires a maximum of instances of resource to complete execution. What is the minimum number of instances of that guarantees the system will NEVER enter deadlock?
A system uses a 2-level hierarchical page table with a TLB. TLB access takes , main memory access takes , and the TLB hit ratio is . Assuming zero page faults, what is the Effective Memory Access Time (EMAT) in nanoseconds?
A paging system uses a single-level page table in main memory ( access time) and a TLB ( lookup time) with a TLB hit ratio of . Assuming sequential TLB-then-memory lookup, what is the Effective Memory Access Time (EMAT) in nanoseconds?