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

Push vs Pull Migration

Comparing strategies where overloaded processors push tasks versus idle processors pull tasks from busy queues.

Push vs Pull Migration

You'll learn: The two main strategies for redistributing tasks across processors—push migration (overloaded CPUs offload work) versus pull migration (idle CPUs grab work).

The Load Balancing Problem

In multiprocessor systems, we need to keep all CPUs busy for optimal performance. When load balancing detects imbalance—some processors swamped while others sit idle—the system must migrate processes or threads between CPUs. But who initiates this migration?

Push Migration: The Busy Push Work Away

In push migration, an overloaded processor actively pushes tasks onto less-busy processors.

Think of it like a busy checkout clerk at a grocery store who redirects customers to empty lanes: "Hey, register 3 is open—please go there!" The burden is on the busy processor to monitor its own load and take action.

Characteristics:

  • Periodic checks by loaded processors
  • Proactive offloading of excess work
  • Works well when specific processors become hotspots
  • Requires tracking which other CPUs are available

Pull Migration: The Idle Pull Work In

In pull migration, an idle or lightly-loaded processor actively pulls tasks from busy processors' queues.

This is like an idle cashier scanning for customers waiting in other lines and saying "I can help you over here!" The idle processor takes initiative to find work.

Characteristics:

  • Idle processors seek out tasks
  • Reactive—happens when CPUs would otherwise be wasted
  • Prevents processors from sitting completely idle
  • Requires visibility into other processors' queues

In Practice

Many systems use both strategies simultaneously. Push migration prevents overload buildup, while pull migration ensures no CPU stays idle when work exists elsewhere.

Key Takeaway: Push migration has busy processors offload tasks to reduce their load, while pull migration has idle processors fetch tasks from busy queues—modern schedulers often combine both approaches for effective load balancing.