• ↑↓ pour naviguer
  • pour ouvrir
  • pour sélectionner
  • ⌘ ⌥ ↵ pour ouvrir dans un panneau
  • ←→ pour naviguer
  • esc pour rejeter
⌘ '
raccourcis clavier

Formal Definition

“Multiprogramming Operating System is an OS in which multiple programs are kept in memory simultaneously and CPU switches among them to maximize utilization.”

Explanation

Multiprogramming was a breakthrough OS concept designed to solve a critical inefficiency: when a program waits for I/O (disk read, keyboard input), the CPU sits idle. Multiprogramming keeps multiple programs in memory at once. When the currently executing program makes an I/O request, the OS switches the CPU to another program instead of idling. This dramatically improves CPU utilization. The key insight is that most programs spend a significant portion of their time waiting for I/O — by overlapping one program’s computation with another program’s I/O wait, the CPU stays busy much longer. Multiprogramming is NOT the same as multitasking: the goal is CPU utilization, not user interactivity.

How It Works

  • Multiple programs are loaded into memory simultaneously (e.g., Program A, B, C)
  • Program A runs on the CPU until it issues an I/O request (e.g., read from disk)
  • Instead of waiting idle, the OS performs a context switch: saves A’s state and loads B’s state
  • Program B runs until it also needs I/O or its time quantum expires (in preemptive variants)
  • The OS switches to Program C, and eventually back to A when A’s I/O completes
  • The degree of multiprogramming (how many programs are in memory) determines how well the CPU can be kept busy
  • Memory management (partitioning or paging) must protect each program’s memory from interference

Visual Explanation

multiprogramming A Program A (Computing) AIO A: I/O Wait (Disk Read) A->AIO I/O request B Program B (Computing) AIO->B switch BIO B: I/O Wait B->BIO I/O request C Program C (Computing) BIO->C switch C->A A I/O done

Semantic Network

semantic_multiprogramming THIS Multiprogramming OS BATCH Batch OS THIS--BATCH built from MULTIT Multitasking OS THIS--MULTIT contrasts with OS Operating System THIS--OS built from MEM Memory Management THIS--MEM related PROC Process Management THIS--PROC builds into SCHED CPU Scheduling THIS--SCHED related

Key Properties

  • Multiple programs reside in memory simultaneously — only one executes at a time
  • Goal: maximize CPU utilization by overlapping computation with I/O wait
  • Requires memory protection to isolate programs from each other
  • Requires a CPU scheduler to decide which program runs next
  • Degree of multiprogramming = number of programs in memory
  • Context switching between programs adds overhead but the utilization gain outweighs it

Connections

Edge Cases & Gotchas

  • Too many programs in memory (high degree of multiprogramming) can cause thrashing — the system spends more time swapping than computing
  • Without memory protection, one program could corrupt another program’s memory — this was a real problem in early systems
  • Multiprogramming assumes I/O wait dominates execution time — CPU-bound workloads (pure computation, no I/O) get less benefit
  • Students often confuse multiprogramming with multitasking: multiprogramming maximizes CPU utilization; multitasking provides responsive user experience