Define process, thread and context switching.
Chapter 2
Process Concept, States, and Transitions
Learn what a process is and how it moves across ready, running, blocked, and other states.
A process is a running program; OS keeps moving it between states based on CPU and events.
State transitions are the base for scheduling, synchronization, and performance reasoning.
What Is a Process?
From notesClear explanation
A process is a program in execution with its own context (program counter, registers, stack, and memory regions).
What it really means
The code file is a blueprint; process is the live instance doing work right now.
Example
Opening two browser windows creates separate process contexts in modern systems.
Key takeaway
Process is execution + state, not just code.
State Movement
From notesClear explanation
Running processes move to blocked when waiting for I/O; blocked processes return to ready when event completes; ready enters running when scheduled.
What it really means
Like checkout queues: waiting for payment terminal (blocked), waiting in line (ready), being served (running).
Example
A process requesting disk read transitions running -> blocked until disk interrupt occurs.
Key takeaway
Events and scheduling decisions drive process flow.
- - Confusing program (passive) with process (active)
- - Assuming blocked means terminated
- - Ignoring event-driven transitions from blocked to ready
- - Core states: ready, running, blocked
- - Extended model adds new and terminated
- - Scheduler chooses ready -> running
Exam lens for this topic
What evaluators usually expect in structured exam answers.
Must-use keywords
- - process state
- - life cycle
- - ready
- - running
- - blocked
Answer flow
- - Write exact definition in first line
- - Explain mechanism in ordered bullets
- - Add one short example or scenario
- - Close with key takeaway and one exam keyword
Practice Questions
Describe Process Life Cycle with diagram.
Source: Summer 2023 Q2(B) OR
Answer focus: State diagram + transition causes.
Explain Process state transitions with diagram.
Source: Summer 2024 Q2(B)
Answer focus: Transition labels: dispatch, timeout, event wait, event occurs.
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.
Describe Process Life Cycle with diagram.
Calculate average turnaround and waiting time for Round Robin (q=3) and Priority Scheduling for five processes with given burst and priorities.
Differentiate thread and process.
Explain SRTN in short and solve with processes P0..P3 with arrival 0,1,3,5 and burst 10,6,2,4. Draw Gantt chart and compute average TAT/WT.
Explain SJF in short and solve with processes P0..P3 with arrival 0,1,3,5 and burst 10,6,2,4. Draw Gantt chart and compute average TAT/WT.
Implement Round Robin (q=3) for five processes (same arrival) and find average turnaround and waiting time.
Explain process state transitions with diagram.
Apply Longest Remaining Time First (LRTF) for three processes and calculate average turnaround time.
Implement Round Robin (q=3) for five processes and find average TAT and WT.
Explain process state transition with diagram.
Implement FCFS for five processes (same arrival) and find average TAT and WT.
Explain process states transition with diagram.
Question Bank Linked Here
Open all questionsDefine process, thread and context switching.
Describe Process Control Block (PCB) with diagram.
Describe Process Life Cycle with diagram.
Calculate average turnaround and waiting time for Round Robin (q=3) and Priority Scheduling for five processes with given burst and priorities.
Differentiate thread and process.
Explain SRTN in short and solve with processes P0..P3 with arrival 0,1,3,5 and burst 10,6,2,4. Draw Gantt chart and compute average TAT/WT.
Explain SJF in short and solve with processes P0..P3 with arrival 0,1,3,5 and burst 10,6,2,4. Draw Gantt chart and compute average TAT/WT.
Implement Round Robin (q=3) for five processes (same arrival) and find average turnaround and waiting time.
Explain process state transitions with diagram.
Apply Longest Remaining Time First (LRTF) for three processes and calculate average turnaround time.
Implement Round Robin (q=3) for five processes and find average TAT and WT.
Explain process state transition with diagram.
Implement FCFS for five processes (same arrival) and find average TAT and WT.
Explain process states transition with diagram.
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.
Summer 2023 Q2(B) OR
Describe Process Life Cycle with diagram.
Answer pattern: start with definition, draw neat labeled diagram, then explain flow/parts.
Summer 2023 Q2(C) OR
Calculate average turnaround and waiting time for Round Robin (q=3) and Priority Scheduling for five processes with given burst and priorities.
Answer pattern: define briefly, then solve stepwise and show final values/table.
Winter 2023 Q2(B) OR
Differentiate thread and process.
Answer pattern: use comparison table with 5-8 crisp points and one practical example.
Winter 2023 Q2(C)
Explain SRTN in short and solve with processes P0..P3 with arrival 0,1,3,5 and burst 10,6,2,4. Draw Gantt chart and compute average TAT/WT.
Answer pattern: define briefly, then solve stepwise and show final values/table.