AI engineering glossary · Computing foundations

What is context switch?

Context switch: The operating system's act of pausing one running process or thread, saving its state, and loading another so the CPU can work on it. It enables multitasking but costs some time, so excessive switching reduces efficiency.

Level: advancedTopic: Computing foundations

Context switch: an example

On a 4-core machine running 100 busy processes, the scheduler constantly context-switches between them.

Related terms

More Computing foundations terms

Where you learn it

Context switch is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.