Dulranga's Notes
Semester 3Operating Systems

Multiprogramming

This is when the CPU keep multiple programs in memory so when one program waits for some I/O or something, other program can be executed.

Context switching comes as a requirement of this.

TermWhat's actually happening
UniprogrammingOne program at a time; CPU idles during I/O
MultiprogrammingSeveral programs resident; CPU switched on blocking to maximize utilization
Multitasking / time-sharingCPU preempted on a timer, switching rapidly for interactive responsiveness
MultiprocessingMultiple CPUs/cores executing in genuine parallel — a hardware property, not a scheduling policy
MultithreadingMultiple threads of execution inside one process