Define process, thread and context switching.
Chapter 2
PCB and Context Switching
Understand how OS stores process metadata and swaps CPU execution safely.
PCB is the process record card; context switch saves one card and loads another.
Without PCB and context switch, multitasking and preemption are impossible.
PCB Fields
From notesClear explanation
The Process Control Block tracks identity, CPU state, scheduling attributes, memory pointers, and device/accounting info.
What it really means
It is the OS memory of 'where this process left off' and 'what it owns'.
Example
After an interrupt, CPU registers are saved into the current process PCB before selecting next process.
Key takeaway
PCB is the authoritative process state structure.
Context Switch Steps
From notesClear explanation
Interrupt transfers control to kernel, current state is saved, scheduler picks next process, and its state is restored to CPU.
What it really means
Like pausing one game exactly at frame N and resuming another at its saved frame.
Key takeaway
Correct save/restore guarantees process continuity.
- - Believing context switch does useful user work
- - Forgetting PCB lives in kernel space
- - Ignoring overhead impact when quantum is too small
- - PCB stores PID, state, PC, registers, scheduling and I/O info
- - Context switch = save current context, load next context
- - Switching cost is overhead
Exam lens for this topic
What evaluators usually expect in structured exam answers.
Must-use keywords
- - PID
- - Program Counter
- - Registers
- - Scheduling info
- - Kernel space
Answer flow
- - Define PCB as process metadata structure
- - Draw field-level block diagram
- - Explain context switch save/restore sequence
- - Mention overhead nature
Diagram expectations
- - PCB field block diagram
Repeated pattern: PCB with diagram appears often as direct theory question.
Practice Questions
Describe Process Control Block (PCB) with diagram.
Source: Summer 2023 Q2(B)
Answer focus: Field list with role of each field.
Discuss context switching in OS.
Source: Winter 2023 Q2(B)
Answer focus: Sequence, causes, and overhead explanation.
Practice from papers (end-of-topic set)
These paper questions map directly to this topic. Solve now, then compare your structure with linked topics.
Describe Process Control Block (PCB) with diagram.
Explain PCB with block diagram.
Discuss context switching in OS.
Define PCB and explain fields of PCB.
Define PCB and explain fields of PCB.
Define PCB and explain fields of PCB.
Question Bank Linked Here
Open all questionsDefine process, thread and context switching.
Describe Process Control Block (PCB) with diagram.
Explain PCB with block diagram.
Discuss context switching in OS.
Define PCB and explain fields of PCB.
Define PCB and explain fields of PCB.
Define PCB and explain fields of PCB.
How to answer linked exam questions
Full question bankSummer 2023 Q2(A)
Define process, thread and context switching.
Answer pattern: one-line definition, key properties, and one short real-world use case.
Summer 2023 Q2(B)
Describe Process Control Block (PCB) with diagram.
Answer pattern: start with definition, draw neat labeled diagram, then explain flow/parts.
Winter 2023 Q2(A)
Explain PCB with block diagram.
Answer pattern: start with definition, draw neat labeled diagram, then explain flow/parts.
Winter 2023 Q2(B)
Discuss context switching in OS.
Answer pattern: concept -> intuition -> steps -> concluding point with one application.
Summer 2024 Q2(B) OR
Define PCB and explain fields of PCB.
Answer pattern: one-line definition, key properties, and one short real-world use case.
Winter 2024 Q2(B) OR
Define PCB and explain fields of PCB.
Answer pattern: one-line definition, key properties, and one short real-world use case.