Assignment 02: Process Concepts and the Process Control Block
Self-Assessment
Instructions: Answer the following questions concisely. For analytical and calculation questions, ensure you justify your reasoning based on operating system principles.
Part A: Process Fundamentals and Memory Layout
- Process Definition: Differentiate a “program” from a “process” and explain why a process is considered an “active entity.”
🔒 Solution Locked
This solution will automatically unlock on Sep 07, 2026 at 00:00 IST
(24 hours after the assignment due date).
(24 hours after the assignment due date).
- Memory Segments: A process is divided into multiple memory segments. Briefly describe the contents of the following segments:
- Text Segment
- Data Segment (Initialized and Uninitialized/BSS)
- Heap
- Stack
🔒 Solution Locked
This solution will automatically unlock on Sep 07, 2026 at 00:00 IST
(24 hours after the assignment due date).
(24 hours after the assignment due date).
Part B: Process States and Transitions
- State Identification: Define the exact condition of a process in the following states:
- Ready
- Waiting (Blocked)
- Terminated
🔒 Solution Locked
This solution will automatically unlock on Sep 07, 2026 at 00:00 IST
(24 hours after the assignment due date).
(24 hours after the assignment due date).
- State Transitions: Explain the specific OS events that trigger the following state transitions:
- Running $\rightarrow$ Ready
- Running $\rightarrow$ Waiting
🔒 Solution Locked
This solution will automatically unlock on Sep 07, 2026 at 00:00 IST
(24 hours after the assignment due date).
(24 hours after the assignment due date).
Part C: The Process Control Block (PCB) and Context Switching
- PCB Anatomy: The Process Control Block is the OS’s comprehensive “identity card” for each active process. List at least four specific categories of information stored within a PCB.
🔒 Solution Locked
This solution will automatically unlock on Sep 07, 2026 at 00:00 IST
(24 hours after the assignment due date).
(24 hours after the assignment due date).
- Context Switching Mechanism: Detail the three distinct phases of a context switch.
🔒 Solution Locked
This solution will automatically unlock on Sep 07, 2026 at 00:00 IST
(24 hours after the assignment due date).
(24 hours after the assignment due date).
- The Overhead Dilemma: Why is a context switch considered “pure overhead” from the perspective of user processes?
🔒 Solution Locked
This solution will automatically unlock on Sep 07, 2026 at 00:00 IST
(24 hours after the assignment due date).
(24 hours after the assignment due date).
Part D: Special Process Types and Kernel Interfaces
- Zombie vs. Orphan: Explain the fundamental difference between a Zombie process and an Orphan process. Why is a large accumulation of Zombie processes a serious system concern?
🔒 Solution Locked
This solution will automatically unlock on Sep 07, 2026 at 00:00 IST
(24 hours after the assignment due date).
(24 hours after the assignment due date).
- The
/procFilesystem: The/procfilesystem provides a virtual interface to kernel data structures. If you query/proc/PID/statusfor a specific process, what do the fieldsVmSizeandVmRSSrepresent regarding resource usage?
🔒 Solution Locked
This solution will automatically unlock on Sep 07, 2026 at 00:00 IST
(24 hours after the assignment due date).
(24 hours after the assignment due date).
Part E: Advanced Synthesis & Application (Exam Preparation)
Exercise 1: Context Switching Performance Calculations Assume an operating system performs a context switch that takes exactly $10 \mu s$ (microseconds) to execute. The CPU scheduler is configured with a time slice of $10 ms$ (milliseconds).
- Task: If all processes always utilize their full time slice, calculate the percentage of CPU time spent entirely on context switching overhead. Show your calculation.
🔒 Solution Locked
This solution will automatically unlock on Sep 07, 2026 at 00:00 IST
(24 hours after the assignment due date).
(24 hours after the assignment due date).
Exercise 2: PCB State Mapping For the following scenario, identify the most likely process state transition and the specific PCB fields that the operating system must actively update.
- Scenario: An executing background compilation task is preempted because the OS timer interrupt fires, signaling the end of its allocated time slice.
🔒 Solution Locked
This solution will automatically unlock on Sep 07, 2026 at 00:00 IST
(24 hours after the assignment due date).
(24 hours after the assignment due date).