Operating systems
Operating systems is a named subject in every CS degree and a standard round in campus placement interviews, and the questions test whether you understand the mechanism behind each definition. This course explains how the kernel shares one machine among many programs, and works the scheduling, deadlock, paging and page-replacement problems step by step.
Start the course
Lessons
Processes and the kernel
What a process is, how the kernel tracks it, how system calls cross into kernel mode, and how fork, exec, wait and context switches work.
Threads and race conditions
Threads against processes, what threads share, kernel and user threads, and a race condition traced instruction by instruction.
CPU scheduling with Gantt-chart numericals
FCFS, SJF, SRTF, priority with aging, round robin, MLFQ and Linux’s EEVDF, with waiting and turnaround times worked out.
Synchronization: locks, semaphores and monitors
Critical sections, Peterson’s algorithm, atomic instructions, spinlocks and mutexes, semaphores, condition variables and the three classic problems.
Deadlocks and the Banker’s algorithm
The four Coffman conditions, resource-allocation graphs, prevention, avoidance with a worked Banker’s example, detection and recovery.
Memory management: segmentation, paging and the TLB
Address translation from base and bounds to multi-level page tables, the TLB and fragmentation, with the arithmetic worked through.
Virtual memory and page replacement
Demand paging and page faults, FIFO, Optimal, LRU and Clock on one reference string, Belady’s anomaly, thrashing and the working set.
File systems, journaling and I/O
Files, directories and inodes, allocation methods, free-space bitmaps, crash consistency with journaling, disk scheduling and the page cache.
Interview Prep pass · Compare plans