Chapter 12 · SimulationMulticore Scheduling and Load Balancing? ← Chapter 12 Cores 4 Shared Per-coreBalance Balance now Affinity None Soft Hard Scenario Sample Skewed Random Speed 1.5/s Compare Tasks Tick 0 Done 0/0 Migr. 0 Imbalance 0 Makespan – CloseMulticore Scheduling and Load BalancingTasks run on several CPU cores at the same time. The left part of each lane shows the core’s ready queue (queue head on the left), the right part shows that core’s Gantt chart. A single shared ready queue is compared with per-core queues, processor affinity and load balancing.UsageCores −/+ selects 1–8 cores; Shared / Per-core sets the queue model (one shared queue or one queue per core).Balance runs a balancing pass at the start of every tick (per-core queues only); Balance now runs one pass immediately.Tasks are written as work@core (work 1–30, preferred core 0–7), at most 12 tasks. Type them one by one, paste a list, or pick a preset scenario.The side panel shows task progress (Tasks) or queue lengths and imbalance (Load). Compare runs the three queue models to the end; clicking a row loads that model.RulesTickEach core runs the task at the head of its queue for 1 tick, then appends it to the end of the queue (RR, q = 1).SharedOne global queue; idle cores pull tasks from it.Per-coreEach core keeps its own persistent queue.BalanceAs long as the length difference is greater than 1, a task is moved from the fullest queue to the emptiest queue.MigrationA task runs on a different core than last time (counted once).SoftThe core it last ran on is preferred; it may migrate.HardOnly the preferred core; the task is never moved.MakespanNumber of ticks until all tasks finish.SettingsWhen the core count, model, affinity or tasks change, the simulation restarts at tick 0.Legend ↷ migration balancing move idle core queue head ✓ done affinity (preferred core)Keys←→ tickSpace playHomeEnd first / lastEsc close