IT lexicon › Programming › Task scheduling

Task scheduling

Programming På svenska → Updated: 2026-11-16

The algorithm that decides which thread or process gets CPU time and in what order — the scheduler's core job.

Classic algorithms: FIFO (first in, first out) gives low latency for priority tasks but risks starvation of low-priority ones; round-robin gives everyone equal time but switches often (overhead); priority queues favor important threads. Modern operating systems use multilevel feedback queues (MLFQ), which start with round-robin, sample latency, and adjust time quantum automatically.

Real-time systems must guarantee high-priority threads meet their deadlines. Embedded systems often run single-tasking or cooperative scheduling (threads yield voluntarily). Multi-core scheduling adds complexity — all cores must distribute work without lock contention.

← Back to the lexicon