🎓 BookMCQ
← Back to 1. Introduction to Operating System

📝 Introduction to Process Management in Operating Systems (30 MCQs)

Process Representation and the Role of the Kernel

Process management coordinates the creation, execution, suspension, and termination of programs. A process is an active program with an execution context, address space, allocated resources, and associated kernel information. The operating system maintains a process control block (PCB) containing identifiers, process state, scheduling information, saved registers, and resource references, enabling multiple processes to share the processor safely.

Why Process States and Scheduling Are Required

A program may require computation, wait for input/output, or remain temporarily unable to execute. Keeping these conditions distinct allows the operating system to allocate the CPU to another ready process instead of wasting execution time. Scheduling also provides a mechanism for sharing processor capacity among competing processes, while controlled state transitions preserve execution information across interruptions and resource waits.

Process Creation, State Transitions, and Context Switching

A newly created process enters the system through a creation operation and receives a process identifier and required resources. It typically moves from new to ready, running, waiting, or terminated states. When the CPU switches to another process, the kernel saves the current registers and execution context in its PCB and restores the selected process's saved context.

Tracing Two Processes During CPU and I/O Activity

Suppose process P1 requires 5 milliseconds of CPU time before requesting 8 milliseconds of disk I/O. After issuing the request, P1 enters the waiting state, allowing ready process P2 to use the CPU. When the disk operation completes, an interrupt notifies the kernel, which moves P1 back to the ready state.

Scheduling Efficiency, Process Overhead, and Concurrency

Process management improves CPU utilisation by overlapping computation and I/O, supports multitasking, and provides controlled resource ownership. Context switches, process creation, termination, and interprocess communication consume time and memory. Large numbers of active processes can increase scheduling overhead and contention. Multicore systems additionally require coordination between processors, shared resources, and concurrent execution activities.

Misconceptions About Process States and Execution

'A waiting process is ready to execute immediately' is incorrect because it must first receive its required event or resource. 'A process and its program are identical' is incorrect because a process includes execution state and allocated resources. 'Context switching performs useful application computation' is incorrect because it primarily saves and restores execution contexts.

Exam Focus: Process States, PCBs, and Context Switching

Learn to draw and interpret process-state transition diagrams, identify the purpose of each PCB field, and trace processes through CPU execution and I/O waits. Questions may ask you to distinguish ready and waiting states, explain dispatching, analyse context-switch overhead, or determine the state reached after an interrupt or resource completion.

Key Terms of Process Management

  • Process - Active instance of a program.
  • PCB - Kernel record describing process state.
  • Ready state - Eligible for CPU allocation.
  • Waiting state - Blocked pending an event.
  • Dispatcher - Transfers CPU control to a process.
  • Context switch - Saves and restores execution state.
10
Easy
10
Medium
10
Hard

📝 All Introduction to Process Management in Operating Systems MCQs

Q1. A running application is interrupted so that another process can execute. Which information must the operating system preserve in the displaced process's process control block to resume it correctly?

A.Saved program counter and processor register values ✅
B.Complete source code of the application
C.All files currently stored on secondary storage
D.The executable file's original installation path
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The PCB stores the saved program counter and register values needed to resume execution. The tempting source-code option is wrong because the executable remains in memory or storage; it is not copied into the PCB.

Q2. A process has completed its I/O operation and is waiting to receive processor time. Which component selects it from the ready queue and transfers control to it?

A.Long-term scheduler
B.Dispatcher ✅
C.Device controller
D.Memory manager
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The dispatcher selects a process from the ready queue and gives it the processor, changing its state to Running. The tempting Blocked-to-Running option skips the readiness and dispatch steps required.

Q3. A web server creates a worker process using fork(), and the worker subsequently calls exec() to run a different application. Which statement correctly describes these operations?

A.fork() replaces the program image, while exec() creates a child process
B.Both operations create independent child processes
C.fork() creates a child process, while exec() replaces the calling process's program image ✅
D.exec() terminates the parent and resumes the child
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: fork() creates a child process with a distinct process identifier, whereas exec() replaces the calling process's program image. The tempting reversed description swaps creation and replacement and therefore misidentifies each call's purpose.

Q4. A database process requests data from a storage device and cannot continue until the requested data becomes available. When the I/O request is submitted, which state should the operating system assign to the process?

A.Ready
B.Running
C.Terminated
D.Blocked ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: When requested disk input finishes, the waiting process is no longer blocked and becomes Ready. The tempting direct-to-Running option is wrong because the scheduler must still dispatch it onto the CPU.

Q5. A process executes a system call that transfers control from user mode to kernel mode. The kernel completes the service and returns execution to the same process. Which statement best describes this event?

A.A mode switch occurred without necessarily requiring a context switch ✅
B.A context switch occurred because every system call changes processes
C.The process was terminated and recreated
D.Neither privilege level nor execution context changed
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A mode switch changes privilege level, while a context switch changes the scheduled process and restores its saved state. The tempting claim that every system call switches processes confuses these events with one another.

Q6. A batch-processing server uses FCFS scheduling. P1 arrives at time 0 with burst 4, P2 arrives at time 1 with burst 3, and P3 arrives at time 2 with burst 2. What is P2's waiting time?

A.2 time units
B.3 time units ✅
C.4 time units
D.6 time units
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: FCFS runs P1 from 0 to 4, so P2 waits from its arrival at 1 until time 4. Thus WT=4−1=3WT=4-1=3. The tempting 4 forgets arrival-time subtraction and overstates waiting by one unit.

Q7. Three web-server processes arrive at time 0 with CPU bursts P1=5, P2=3, and P3=0? No, P3=0? Assume P3=2. Round Robin uses a quantum of 2. The Gantt chart is P1: 0–2, P2: 2–4, P1: 4–6, P2: 6–7, P1: 7–8. What is the average waiting time?

A.3 time units
B.3.5 time units ✅
C.4 time units
D.5 time units
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The schedule is P1 0–2, P2 2–4, P1 4–6, P2 6–7, P1 7–8. Waiting times are 3 and 4, giving (3+4)/2=3.5(3+4)/2=3.5. Turnaround is not waiting.

Q8. A database uses a binary semaphore to ensure that only one process modifies a shared record at a time. What initial semaphore value is appropriate when the record is initially unlocked?

A.0
B.2
C.-1
D.1 ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: A binary mutex initialized to 1 is initially unlocked, allowing one process to acquire it. The tempting zero initialization makes the first wait operation block immediately, preventing entry before any owner exists.

Q9. Two processes simultaneously attempt to enter a shared critical section that updates an account balance. Which critical-section requirement prevents both processes from executing the protected section simultaneously?

A.Progress
B.Bounded waiting
C.Mutual exclusion ✅
D.Processor affinity
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: Mutual exclusion requires that at most one process execute the protected critical section at a time. The tempting progress condition concerns choosing a waiting entrant, not simultaneous access by multiple processes.

Q10. A process scheduler records ready-queue lengths over time: (0,2) ; (1,4) ; (2,6) ; (3,5) ; (4,2). What is the maximum ready-queue length and when does it occur?

A.4 processes at time 1
B.5 processes at time 3
C.6 processes at time 2 ✅
D.7 processes at time 4
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The table reaches its maximum ready-queue length of 6 at time 2. The tempting value 5 occurs at time 3; reading that later point misses the peak shown by the supplied data.

Q11. A batch-processing system uses non-preemptive SJF scheduling. A long database-reporting process remains ready while several short queries repeatedly arrive. What problem can occur, and which technique can reduce it?

A.Short processes starve; decreasing their priority reduces the problem
B.Long processes starve; aging gradually increases their priority ✅
C.All processes terminate prematurely; increasing the quantum solves this
D.Short processes experience deadlock; increasing memory capacity solves this
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Non-preemptive SJF can repeatedly select newly arriving short jobs while a long job remains ready, causing starvation. The tempting claim that short jobs starve is reversed; aging can gradually raise the long job's priority.

Q12. A batch system uses preemptive shortest-remaining-time-first scheduling. A arrives at 0 with burst 8, B arrives at 1 with burst 4, and C arrives at 2 with burst 2. What is the average waiting time?

A.2 time units
B.2.67 time units ✅
C.3 time units
D.4 time units
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: SRTF runs A 0–1, B 1–2, C 2–4, B 4–7, and A 7–14. Waiting times are 6, 2, and 0, so the average is 8/3=2.678/3=2.67; turnaround is larger.

Q13. A web application uses Round Robin with quantum 2. P1, P2, and P3 arrive simultaneously, with bursts 4, 3, and 2 respectively. The schedule begins P1: 0–2, P2: 2–4, P3: 4–6. What is P3's response time?

A.2 time units
B.3 time units
C.4 time units ✅
D.6 time units
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Round Robin first starts P1 at 0, P2 at 2, and P3 at 4. Since all arrive at zero, P3's response time is 4; its completion time is not its response time.

Q14. A producer-consumer application uses a bounded buffer containing five slots. Three semaphores represent available slots, occupied slots, and exclusive access. Which initial values are correct?

A.empty=0, full=5, mutex=1
B.empty=5, full=0, mutex=1 ✅
C.empty=5, full=1, mutex=0
D.empty=1, full=5, mutex=0
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Initially all five buffer slots are empty and none is full, while one producer or consumer may enter the protected buffer code. Therefore empty=5, full=0, mutex=1; reversing empty and full misrepresents occupancy.

Q15. A database uses a readers-preference synchronization policy. Multiple readers may enter together, but writers require exclusive access. A continuous stream of readers arrives while a writer waits. What is the potential consequence?

A.Readers may starve because writers always execute first
B.Both readers and writers execute simultaneously inside the critical section
C.Writers may starve because new readers repeatedly delay them ✅
D.The operating system automatically terminates all incoming readers
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: With reader preference, new readers may continue entering while a writer waits, repeatedly delaying that writer. The tempting claim that readers starve is incorrect; the policy favors readers and can starve writers.

Q16. Two processes each hold one resource and wait for the resource held by the other. Which necessary deadlock condition directly describes this circular dependency?

A.No preemption
B.Circular wait ✅
C.Mutual exclusion alone
D.Resource sharing
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Circular wait exists when processes form a closed chain, each waiting for a resource held by the next. The tempting hold-and-wait condition is related but does not specifically describe the cycle.

Q17. A system performs a Banker safety check. Available=(1,0). Allocation P0=(0,1), P1=(1,0), P2=(0,0). Need P0=(1,0), P1=(0,1), P2=(1,0). Which sequence is safe?

A.P1, P0, P2
B.P0, P1, P2 ✅
C.P2, P1, P0
D.P1, P2, P0
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: P0 can finish with Available=(1,0), releasing (0,1). P1 can then finish and release (1,0), allowing P2 to finish. The tempting P1-first sequence fails because its need is initially unmet.

Q18. A student observes that fork() returns the same value in both parent and child processes. Which correction should be made?

A.Both processes receive the child's process identifier
B.The child receives zero, while the parent receives the child's process identifier ✅
C.The parent receives zero, while the child receives the parent's process identifier
D.Both processes receive the parent's process identifier
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: fork() returns different values in the two processes: the child receives zero and the parent receives the child's identifier. The tempting same-value claim is wrong because each return identifies a different execution role.

Q19. A student claims that a running process becomes Ready immediately after requesting unfinished disk I/O because it has voluntarily released the CPU. Which correction is accurate?

A.It becomes Terminated until the disk responds
B.It remains Running while the device performs the operation
C.It becomes Ready because every system call enters the ready queue
D.It becomes Blocked until the requested I/O completes ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: The flawed step is moving the process to Ready after it requests unfinished I/O. It must become Blocked until completion; Ready means it can run, whereas the tempting Ready state ignores the pending event.

Q20. A producer inserts items into an initially empty bounded buffer using counting semaphores. A student proposes the order wait(full), wait(mutex), insert, signal(mutex), signal(empty). What is the correct correction?

A.Use wait(empty), wait(mutex), insert, signal(mutex), signal(full) ✅
B.Use wait(full), signal(mutex), insert, wait(empty), signal(full)
C.Use wait(mutex), signal(full), insert, wait(empty), signal(mutex)
D.Use wait(empty), signal(full), wait(mutex), insert, signal(mutex)
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A producer must reserve an empty slot before locking the buffer, insert the item, unlock, then signal full. Waiting for full first is tempting but blocks when the initially empty buffer has no items.

Q21. A student calculates the waiting time of a process as 9 units using completion time 12 and arrival time 3. Its CPU burst is 5 units. What is the correct waiting time?

A.3 time units
B.4 time units ✅
C.5 time units
D.9 time units
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Turnaround is completion minus arrival: 12−3=912-3=9. Waiting is turnaround minus CPU burst: 9−5=49-5=4. The student's 9 is turnaround, not waiting; the tempting value ignores time spent executing the job during its actual execution interval.

Q22. A preemptive priority scheduler assigns smaller numerical values to higher priorities. A arrives at 0 with burst 6 and priority 3, B arrives at 1 with burst 3 and priority 1, and C arrives at 2 with burst 2 and priority 2. When does A complete?

A.Time 6
B.Time 9
C.Time 11 ✅
D.Time 12
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: B preempts A at time 1, finishes at 4, and C then runs from 4 to 6 before A resumes. A completes at 11; the tempting time 6 is C's completion.

Q23. A resource-allocation graph contains a cycle involving a resource type with three identical instances. A student concludes that all processes in the cycle must be deadlocked. What is the correct assessment?

A.A cycle always proves deadlock regardless of resource instances
B.A cycle is impossible when resources have multiple instances
C.A cycle proves starvation but rules out deadlock
D.A cycle alone does not prove deadlock when multiple resource instances exist ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: A cycle in a graph with multiple instances of a resource type does not alone prove deadlock, because another instance may satisfy a waiting process. The tempting single-instance rule is being applied too broadly.

Q24. Three processes have arrival times P1=0, P2=1, and P3=2. Their execution is shown by the Gantt chart: P1 runs 0–3, P2 runs 3–5, P3 runs 5–9, P2 runs 9–10. What is the average response time?

A.1.33 time units
B.1.67 time units ✅
C.2 time units
D.3 time units
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: First response times are P1:0-0=0, P2:3-1=2, and P3:5-2=3. Their mean is (0+2+3)/3=1.67(0+2+3)/3=1.67; the tempting chart start time ignores arrival times rather than measuring turnaround or completion.

Q25. A multiprogrammed server switches from process P1 to P2, which uses a different address space. The processor has a TLB containing translations from P1. What should the operating system or hardware do to prevent incorrect translations?

A.Reuse all entries without checking process identity
B.Flush the TLB or use address-space identifiers to distinguish entries ✅
C.Clear the entire main memory before dispatching P2
D.Disable virtual memory during the context switch
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: After switching address spaces, old TLB entries must not be used as though they belong to the new process. Flushing entries or tagging them with address-space identifiers prevents incorrect translations; the tempting unconditional reuse is unsafe.

Q26. A high-priority process waits for a mutex held by a low-priority process. Meanwhile, a medium-priority process repeatedly preempts the lock holder. Which synchronization mechanism can reduce this priority inversion?

A.Priority inheritance ✅
B.Round Robin scheduling only
C.Disabling all process creation
D.Increasing the number of ready processes
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Priority inversion occurs when a high-priority process waits for a lock held by a lower-priority process. Priority inheritance temporarily boosts the lock holder; the tempting ordinary preemption can prolong the blockage.

Q27. A Banker algorithm state has Available=(1,1), Allocation P0=(1,0), P1=(1,1), P2=(1,0), Need P0=(1,1), P1=(1,1), and P2=(2,1). P0 requests (1,0). What should the operating system decide?

A.Reject because the request exceeds P0's remaining Need
B.Reject because the request exceeds Available
C.Grant after tentatively allocating because the resulting state is safe ✅
D.Grant only after P2 completes
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The request is within both P0's Need and Available. Tentatively granting it leaves Available=(0,1); P0 can finish, then P1, then P2. The tempting denial overlooks the resulting safe sequence.

Q28. A multiprogrammed system contains four processes, but all four are blocked waiting for I/O. No ordinary process is currently eligible for execution. What should the CPU scheduler normally execute?

A.The oldest blocked process
B.The process with the largest CPU burst
C.A terminated process retained in the PCB
D.An idle process or idle thread ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: If every ordinary process is blocked, none can be dispatched for useful work. The scheduler can run an idle thread until an event wakes a process; the tempting blocked-process choice cannot execute.

Q29. A performance monitor records degree of multiprogramming and CPU utilization: (1,20%) ; (2,42%) ; (4,70%) ; (8,88%) ; (12,89%) ; (16,65%). At which measured degree is CPU utilization highest?

A.8 processes
B.12 processes ✅
C.16 processes
D.4 processes
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Utilization peaks at 89% with twelve processes, then falls to 65% at sixteen. The tempting sixteen-process choice assumes more multiprogramming always helps, ignoring contention and the observed decline in this measured workload.

Q30. Two database processes acquire locks in inconsistent orders. P0 holds L1 and requests L2, while P1 holds L2 and requests L1. Which design change most directly prevents this deadlock by eliminating circular wait?

A.Require every process to acquire locks in the same predefined global order ✅
B.Allow processes to hold locks indefinitely while requesting additional locks
C.Increase the number of processes competing for the locks
D.Give each process a separate ready queue without changing lock acquisition
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Require every process to acquire locks in the same global order. Then a process cannot hold a later lock while waiting for an earlier one, breaking circular wait; the tempting inconsistent order permits deadlock.

🔗 Related Topics (MCQs)