Skip to content
KinPilot™Learn & Explore
Menu

Grades 6–8 · Computing

How can several apps share a processor?

Music may play while a document responds to typing and a download progresses. An operating system coordinates the work of these applications. A processor core can switch between their runnable threads, which are sequences of instructions within programs.

T013 visual explanationOne core can alternate between runnable threads; time →; A; B; A; B; A; B; A and B resume from saved execution states; Thread C waits for a device; This invented timeline does not imply equal turns or unlimited capacity.One core can alternate between runnable threadstime →ABABABA and B resume from saved execution statesThread C waits for a deviceThis invented timeline does not imply equal turns or unlimited capacity.

In the diagramOne core can alternate between runnable threadstime →ABA and B resume from saved execution statesThread C waits for a deviceThis invented timeline does not imply equal turns or unlimited capacity.

An invented single-core timeline alternates runnable threads while a waiting thread pauses. Saved execution state allows each thread to continue later.

The scheduler chooses which ready thread gets processor time next. When a switch occurs, the system saves enough of the old thread’s execution state, including where it was in its instructions, and restores the state of another. The new thread can then continue from its own place.

Some threads are waiting for a file, a network response or a user action. A waiting thread need not occupy the core while nothing can progress. Other runnable work can use that time. Fast switching and devices operating independently help several activities appear to advance together.

This does not give every app unlimited computing power. Switching has overhead, scheduling priorities matter, and a demanding task can still make a device feel slow. Multiple cores add real parallel execution, while sharing one core is a distinct way to organize progress over time.

About this explanation

Starting knowledge: Understand that a processor executes instructions and an app can contain a sequence of tasks.

Sources

  • Microsoft Learn — Scheduling
  • Microsoft Learn — Context Switches
← Grades 6–8 topics