🎓 BookMCQ
← Back to 6. CPU Scheduling

📝 Load Balancing in Multiple Processor Scheduling (41 MCQs)

📖 From Operating System • 6. CPU Scheduling • 41 questions available

What is Load Balancing in Multiple Processor Scheduling?

Definition:
Load balancing distributes work evenly across mm processors using push migration (overloaded CPU pushes tasks) or pull migration (idle CPU pulls tasks) to minimize variance σL2\sigma^2_L in per-CPU utilization.

Example:
When CPU3 reaches 95% utilization while CPU7 is at 20%, the load balancer migrates two runnable tasks from CPU3 to CPU7 within the next scheduling tick.

Reason:
Without balancing, some CPUs remain idle while others are overloaded, wasting parallel hardware capacity; effective balancing maximizes aggregate throughput and reduces tail latencies.

10
Easy
20
Medium
11
Hard

📝 All Load Balancing in Multiple Processor Scheduling MCQs

Q1. What is the primary objective of load balancing on an SMP system?

A.To increase the clock speed of each processor
B.To ensure all processors have an equal share of the workload ✅
C.To reduce the total number of context switches
D.To allocate more memory to heavily loaded processors
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The main goal of load balancing is to distribute the workload evenly across all processors, preventing some from being idle while others are overloaded. This optimizes the system's overall throughput and efficiency by leveraging all available processing power.

Q2. In an SMP system, when is load balancing typically considered unnecessary?

A.When the system uses a common run queue ✅
B.When processors have private run queues
C.When processor affinity is enabled
D.When the system has more than 16 processors
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Load balancing is not needed with a common run queue because an idle processor can immediately get a new process. The scheduling mechanism itself distributes the workload dynamically without requiring an external balancing process, as the queue is shared by all CPUs.

Q3. Which load balancing technique involves an idle processor taking a task from a busy processor?

A.Push migration
B.Pull migration ✅
C.Processor affinity
D.Context switching
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Pull migration is characterized by an idle processor proactively seeking out and acquiring a waiting task from another processor that has a backlog. This is a 'pull' mechanism, where the idle CPU initiates the load transfer to start working immediately.

Q4. Which load balancing technique involves a task moving processes from an overloaded processor to a less-busy one?

A.Context switching
B.Pull migration
C.Push migration ✅
D.Processor affinity
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: Push migration is an active method where a system task checks loads and redistributes them by moving (or pushing) processes from processors with high workloads to those that are idle or have lower workloads. This is a proactive approach to balancing the system.

Q5. Load balancing is a direct countermeasure to what inefficiency on an SMP system?

A.Increased memory access latency
B.One or more processors sitting idle ✅
C.Inefficient interrupt handling
D.Excessive power consumption
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The core problem addressed by load balancing is processor idleness. When workloads are unevenly distributed, some CPUs become idle while others are overwhelmed. Load balancing remedies this by redistributing tasks to ensure all processors are kept busy.

Q6. In the context of load balancing, what is the primary function of a 'private queue of eligible processes'?

A.To store processes that are waiting for I/O
B.To determine which processes have priority
C.To hold processes waiting to run on that specific processor ✅
D.To hold processes that have been preempted
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: A private queue is specific to a processor and contains the processes it will execute next. This structure is a prerequisite for load balancing because the scheduler needs to move processes between these private queues to balance the overall system load.

Q7. What is the main disadvantage of moving a process from one processor to another for load balancing?

A.It increases the system's power consumption
B.It is not supported by most operating systems
C.It increases memory usage on the destination processor
D.It reduces the benefits of processor affinity ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: Moving a process to a different processor means the data it was using is no longer in the new processor's cache. This loss of cache locality, which is the core benefit of processor affinity, is the primary drawback and can temporarily reduce performance for the moved process.

Q8. Which contemporary operating system scheduler is explicitly mentioned as implementing both push and pull migration?

A.Windows NT Kernel
B.macOS XNU
C.Linux Scheduler ✅
D.Solaris Scheduler
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The text provides the Linux scheduler as a specific example of a system that successfully implements both push and pull migration techniques. This demonstrates a practical, real-world application of the theoretical concepts.

Q9. What is the purpose of a system periodically checking the load on each processor?

A.To perform push migration ✅
B.To perform pull migration
C.To enforce processor affinity
D.To increase the priority of a process
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Periodic load checking is the trigger for push migration. If the system task finds an imbalance, it actively pushes processes from overloaded processors to less-busy ones. This is a scheduled, proactive rebalancing of the load across the system.

Q10. In a system with private run queues, what is the initial condition that can cause an imbalance?

A.All processors have equal workloads
B.Processes are scheduled randomly to queues
C.Processors are assigned tasks at boot time only
D.The workload distribution becomes uneven over time ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: An imbalance arises naturally over time as processes arrive and terminate. One processor might have a high number of CPU-bound processes, while another might have mostly I/O-bound processes, leading to different queue lengths and utilization levels that load balancing aims to correct.

Q11. If a processor becomes idle on a system with a common run queue, what is its next action?

A.It signals the OS to perform push migration
B.It attempts to enter a low-power state
C.It immediately extracts a runnable process from the common queue ✅
D.It waits for a pull migration request
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: On a system with a common run queue, the scheduling decision is centralized. An idle processor can simply access the shared queue and pick the next available process to run without needing a separate load-balancing mechanism to find work.

Q12. Which of the following scenarios would most strongly justify the use of load balancing on an SMP system?

A.A system with a single, central run queue
B.A system where all processes are CPU-bound and execute for the same duration
C.A system with a heavy mix of CPU and I/O-bound processes
D.A system where each processor has a private run queue and workload distribution is skewed ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: The need for load balancing is most apparent when private queues exist and the distribution of work is uneven. The mix of process types (CPU/I/O) contributes to this skew, making balancing necessary to fully utilize all processors.

Q13. An operating system places a higher value on processor affinity than on immediate load balance. Which policy would it likely adopt?

A.An idle processor always pulls a process from a non-idle processor
B.Load is balanced at every scheduling tick
C.Processes are moved only if the load imbalance exceeds a certain threshold ✅
D.The system checks for load imbalance only once per second
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: A threshold policy prioritizes affinity by only moving processes when the imbalance is significant. This prevents the constant movement that would flush caches, sacrificing optimal immediate balance to maintain better performance for most processes.

Q14. Given the context of load balancing and affinity, what is the primary challenge for system engineers?

A.Ensuring all processors have the same amount of RAM
B.Writing software that can run on multiple processors
C.Managing the inherent tension between two beneficial but opposing policies ✅
D.Choosing the correct clock speed for the system
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The primary challenge is the fundamental conflict: load balancing needs to move processes, which breaks affinity. There is no perfect solution, so engineers must make policy decisions on how to best balance these two competing interests for their specific system's workload.

Q15. In a system implementing both push and pull migration, how do the two techniques interact?

A.They are mutually exclusive; only one can be active at a time
B.Push migration moves processes from busy to idle processors, while pull migration moves processes from idle to busy
C.They operate in parallel, with push handling periodic checks and pull handling immediate idle requests ✅
D.They are the same function, just with different names
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: These techniques are often parallel and complementary. Push migration is a proactive, periodic rebalancing of the system. Pull migration is a reactive, immediate response by an idle processor to find work, ensuring it doesn't stay idle when work is available elsewhere.

Q16. What type of system architecture is described as having 'fast access' to a specific 'memory' for a CPU, as shown in the provided context?

A.Uniform Memory Access (UMA)
B.Distributed Memory Access (DMA)
C.Symmetric Multiprocessing (SMP)
D.Non-Uniform Memory Access (NUMA) ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: The description of a CPU having 'fast access' to its 'local memory' and slower access to other memory is a defining characteristic of a NUMA system. This architecture directly impacts CPU scheduling, as placing a process on its local NUMA node is beneficial for performance.

Q17. Why might a system designer choose to implement load balancing using a threshold policy rather than an 'always pull' policy?

A.To reduce the power consumption of the CPUs
B.Because threshold policies are easier to code
C.To mitigate the cache-invalidation effects of constant process migration ✅
D.Because 'always pull' policies are not supported in modern OSs
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: An 'always pull' policy would move processes frequently, breaking affinity and invalidating cache data. A threshold policy allows the system to tolerate a certain level of imbalance, preserving cache locality for processes and overall system performance, rather than chasing a perfectly balanced but inefficient state.

Q18. Considering the conflict between load balancing and processor affinity, what is the most likely reason an idle processor will 'always pull' a waiting task in some systems?

A.This policy aims to maximize overall throughput at any cost
B.This policy is designed to minimize the time a processor remains idle ✅
C.This policy prioritizes data cache locality over all other concerns
D.This policy is necessary to prevent system crashes
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The primary reason for an 'always pull' policy is to minimize processor idleness. An idle CPU is a wasted resource. By immediately taking a task, the system maximizes its immediate utilization, even if it means sacrificing the cache locality for the process being moved.

Q19. Which two key metrics would a 'specific task' primarily analyze to determine if an imbalance exists for push migration?

A.Process execution time and memory footprint
B.Interrupt rate and page fault frequency
C.Processor queue length and processor utilization ✅
D.Average process age and priority
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: For push migration, the task would analyze the load, typically measured by the length of the run queue (number of ready processes) and the overall CPU utilization. A processor with a long queue and high utilization is 'overloaded,' while one with a short queue and low utilization is 'idle' or 'less busy.'

Q20. A system is designed with a private run queue for each processor and a strict policy that prevents process migration. What is the most likely consequence of this design?

A.Improved performance due to perfect cache affinity
B.Loads will perfectly balance themselves over time
C.Some processors may be idle while others are overloaded ✅
D.The system will not be able to run multi-threaded applications
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Without migration, processes are tied to their initial processor. If workloads are unevenly distributed and processes don't terminate simultaneously, some CPUs will have long queues while others remain idle. This is a classic inefficiency that load balancing is designed to prevent, making it a likely consequence.

Q21. A user reports that a multi-threaded application is running slower than expected on a 16-core server. The system monitor shows that 4 cores are at 100% utilization and 12 are at 0%. What is the most probable cause?

A.The application is not multi-threaded
B.The system memory is faulty
C.Load balancing is not functioning or is ineffective ✅
D.The processor affinity is set incorrectly
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: This is a classic symptom of a load imbalance and the absence of effective load balancing. Work is not being distributed, causing 4 cores to be completely saturated while the other 12 sit idle, bottlenecking the entire application's performance and defeating the purpose of an SMP system.

Q22. In a heavily loaded system with private run queues, what is the primary advantage of using both push and pull migration together over using only one method?

A.It reduces the total memory required for process queues
B.It provides a more robust and responsive balancing mechanism ✅
C.It simplifies the operating system's scheduling code
D.It eliminates the need for a common run queue
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Using both techniques provides redundancy and responsiveness. Push migration proactively prevents build-up, while pull migration ensures that no processor stays idle for long if work exists. This dual approach handles both long-term skew and short-term idleness effectively.

Q23. A system administrator is evaluating a new server. The server's documentation states it uses 'pull migration' exclusively for load balancing. What is a potential limitation of this design?

A.It cannot move processes from idle processors ✅
B.It cannot handle situations where all processors are busy
C.It is a proactive method that wastes CPU cycles on checks
D.It can only migrate processes at fixed time intervals
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Exclusive pull migration means that work is only transferred when a processor becomes idle. This model is reactive. It cannot proactively move processes to 'prepare' for future load, and it fails to correct a severe imbalance where no processor is idle but some are still much busier than others.

Q24. What is the fundamental, unavoidable consequence of moving a process to a new processor in an SMP system, from a hardware perspective?

A.The process's page table entries are invalidated
B.The process's execution priority is reset to the default
C.The data in the source processor's cache is rendered partially or fully invalid for that process ✅
D.The process's allocated memory is transferred to a new physical location
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: When a process moves, the cache on its original processor contains its data. On the new processor, this data is not present. While the memory itself is shared, the cache is not. This means the process will experience a significant number of cache misses, causing a temporary but often noticeable performance penalty.

Q25. An OS designer wants to implement a load-balancing algorithm that is adaptive. Which decision-making process for migration best reflects this approach?

A.Move a process whenever a processor becomes idle
B.Move a process only when a load imbalance exceeds a dynamic threshold ✅
C.Move a process to the processor with the fastest clock speed
D.Move a process based on a fixed, periodic schedule
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: An adaptive algorithm responds to the current state. A dynamic threshold, one that adjusts based on the system's current load or usage patterns, is adaptive. An 'always' policy is static, and a fixed schedule doesn't take the system's dynamic state into account. This is a hallmark of sophisticated systems engineering.

Q26. Consider a system that is implementing processor affinity. What is the most significant trade-off the scheduler must manage when a pull migration event is triggered?

A.It must choose between memory bandwidth and I/O throughput
B.It must choose between maintaining cache locality and ensuring processor utilization ✅
C.It must choose between increasing context-switch overhead and decreasing interrupt latency
D.It must choose between fair CPU time and I/O priority
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: This is the core trade-off. Pull migration immediately improves processor utilization (a benefit) by moving a task. However, it directly breaks the processor affinity, meaning the process loses its cached data on the new CPU, which negatively impacts its immediate performance. The scheduler must manage this conflict.

Q27. The system's load-balancing task determines that an imbalance exists and initiates push migration. However, the selected processes to move are all very short-lived CPU bursts. What is a likely inefficiency of this action?

A.The processes will cause a high number of page faults
B.The cost of migration (context switch, cache flush) will outweigh the benefit of balancing ✅
C.The destination processor will not have enough memory to run them
D.The processes will have their priorities reduced
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Moving a process has overhead. If a process is short-lived, the overhead of moving it to another processor could be larger than the time it would have spent running on the busy processor. The migration would cause a net performance loss, making it an inefficient action.

Q28. In a NUMA architecture, what critical factor must the load balancer consider that is less of a concern in a typical SMP system?

A.The number of processors in the system
B.The total amount of physical RAM
C.The memory access latency for a process on a given processor ✅
D.The size of each processor's L2 cache
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: In NUMA, memory access is non-uniform. A process's performance is highly dependent on whether it is running on the same node as its allocated memory. A load balancer must consider this, as moving a process to a different NUMA node can dramatically increase memory access latency, significantly degrading performance.

Q29. A kernel developer proposes to enhance the scheduler by adding push migration that runs every 10 milliseconds. What is the most likely negative impact of this choice?

A.The system will be unable to handle real-time processes
B.There will be a significant overhead from constant scheduling checks and migrations ✅
C.The time quantum for all processes will have to be increased
D.The system will fail to detect load imbalances
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: A push migration task running every 10ms would impose a very high overhead. Each check involves analyzing the load on each CPU, and if a migration is triggered, it involves context switches and cache invalidations. This overhead could cripple the system's performance, outweighing the benefits of a perfectly balanced load.

Q30. Which of the following best describes the relationship between processor affinity and load balancing?

A.They are mutually exclusive; a system can have one or the other, but not both.
B.They are synergistic; implementing one automatically improves the other.
C.They are competing objectives that require careful policy management to optimize overall system performance. ✅
D.They are identical concepts; both refer to the scheduling of processes on a CPU.
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: They are competing priorities. Affinity wants to keep a process on one CPU for cache performance. Load balancing wants to move processes to optimize overall utilization. They directly conflict, and an operating system must use a policy (like a threshold) to find the best balance for the system's workload.

Q31. A system is using a common run queue. A process is currently executing on CPU 1. What mechanism ensures CPU 2 does not become idle when CPU 1 is heavily loaded?

A.The common run queue itself acts as a balancing mechanism ✅
B.A dedicated load-balancing daemon performs push migration
C.CPU 2 will pull the process from CPU 1
D.The OS will preempt the process on CPU 1
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: In a system with a common run queue, the queue is shared. CPU 2, upon becoming idle, can simply look at the common queue and take a new process. This shared nature inherently provides load balancing, making the process migration techniques like push and pull unnecessary.

Q32. What is the defining characteristic of a system that requires load balancing for optimal performance?

A.Each processor has its own private run queue of processes ✅
B.The system has more than 4 processors
C.The system uses a uniform memory access architecture
D.The system is running multiple virtual machines
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The text explicitly states that load balancing is necessary on systems with private queues. This structure creates the potential for an imbalance, where one processor's queue is full while another is empty, requiring an external mechanism to redistribute the load.

Q33. In the context of the text, which of the following statements about push and pull migration is true?

A.They are mutually exclusive design choices
B.They are typically used in different operating systems
C.They are not mutually exclusive and are often implemented together ✅
D.Push migration is considered obsolete
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The text clearly states they are not mutually exclusive and are often implemented in parallel. This demonstrates that a robust scheduling system can benefit from both the proactive and reactive aspects of these techniques.

Q34. A processor in an SMP system is observed to be 100% idle. According to the concept of pull migration, what action should this processor take to become productive?

A.It should wait for a specific task to be assigned
B.It should proactively fetch a waiting task from a busy processor ✅
C.It should signal the operating system to shut it down
D.It should execute a 'no-operation' (NOP) instruction
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Pull migration is defined as the action of an idle processor pulling a waiting task from a busy processor. The idle CPU takes the initiative to find work and reduce its own idle time, which is the specific action described.

Q35. What is a direct consequence of load balancing that is considered a trade-off with processor affinity?

A.Improved I/O performance
B.Increased memory utilization
C.Removal of the process's data from the source processor's cache ✅
D.Reduction in context-switch overhead
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The trade-off is that a process's cache data is lost when it moves. The source processor's cache no longer holds the process's data, which was the benefit of affinity. This is a key performance penalty that must be weighed against the benefit of a balanced load.

Q36. Why is load balancing less critical on systems that use a common run queue?

A.Because the common queue is always empty
B.Because the common queue automatically provides a degree of load distribution ✅
C.Because the common queue ensures every processor gets an equal number of interrupts
D.Because the common queue is managed by a dedicated hardware module
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A common run queue is a single shared resource. When a processor is idle, it simply takes the next task from the shared queue. This inherently distributes tasks to the processors as they become free, making the complex push/pull migration mechanisms redundant for basic balancing.

Q37. Which of the following best describes the role of the Linux scheduler in the context of load balancing?

A.It uses only push migration
B.It avoids load balancing to prioritize affinity
C.It implements both push and pull migration ✅
D.It relies on a common run queue to avoid migration
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The text identifies the Linux scheduler as a specific example of a system that implements both techniques. This serves as a practical real-world illustration of the theoretical concepts of push and pull migration working in concert.

Q38. A process that has been running on a specific CPU for a long time will have high 'processor affinity'. What does this primarily mean for its performance?

A.The process will be scheduled with a higher priority
B.The process will have its data readily available in the CPU's cache ✅
C.The process will be immune to being preempted
D.The process will have a larger memory allocation
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: High processor affinity means the process has been executing on the same CPU, and its data is likely to be present in that CPU's cache. This is the primary performance benefit; the process will experience fewer cache misses, leading to faster execution.

Q39. An SMP system is experiencing a load imbalance. However, the system's load balancer is configured to wait until the imbalance exceeds a certain threshold before acting. What is the primary reason for using this threshold?

A.To ensure the system is always perfectly balanced
B.To simplify the code of the load balancer
C.To prevent the overhead of micro-migrations that break processor affinity ✅
D.To guarantee that the system prioritizes I/O over CPU
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The primary purpose of a threshold is to prevent the system from overreacting to small, transient imbalances. Without it, the scheduler might move processes constantly, causing a large overhead from cache invalidations and context switches. This threshold prioritizes stability and affinity over perfect, but costly, balance.

Q40. Which of the following is a valid example of the interaction between push and pull migration?

A.Push migration moves processes to idle processors, and pull migration only handles I/O-bound processes.
B.Push migration is a scheduled event that moves processes from overloaded CPUs, while pull migration is an immediate event from idle CPUs. ✅
C.Pull migration is a periodic check that distributes load, and push migration is an immediate response from a busy CPU.
D.They are two names for the same process, ensuring load balance is always maintained.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: This describes their typical interaction. Push migration is proactive and scheduled, redistributing load to prevent imbalances from becoming severe. Pull migration is reactive and event-driven, triggered when a processor becomes idle to immediately get work. They are complementary in this way.

Q41. What is the most significant engineering challenge presented by the coexistence of load balancing and processor affinity?

A.Managing the system's power consumption during peak load
B.Writing a policy that dynamically decides when to prioritize one over the other ✅
C.Ensuring all processors are compatible with the process to be moved
D.Preventing user-space processes from interfering with kernel scheduling
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The challenge is not technical feasibility, but policy. The system needs a dynamic decision-making process to know when to break affinity for the sake of balance and vice versa. There is no single correct answer, making it a difficult and context-sensitive engineering problem.

🔗 Related Topics (MCQs)