Course contentsShow
← Computer Science
Lesson 1263 of 2,87229. CPU SchedulingFree lesson

Load Balancing Concepts

Exploring the problem of distributing work evenly across processors to maximize throughput and minimize idle time.

Load Balancing Concepts

What you'll learn: You'll understand how operating systems distribute work across multiple processors to keep all cores busy and maximize system throughput.


When you have a multiprocessor system—multiple CPU cores working together—you face a new challenge: how do you make sure all processors are doing their fair share of work? This is the load balancing problem.

The Problem

Imagine a busy restaurant with four chefs in the kitchen. If three chefs stand idle while one frantically handles all orders, the restaurant serves fewer customers and wastes resources. Similarly, if some CPU cores sit idle while others are overloaded with processes, your system's overall throughput drops and response times suffer.

Load balancing is the OS scheduler's job of distributing the ready queue of processes (or threads) evenly across available processors.

Why It Matters

Without load balancing:

  • Some cores run at 100% while others idle at 0%
  • Turnaround time and waiting time increase unnecessarily
  • You're not getting the performance you paid for with multiple cores

With effective load balancing:

  • All processors stay busy (high CPU utilization across the system)
  • Throughput increases—more processes complete per unit time
  • Average waiting and response times improve

Two Main Approaches

Push migration: The OS periodically checks processor loads and actively pushes processes from overloaded cores to idle ones.

Pull migration: An idle processor pulls a waiting process from a busy processor's queue.

The Challenge

Perfect balance is hard because workloads constantly change—some processes finish while new ones arrive. The scheduler must balance overhead (time spent redistributing work) against the benefit of better utilization.

Key Takeaway: Load balancing distributes processes across multiple processors to prevent some cores from being overworked while others sit idle, maximizing overall system throughput and minimizing wasted resources.