AI InterviewSearch…Search problems, topics, or pages…Ctrl KGet started

CS notes · OS

Operating Systems

Processes, threads, CPU scheduling, synchronization, deadlocks, memory, virtual memory, file systems and disk scheduling.

12 notes · about 3 hours of reading · free, no sign-in needed

Read in this order

basics first

  1. 01Introduction to Operating SystemsWhat 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.Beginner · 11 minBeginner · 11 min
  2. 02Processes and ThreadsWhat 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.Beginner · 12 minBeginner · 12 min
  3. 03CPU Scheduling AlgorithmsCPU scheduling in operating systems: FCFS, SJF, SRTF, priority with aging, Round Robin and multilevel queues, all run on one example with Gantt charts.Intermediate · 15 minIntermediate · 15 min
  4. 04Process SynchronizationRace conditions, the critical section problem and its three requirements, Peterson's solution, test-and-set, mutex locks, semaphores and monitors in the OS.Intermediate · 14 minIntermediate · 14 min
  5. 05Classic Synchronization ProblemsClassic OS synchronization problems with semaphores: bounded-buffer producer-consumer, readers-writers starvation, dining philosophers without deadlock.Intermediate · 10 minIntermediate · 10 min
  6. 06Deadlocks in Operating SystemsDeadlocks in OS: the four Coffman conditions, resource allocation graphs, prevention, avoidance with a worked Banker's algorithm, detection and recovery.Intermediate · 15 minIntermediate · 15 min
  7. 07Memory ManagementMemory management in OS: logical vs physical addresses, the MMU, first, best and worst fit worked out, fragmentation, paging and segmentation.Intermediate · 13 minIntermediate · 13 min
  8. 08Virtual Memory and Demand PagingVirtual memory in operating systems: demand paging, how a page fault is handled, TLB effective access time worked out, multi-level page tables and thrashing.Intermediate · 13 minIntermediate · 13 min
  9. 09Page Replacement AlgorithmsPage 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.Intermediate · 14 minIntermediate · 14 min
  10. 10File SystemsFile systems in OS: attributes, access methods, directory structures, contiguous, linked and indexed allocation, inodes worked out, free space and FAT.Intermediate · 13 minIntermediate · 13 min
  11. 11Disk Scheduling AlgorithmsDisk 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.Intermediate · 11 minIntermediate · 11 min
  12. 12Inter-Process CommunicationInter-process communication in OS: shared memory vs message passing, pipes and FIFOs, message queues, sockets and signals, compared, with C examples.Intermediate · 11 minIntermediate · 11 min
Start with Introduction to Operating Systems

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Classic Synchronization Problems — Classic OS synchronization problems with semaphores: bounded-buffer producer-consumer, readers-writers starvation, dining philosophers without deadlock.
  6. 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.
  7. Memory Management — Memory management in OS: logical vs physical addresses, the MMU, first, best and worst fit worked out, fragmentation, paging and segmentation.
  8. 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.
  9. 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.
  10. File Systems — File systems in OS: attributes, access methods, directory structures, contiguous, linked and indexed allocation, inodes worked out, free space and FAT.
  11. 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.
  12. 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

Other subjects