Interacting with the drum – Dijkstra on multiprogramming and I/O handling

The X8 computer

Reading Edsger Dijkstra’s technical papers is rarely dry. In EWD 54, while designing critical operating system algorithms for the X8 computer, he explains I/O coordination using hotel guest registers and invents delightful Dutch neologisms like “tandepoetsprogramma” (toothbrushing program). It’s a masterclass in making complex computer science accessible, and entertaining.

The Challenge: Coordinating Drum Storage in 1960s Computing

Before solid-state drives revolutionized storage, computers relied on drum and disk storage, mechanical devices where data access speed depended on physical spindle rotation. Minimizing wait times for the spindle to reach the correct position was crucial for system performance.

In EWD 54, Dijkstra addresses a fundamental challenge: how should an operating system coordinate between waiting processes (what he calls “Abstract Machines”) and physical I/O operations (which run on hardware subsystems like drum storage)?

The complexity is considerable. The system must:

  • Queue I/O operations efficiently
  • Notify waiting processes immediately when operations complete
  • Handle error conditions gracefully
  • Minimize memory access and usage (measured in bits!)
  • Optimize drum movements to reduce mechanical delays

Abstract vs Concrete Machines

Dijkstra’s conceptual framework distinguished between:

Abstract Machines: The consumer processes running in the computer, waiting for I/O operations to complete. These represent the logical programs that need data.

Concrete Machines: The physical hardware subsystems (like drum controllers) that execute the actual I/O operations.

The operating system’s job? Orchestrate the interaction between these two worlds efficiently and correctly.

Making the Complex Comprehensible: The Hotel Analogy

Rather than drowning readers in technical specifications, Dijkstra employed everyday analogies. His most memorable: managing I/O processes is like running a hotel.

  • Guests = processes requesting I/O operations
  • Hotel rooms = allocated memory space for each process
  • Checking out = freeing memory when I/O completes

Rooms are freed using Dijkstra’s own invention: semaphores, the synchronization primitives that would become fundamental to concurrent programming.

This wasn’t just pedagogical whimsy. The analogy helped clarify the essential coordination problem: How do you track who’s waiting, assign resources efficiently, and clean up when operations complete?

Inventing Dutch Computer Science Vocabulary

Perhaps most entertaining is Dijkstra’s creative approach to technical terminology. Writing in Dutch, he coined new phrases that are both precise and playful:

Haastsituatie (racing condition): A timing problem where the outcome depends on the sequence of uncontrollable events. Dijkstra distinguished between:

  • The essential variant: Must be solved for correctness
  • The moral variant: Should be solved for efficiency

Tandepoetsprogramma (toothbrushing program): A routine that initializes variables to a clean state—like brushing your teeth before bed prepares you for sleep.

Scattered throughout are delightfully unscientific phrases:

  • “Dat is toch wel al te gek” (That’s just too crazy)
  • “Het is natuurlijk erg prettig” (It’s naturally quite pleasant)
  • “Over de administratie van een bevolking” (About the administration of a population)

The Technical Achievement

Beneath the charming presentation lies serious computer science. Dijkstra presents a high-level algorithm for operating system I/O handling that addresses:

  1. Minimal memory access: Every operation counted when memory was expensive
  2. Optimal drum movements: Reducing physical motion improved performance dramatically
  3. Robust error handling: The algorithm remains correct even when I/O operations fail
  4. Efficient memory usage: Measured in bits, not bytes or kilobytes

This work contributed to the theoretical foundations of multiprogramming: the ability for computers to run multiple programs seemingly simultaneously by rapidly switching between them.

Why EWD 54 Matters Today

Modern developers might wonder why anyone should care about drum storage optimization in 2025. Several reasons:

1. The principles remain relevant: Coordination between asynchronous operations is still a core challenge, whether you’re managing disk I/O, network requests, or cloud service calls.

2. Dijkstra’s methodology endures: Using clear abstractions, careful reasoning, and accessible explanations makes complex systems understandable.

3. Humor aids understanding: Technical writing doesn’t have to be humorless. Dijkstra proved that rigorous thinking and playful presentation can coexist.

4. Historical perspective matters: Understanding how pioneers solved foundational problems helps us appreciate modern abstractions and recognize when we’re encountering similar challenges in new contexts.

A Nerdy Hobby Worth Pursuing

Reading EWDs has become a hobby. Quite nerdy – I was told. But there’s something satisfying about following Dijkstra’s thought process through these papers. Each one is a glimpse into a brilliant mind grappling with genuinely hard problems while refusing to sacrifice clarity or personality.

If you’ve never explored the Dijkstra archive, EWD 54 is an excellent starting point. It showcases his technical brilliance, his pedagogical skill, and his conviction that computer science should be both rigorous and human.

After all, if you can’t explain drum storage coordination using hotel analogies and toothbrushing programs, are you really understanding it deeply enough?


Further Reading:

Related articles:

Geef een reactie

Deze site gebruikt Akismet om spam te verminderen. Meer informatie over hoe uw reactie gegevens worden verwerkt.