🎓 BookMCQ
← Back to 3. Processes in Operating System

📝 Process Concept in the context of process implementation (35 MCQs)

Process Abstraction, Execution Context, and Kernel Representation

Process implementation belongs to process management and describes how an operating system represents and maintains executing programs. A process includes its executable code, data, stack, heap, processor state, and allocated resources. The kernel maintains a process control block (PCB) containing the process identifier, execution state, register information, scheduling attributes, and resource references, allowing execution to be interrupted and resumed safely.

Why Programs Require Individual Execution Contexts

A program stored on disk does not contain all information needed to represent an active execution. Multiple instances may execute independently, each requiring separate memory, registers, and resource ownership. The operating system therefore maintains individual execution contexts and protects them from interference. This separation supports multitasking, concurrent execution, process isolation, and controlled sharing of system resources.

PCB Organisation, Process States, and Hardware Context

When a process is created, the kernel allocates its management information and establishes its initial execution context. The PCB records its current state, while memory-management structures describe its address space. During a context switch, the kernel saves processor registers and the program counter, updates the old PCB, and restores the selected process's saved context.

Switching Between Two Processes Using Their PCBs

Suppose process P1 executes with program counter 1,200 when a timer interrupt occurs. The kernel saves its register values and program counter in P1's PCB. If P2 is selected, its saved context is restored, allowing execution to continue from its previous instruction position. P1 retains its state and can resume during a later dispatch.

Execution Isolation, Context-Switch Costs, and Resource Sharing

Process implementation provides the foundation for multitasking, protection, scheduling, and resource accounting. Separate address spaces prevent many unintended memory conflicts, while saved contexts support interrupted execution. However, PCBs, memory allocations, and context switches consume resources. Process isolation also does not eliminate the need for synchronisation when processes intentionally share memory, files, or other resources.

Misconceptions About Process Identity and Execution State

'A process is only an executable file' is incorrect because execution requires state and allocated resources. 'A PCB contains the complete program code' is incorrect because it stores management information and execution context. 'A context switch always changes process identity' is incorrect because switches can also occur between threads of the same process.

Exam Focus: PCB Fields and Process Execution Context

Identify the information maintained in a PCB and explain how it supports process execution, suspension, and resumption. Trace register and program-counter updates during context switching. Distinguish a program from a process and a process from a thread. Questions may also examine process states, address-space isolation, resource ownership, and the overhead of maintaining multiple execution contexts.

Key Terms of Process Implementation

  • PCB - Kernel record containing process information.
  • Process ID - Unique process identifier.
  • Program counter - Address of the next instruction.
  • Context switch - Saving and restoring execution state.
  • Stack - Stores function calls and local data.
  • Heap - Region for dynamic memory allocation.
5
Easy
14
Medium
16
Hard

📝 All Process Concept in the context of process implementation MCQs

Q1. Which part of a process holds local variables and function parameters during execution?

A.Heap
B.Stack ✅
C.Text section
D.Data section
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The stack stores local variables, function parameters and return addresses for each active function call. It grows and shrinks as calls are made and returned, so it is the segment that tracks the current chain of execution inside a process.

Q2. Which field of a process control block records the address of the next instruction to execute?

A.Program counter ✅
B.Stack pointer
C.Process identifier
D.Scheduling priority
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The program counter in the process control block stores the address of the next instruction. When the process is switched out and later resumed, the operating system restores this value so that execution continues exactly where it stopped without repeating or skipping work.

Q3. Which process state describes a process that is blocked, waiting for an event such as the completion of an input or output operation?

A.Ready
B.Running
C.Waiting ✅
D.New
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: A waiting process cannot use the CPU even if the CPU is idle, because it is blocked on an event that has not yet occurred. Once the event completes, the process moves back to the ready state and competes for the processor again.

Q4. Which section of a process stores global and static variables that have been initialised by the programmer?

A.Stack
B.Heap
C.Data section ✅
D.Register file
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The data section holds initialised global and static variables for the lifetime of the program. Variables that persist across function calls and remain available throughout execution are placed here, separate from the stack's short-lived local data and the heap's dynamically allocated memory.

Q5. Which term describes a program that has been loaded into memory and is currently being executed by the system?

A.Process ✅
B.Algorithm
C.Module
D.Thread library
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A process is an active entity: a program in execution, together with its current activity and resources. The program itself is a passive file stored on disk, and it becomes a process only when the operating system loads it and begins running its instructions.

Q6. A student believes that a program and a process are the same thing. Which correction is most accurate?

A.They are identical, so the student is right.
B.A program is a passive file on disk, while a process is an active instance of that program with its own state and resources. ✅
C.A process is always stored on disk permanently.
D.A program can be executed only after the process has finished.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The distinction matters because one program can produce many processes, each with separate memory and state. Two users launching the same editor create two processes from one program file, which is why the operating system must track each process individually.

Q7. Why must the operating system save and restore the process control block during a context switch?

A.So the process can resume exactly where it stopped, with its registers, counter and state intact. ✅
B.So the process can change its program file on disk.
C.So the compiler can rewrite the source code.
D.So the printer can be reserved for that process.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: During a context switch the current state of the process, including the program counter and register values, is saved in its control block. Restoring that information later lets the process continue as if it had never been interrupted, which is the basis of multitasking.

Q8. Why is memory for dynamically allocated data typically placed in the heap rather than on the stack?

A.Heap allocations have sizes and lifetimes that are not known at compile time and may outlive a single function call. ✅
B.Stack memory is always larger than the heap.
C.The heap is used only for storing the program's text.
D.The stack cannot store integers.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Dynamic allocation decides sizes and lifetimes at run time, and the data may need to persist beyond the function that created it. The heap supports this flexibility, whereas stack frames are released automatically when a function returns, which makes them unsuitable for data that must outlive that call.

Q9. Why is the text section of a process usually marked as read-only in memory?

A.To make the program run more slowly so it is safer.
B.To prevent accidental modification of instructions and to allow the same code to be shared safely among processes. ✅
C.Because instructions cannot be stored in memory.
D.So that the stack can grow into it.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The text section contains machine instructions that should not change during execution. Marking it read-only protects against corruption from bugs or attacks, and it allows several processes running the same program to share one copy of the code, saving memory.

Q10. A process issues a blocking input request. Why does the operating system move it from the running state to the waiting state rather than keeping it on the CPU?

A.Because a process that is waiting for input would otherwise prevent other ready processes from using the CPU productively. ✅
B.Because the CPU cannot execute instructions while input is pending.
C.Because waiting processes are always deleted by the operating system.
D.Because the process must release its program file from disk.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Keeping a blocked process on the CPU would waste processor time while it does nothing useful. By moving it to the waiting state, the operating system frees the CPU to run other ready processes, which improves overall utilization and responsiveness of the system.

Q11. Which information is typically NOT stored in a process control block?

A.The process identifier and current state
B.The contents of the program's source code file on disk ✅
C.The scheduling priority and accounting data
D.The values of the CPU registers at the last switch
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A process control block stores the state information the operating system needs to manage the process, such as identifiers, state, priority and saved registers. The source code remains a separate file on disk and is not copied into the control block, which holds only management data.

Q12. Why does the operating system need to track the state of every process at all?

A.To decide which processes can use the CPU, and to manage resource allocation and scheduling correctly. ✅
B.To decide which fonts the user prefers.
C.To make the disk capacity larger.
D.To replace all user programs with system programs.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Process states tell the scheduler which processes are eligible to run and which are blocked. Without accurate state information, the operating system could give the CPU to a process that cannot use it or fail to resume a process that is ready, which would disrupt correct execution.

Q13. A process moves from the new state to the ready state. Which event most likely caused this transition?

A.The process finished its execution and terminated.
B.The operating system admitted the process into memory because the required resources were available. ✅
C.The process began waiting for a keyboard event.
D.The process was preempted by a higher-priority process while running.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The new state represents a process that has been created but not yet admitted. When the operating system has allocated the necessary resources, the process is admitted and becomes ready to compete for the CPU, so the transition reflects admission rather than completion or blocking.

Q14. A process is created from a compiled program that declares a global array and also calls a memory allocation function at run time. Which segments hold these two kinds of data respectively?

A.The global array in the stack and the allocated memory in the text section.
B.The global array in the data section and the allocated memory in the heap. ✅
C.Both in the text section.
D.Both in the stack.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Global arrays declared by the programmer live in the data section for the life of the program. Memory obtained through allocation at run time comes from the heap, so the segment choice follows from how and when the memory is requested. Confusing these regions is a common source of misunderstanding about process layout.

Q15. A process in the running state is interrupted and the operating system performs a context switch. Which sequence correctly describes the steps?

A.Save the state of the current process, load the state of the next process, then resume the next process. ✅
B.Load the next process, discard the current process, then save its state.
C.Resume the next process, then save the current process state.
D.Delete the current process, then load the next process.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: A context switch must first preserve the current process's state so nothing is lost. The state of the next process is then restored, and only after that can execution continue. Reversing these steps would either lose the interrupted process's progress or run the next process with the wrong state.

Q16. After a context switch, which values must be restored exactly for a process to continue correctly?

A.Only its file name on disk.
B.Its program counter, register values and stack pointer. ✅
C.Only the number of processes in the system.
D.Only the size of the heap.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Continuing a process correctly requires the exact point of execution and the working state, which are the program counter, the registers and the stack pointer. The file name and system-wide counts are irrelevant to resuming execution, and restoring anything less would produce incorrect results or crashes.

Q17. A four-core system has 9 processes in the ready state and 2 processes in the waiting state. What is the maximum number of processes that can be in the running state at the same moment?

A.2
B.4 ✅
C.9
D.11
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Each core can execute one process at a time, so at most 4 processes can be running simultaneously. The ready and waiting counts do not increase this limit; they only indicate how many processes are queued or blocked. Assuming that every process could run at once is a common error.

Q18. A process goes through these events: created, admitted, dispatched, blocked for input, input completed, dispatched again, and finally exits. Counting each change of state, how many state transitions occur if creation to ready is one transition and so on?

A.4
B.5
C.6 ✅
D.7
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The sequence of state changes is new to ready, ready to running, running to waiting, waiting to ready, ready to running, and running to terminated, which gives six transitions. Counting carefully means listing every change of state rather than only the named events, which is where many students lose track.

Q19. A debugger shows that a process is in the waiting state, and its program counter keeps pointing to the same instruction for a long period. Which interpretation is most accurate?

A.The process has finished its work and should be terminated immediately.
B.The process is blocked at the instruction that requested an event, and it will remain there until that event completes. ✅
C.The program counter is broken and the operating system must reset it.
D.The process is running at high speed on the CPU.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: A blocked process stops at the instruction that issued the blocking request, so its program counter stays fixed while it waits. This is normal behaviour and is not a fault by itself. The debugger evidence supports the interpretation that the process is waiting for an event rather than progressing.

Q20. Two terminals each start the same text editor program at the same time. Which statement is most accurate about the processes created?

A.There is only one process, because the program is the same.
B.There are two processes, each with its own control block and stack, and the operating system may share one copy of the read-only text section between them. ✅
C.There are two processes that must share the same stack and heap.
D.There are two processes, but neither can use the CPU.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Each launch creates a separate process with its own state, stack and heap, so the two editors are independent. Because the text section is read-only, the operating system can share the instructions between them to save memory. The option that claims shared stacks or no CPU access reflects common misconceptions.

Q21. A student says that once a process enters the waiting state, it can never return to the ready state. What is the error in this reasoning?

A.There is no error, because waiting is a permanent condition.
B.When the awaited event completes, the process moves from waiting back to ready and can again compete for the CPU. ✅
C.Waiting processes are always terminated automatically.
D.The waiting state exists only for printers.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The waiting state is temporary: it lasts only until the event the process needs, such as input or a timer, occurs. The operating system then moves the process to the ready queue. Treating waiting as permanent would wrongly imply that many programs could never finish blocking operations.

Q22. A student claims that the process control block is stored in the program's text section so that it can be read easily. What is wrong with this claim?

A.Nothing is wrong, since the text section is the most accessible memory.
B.The control block is operating system data kept in protected kernel memory, not in the program's read-only instruction area. ✅
C.The control block is stored only on the keyboard.
D.Process control blocks do not exist in modern systems.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The control block holds management data that the operating system must protect from user programs. Placing it in the text section would expose it and mix system data with program code, so it is kept in protected kernel memory that the process cannot modify directly.

Q23. A student says that two copies of the same program always have identical process identifiers because they come from the same file. Which evaluation is accurate?

A.The claim is correct because identical programs share identifiers.
B.The claim is flawed because each new process receives its own unique identifier, even when the programs are identical. ✅
C.The claim is correct only on printers.
D.The claim is flawed because process identifiers do not exist.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: A process identifier is assigned by the operating system when each process is created, so every process has a unique identifier regardless of the program file it came from. The program file is passive, and its identity does not determine the identity of the processes launched from it.

Q24. A student claims that both the stack and the heap of a process are fixed-size regions chosen at compile time. What is the correction?

A.The claim is correct for both regions.
B.The heap changes size at run time as memory is allocated and freed, so it is not fixed in the way the student assumes. ✅
C.Neither region exists in a process.
D.The stack is fixed and the heap does not exist.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The heap grows and shrinks dynamically according to allocation requests, and the stack also grows with function calls. Their sizes are not fixed when the program is compiled. The student's error ignores the dynamic nature of both regions, which is central to how processes manage memory.

Q25. A student says that a process in the new state already occupies the CPU while it is being admitted. What is the flaw in this claim?

A.There is no flaw, since admission requires the CPU.
B.A process in the new state has not yet been admitted and is not using the CPU; it only receives the CPU after it becomes ready and is dispatched. ✅
C.A new process is always running on a separate computer.
D.The new state is the same as the terminated state.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The new state marks a process that is still being set up and has not been admitted into the ready queue. The CPU is used only in the running state, after admission and dispatch. Confusing creation with execution misrepresents the normal path through process states.

Q26. A table shows the time spent in each state for a process over one interval: running 4 ms, waiting 10 ms, ready 6 ms. Which inference is best supported by this data?

A.The process is mostly CPU-bound and rarely waits for events.
B.The process spends the largest share of its time blocked, which suggests it is more I/O-bound than CPU-bound. ✅
C.The process never leaves the running state.
D.The ready time proves the process has finished.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The waiting time of 10 ms is larger than the running time of 4 ms, so the process spends most of its time blocked on events, which is typical of I/O-bound behaviour. This inference is supported by the data, though it describes one interval and should be confirmed over longer observation.

Q27. A system records how many processes are in each state at two moments: at time 0 there are 5 ready, 1 running and 2 waiting; at time 5 there are 2 ready, 1 running and 5 waiting. What is the best inference?

A.The system has become more CPU-efficient because fewer processes are waiting.
B.Many more processes have become blocked over time, which suggests increasing dependence on events such as input or output. ✅
C.The number of processes has dropped to zero.
D.The running state no longer exists.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The count of waiting processes rose from 2 to 5 while ready processes fell from 5 to 2. This shift indicates that more processes are being blocked on events, which could point to I/O contention or slow devices. The inference is drawn directly from the change in state counts over the two observation times.

Q28. A line graph plots the program counter of a process against time. The value rises steadily, then stays flat for a long interval at one address before rising again. What does the flat region most likely indicate?

A.The process was blocked at one instruction while waiting for an event. ✅
B.The process has terminated and the counter reset to zero.
C.The process is running at the same speed across the whole time.
D.The process moved to a different program.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: A flat program counter over an interval means execution has stopped at one instruction, which is typical of a process blocked on a request. The counter rises again once the event completes and execution resumes. Reading this pattern correctly identifies the waiting period without needing any other data.

Q29. A bar chart shows the number of context switches per second for three programs: program A 50, program B 2000, program C 10. Which program is most likely to be I/O-bound, given that frequent blocking increases switching?

A.Program A, since it has the most switches.
B.Program B, since its high switch count suggests frequent blocking and rescheduling. ✅
C.Program C, since it has the fewest switches.
D.All three are equally I/O-bound.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Frequent context switches often occur when processes block and yield the CPU repeatedly, which is characteristic of I/O-bound work. Program B has by far the highest count, so it is the most likely candidate. The inference is a reasoned guess from the pattern, not a certainty.

Q30. Which combination correctly describes what the operating system saves when a running process is moved to the waiting state?

A.The program counter, the register values and an updated state field in the control block. ✅
B.The program's source code and its file name.
C.The keyboard layout and the screen resolution.
D.Nothing, because the process keeps all its state automatically.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Moving a process out of the running state requires saving its program counter, registers and updating its state to waiting in the control block. This preserves enough information to resume the process later. The other options describe data that is unrelated to the process's execution state.

Q31. Which pairing correctly matches a memory section with its lifetime?

A.Stack with local variables that exist for the duration of a function call ✅
B.Data section with local variables that are discarded after every function call
C.Heap with the program's instructions that never change
D.Text section with memory that is freed at each function return
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Local variables live on the stack and are released when their function returns, which matches the option. Local variables are not in the data section, the heap holds dynamically allocated memory rather than instructions, and the text section contains the program's code, so the other pairings contain errors.

Q32. A process in the waiting state is holding memory and open files but no CPU. Which statement is correct about its resources?

A.It has released all its memory and files because it is not running.
B.It still holds its memory and open files, but it does not hold the CPU while it waits. ✅
C.It holds the CPU but not its memory.
D.It holds nothing and must be restarted.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A waiting process retains its allocated memory and open files because it still needs them when the event completes. What it gives up is the CPU, which becomes available to other processes. Releasing all resources on blocking would force the process to reacquire them, which is inefficient and unnecessary.

Q33. A system has 1024 processes, and each process control block requires 2 KB of memory. What total memory do the control blocks require, expressed in megabytes?

A.1 MB
B.2 MB ✅
C.4 MB
D.2048 MB
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The total is 1024×2=20481024 \times 2 = 2048 KB, which equals 2048/1024=22048 / 1024 = 2 MB. The large number of processes multiplies a modest per-process cost into a significant total, which is why control block size matters for systems that support many concurrent processes.

Q34. A process spends 60 percent of its time waiting for events and 40 percent running on the CPU. Five identical processes share a single CPU, and their waiting periods overlap independently. Approximately what fraction of time is the CPU busy?

A.40 percent
B.60 percent
C.92 percent ✅
D.100 percent
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The CPU is idle only when all five processes are waiting at the same time, which happens with probability 0.65=0.077760.6^5 = 0.07776. The CPU is therefore busy with probability 1−0.65≈0.9221 - 0.6^5 \approx 0.922, or about 92 percent. This assumes independent waiting, which is an idealised model rather than an exact measurement.

Q35. Why does a process that has been admitted into memory not necessarily start executing immediately?

A.It is deleted by the compiler as soon as it is admitted.
B.It must wait in the ready queue until the dispatcher selects it and the CPU becomes available to it. ✅
C.Admitted processes always wait for a printer before running.
D.Admission and execution happen at different computers, so the process must be moved.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Admission places a process in memory and the ready queue, but the CPU is shared among many ready processes. The dispatcher chooses which ready process runs next, so a newly admitted process may wait its turn. This separation between admission and dispatch is central to how the operating system manages multiprogramming.

🔗 Related Topics (MCQs)