Processes, Threads, System Calls and Context Switching short notes for GATE CS: 5 study cards covering concepts, formulas, shortcuts and exam traps, plus solv
processes threads system calls and context switching short notes
State Transition Cheat Sheet: Quick Reference
Final Exam Checklist: Process States and Context Switching
Threads: Final Checklist
2 more cards in this chapter
Login to view the complete short notes
Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.
Personalised first. High quality throughout.
Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.
Built around you, not around a syllabus PDF
Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.
Revision that hits your weak spots
We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.
Questions calibrated to the real exam
Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.
Notes written for recall, not for volume
Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.
One place for everything
Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.
Honest progress
No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.
Unlock the whole course
Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.
Processes, Threads, System Calls and Context Switching Short Notes for GATE CS
Processes, Threads, System Calls and Context Switching short notes for GATE CS: 5 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questions.
State Transition Cheat Sheet: Quick Reference
Process States and Context Switching: Quick Reference
Five States
- New: Being created
- Ready: Waiting for CPU
- Running: Executing instructions
- Blocked: Waiting for event (I/O, signal, resource)
- Terminated: Finished execution
Allowed Transitions (6 total)
New -> Ready (admit)
Ready -> Running (dispatch)
Running -> Ready (preempt)
Running -> Blocked (wait)
Running -> Terminated (exit)
Blocked -> Ready (wake up)
Impossible Transitions (The Big 3)
- Blocked -> Running: must go through Ready
- Blocked -> Terminated: must wake up first
- Ready -> Blocked: must be Running to block
Context Switch Triggers (Always)
- Timer interrupt (preemption)
- I/O request (blocking)
- Wait for event (blocking)
- Higher priority process ready (preemption)
- Process termination (exit)
Ready Queue Entry Counting
Formula: Ready entries = Number of I/O operations (+ 1 if initial entry counted)
I/O operations include: scanf, printf, fread, fwrite, fopen, close, etc.
Key Distinctions
- Ready versus Blocked: Ready = waiting for CPU (eligible to run). Blocked = waiting for event (NOT eligible to run).
- Mode Switch versus Context Switch: Mode switch = User <-> Kernel (same process). Context switch = Process A <-> Process B (different processes).
Five states: "Never Rush Really Big Tasks" (New, Ready, Running, Blocked, Terminated)
Impossible transitions: "Blocked cannot Run, Blocked cannot Terminate, Ready cannot Block"
Context switch: "Save state, load state, pure waste"
Final Exam Checklist: Process States and Context Switching
Final Exam Checklist
Can You...?
- Draw the Five-State Model: New, Ready, Running, Blocked, Terminated. All six allowed transitions. Three impossible transitions marked.
Threads: Final Checklist
Final Checklist
Core Facts
- Shared: Code, Data, Heap, Files
- Private: PC, Registers, Stack, Thread ID
Context Switch
Save/Restore: PC, Registers, Stack. Do NOT touch: Page Table.
Models
Many-to-One (fast, fragile), One-to-One (parallel, heavy), Many-to-Many (balanced).
One-line exam method: For any thread option, ask: per-thread or per-process, and does this cross into the kernel?
System Calls: Final Checklist
System Calls: Final Checklist
Core Facts
- System Call: Synchronous, software-initiated request.
- Mode Bit: = Kernel, = User.
- Transition: Trap instruction mode bit flips jump to vector.
Critical Distinctions
- Procedure Call: User User (No mode change).
- System Call: User Kernel (Synchronous).
- Interrupt: Hardware Kernel (Asynchronous).
C Library Rules
Never: strlen, abs.
Conditional: printf, malloc.
Always: open, read, fork, exit.
One-Line Exam Method: To determine if an event guarantees a transition, ask: Does this absolutely require privileged hardware access or OS intervention?