Semester 4Year 2 · EvenCore Subject★★★★★ Hard
CS 402

Operating Systems

Study of OS principles including process management, memory management, file systems, and synchronization.

4Units
28Topics
4Credits
60hLecture hrs
100Max marks
Your Progress
0 / 28 topics
0% complete
Overview
🎯
Why it matters
Your code doesn't run in vacuum — it runs ON an OS. Understanding processes, threads, memory, scheduling explains why programs crash, hang, or consume 100% CPU. Essential for systems programming and performance optimization.
💼
Placement relevance
Core for systems companies (Microsoft, Google Chrome team, Amazon AWS). Backend roles test concurrency, threading. 'Explain deadlock' is a classic interview question. GATE CSE highest weightage subject (~15 marks).
🔗
Prerequisites for
Distributed Systems · Cloud Computing · System Design · Linux Kernel Development · DevOps · Virtualization
📚
Recommended books
Operating System Concepts by Silberschatz, Galvin, and Gagne (Dinosaur Book) · Modern Operating Systems by Andrew S. Tanenbaum · Operating Systems: Three Easy Pieces by Remzi H. Arpaci-Dusseau
Curriculum — 4 Units
U1
Unit 1 · 7 Topics · 0% complete
Processes & CPU Scheduling
Key Formulae
Turnaround Time:TAT = Completion Time - Arrival Time
Waiting Time:WT = TAT - Burst Time
Response Time:RT = First CPU Access - Arrival Time
Process States
Process Control Block
Context Switching
CPU Scheduling Algorithms
FCFS, SJF, SRTF
Priority, Round Robin
Multilevel Queue
U2
Unit 2 · 7 Topics · 0% complete
Process Synchronization
Key Formulae
Semaphore Operations:wait(S): while(S≤0); S--; signal(S): S++;
Deadlock Conditions:Mutual Exclusion, Hold & Wait, No Preemption, Circular Wait
Critical Section Problem
Race Conditions
Mutex & Semaphores
Producer-Consumer Problem
Readers-Writers Problem
Dining Philosophers
Deadlock
U3
Unit 3 · 7 Topics · 0% complete
Memory Management
Key Formulae
Logical to Physical:Physical Address = (Page Number × Page Size) + Offset
Page Fault Rate:PFR = Page Faults / Total References
Effective Access Time:EAT = (1-p) × MA + p × Page Fault Time
Contiguous Allocation
Paging
Segmentation
Virtual Memory
Page Replacement Algorithms
FIFO, LRU, Optimal
Thrashing
U4
Unit 4 · 7 Topics · 0% complete
File Systems & Disk Management
Key Formulae
Disk Access Time:Access Time = Seek Time + Rotational Latency + Transfer Time
SCAN Movement:Total head movement in one direction then reverse
File Attributes
File Operations
Directory Structure
File Allocation Methods
Disk Scheduling
FCFS, SSTF, SCAN, C-SCAN
LOOK, C-LOOK
Previous Year Questions
Unit 12023 · End Semester10 marks
Given processes P1(AT=0,BT=5), P2(AT=1,BT=3), P3(AT=2,BT=8), P4(AT=3,BT=6). Calculate average TAT and WT for: a) FCFS, b) SJF, c) Round Robin (quantum=2). Which is best?
Unit 32023 · End Semester10 marks
Page reference string: 7,0,1,2,0,3,0,4,2,3,0,3,2. Frame size=3. Calculate page faults for FIFO, LRU, and Optimal. Show page frames at each step.
Unit 22022 · End Semester8 marks
Explain the Dining Philosophers problem. How does it lead to deadlock? Propose a solution to prevent deadlock.
Unit 42022 · Mid Semester6 marks
Disk queue: 98,183,37,122,14,124,65,67. Head at 53. Calculate total head movement for FCFS, SSTF, and SCAN (direction: increasing).
Exam Strategy
📊
Draw Gantt charts for scheduling
CPU scheduling questions NEED Gantt charts showing process execution timeline. Label each block with process ID and time. Even if calculations are wrong, diagram shows understanding.
🔢
Show formula before calculating
TAT, WT, Response Time — write formula first, then substitute values. Partial marks given if formula is correct. Common mistake: TAT = CT - AT (not BT!).
💀
Deadlock = 4 conditions
EVERY exam asks deadlock conditions. Memorize: Mutual Exclusion, Hold & Wait, No Preemption, Circular Wait. Know how to prevent each (e.g., break circular wait → impose ordering).
📄
Page replacement — draw tables
For FIFO/LRU/Optimal, draw table with columns for each frame. Mark page faults. Easier to track than mental calculation. Examiners appreciate organized solutions.
Related Subjects
Semester 3
Computer Organization and Architecture
CS 202
Semester 4
Database Management Systems
CS 401
Semester 4
Computer Networks
CS 403