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:

Art, Engineering, IT Architecture

Is Architecture an Art? Is IT Architecture an Art.

It is a debate, in fundamentalist IT architecture circles. Really.

Engineering is the application of mathematics, empirical evidence and scientific, economic, social, and practical knowledge in order to invent, innovate, design, build, maintain, research, and improve structures, machines, tools, systems, components, materials, processes and organizations.

Source:

https://en.wikipedia.org/wiki/Engineering#Business_Engineering_and_Engineering_Management

Art. The expression or application of human creative skill and imagination, typically in a visual form such as painting or sculpture, producing works to be appreciated primarily for their beauty or emotional power:

The art of the Renaissance

Great art is concerned with moral imperfections

She studied art in Paris

https://en.oxforddictionaries.com/definition/art

So, Architecture may be Art (most of the time).
IT Architecture is Engineering. There is no beauty or emotion involved.
(And also architecting buildings is largely engineering)

It the 19th centure the notion of Art emerged as an independent entity. Before that everything we call art today was plain craftsmanship. Business.

In the last century art movements have tried to redefine art as craft. I believe that was Bauhaus. Then art becomes engineering, again.

Everything is art.
Art is nothing, or everything.
Engineering, (IT) architecture is a method.
Art is an end state.

Programming languages and what’s next

My review of programming languages I learned in during my years in IT.

BASIC

On the TI99-4a.
Could do everything with it. Especially in combination with PEEK and POKE. Nice for building small games.
Impossible to maintain.
GOTO is unavoidable.

Assembler

In various variants.
Z80, 6802, PDP 11, System 390.
Fast, furious, unreadable, unmaintainable.

Algol 68

Liked this language. REF!
Have only seen it run on DEC 10. Mainly used in academic environments (in the Netherlands?)?

Pascal

Well. Structured. Pretty popular in the early 90s.
Again is this widely adopted?

COBOL

Old. Never programmed extensively in it – just for year 2000.
Totally Readable.
Funny (rediculous) numbering scheme.
Seems to be necessary to use GOTO in some cases which I do not believe.

Smalltalk

Beautiful language.
Should have become the de facto OO programming language but failed for unclear reasons.
Probably because it was way ahead of it’s time with it’s OO base.

Java

Totally nitty gritty programming language.
Productivity based on frameworks, which no one knows which to use.
Never understood why this language was so widely adopted – besides it’s openness and platform independency.
Should never have become the de facto OO programming language but did so because Sun made it open (good move).
Far too many framework needed. J(2)EE add more complexity than it resolves.
Always upgrade issues. (Proud programmer: We run Java! Fed up business person: Which Java?)

Rexx

Can do everything quickly.
But nothing structurally.
Ugly code. Readable but ugly.
Some very very strong concepts.

Php

Hodge-podgy language of programming and html.
Likely high programmer productivity if you maintain a stark discipline of programming standards. Stark danger of creating unmaintainable crap code mix of html and php.

Python

Nice structured language.
Difficult to set up and reuse.
Can be productive if nitty gritty setup issues can be overcome.

Ruby (on Rails or off-track)

Nice, probably the most elegant OO language. Too nitty gritty to my taste still. Like it though.
I would start with this language if I had to start today.

What is next?

Visual programming? Clicking building blocks together?

In programming we should maybe separate the construction of applications from the coding of functions (or objects, or whatever you call the lower level blocks of code.

Programming complex algorithms (efficiently) will probably always remain a craft for specialists.

Constructing applications from the pieces should be brought to a higher level.

The industry (well – the software selling industry) is looking at microservices but that gives operational issues and becomes too distributed. We need a way to build a house from software bricks and doors and windows and roof elements.

Probably we need more standards for that.

Some bold statements

AI systems “programming” themselves is nonsense (I have not seen a shred of evidence).
AI systems are stochastical systems.
Programming is imperical.

In summary, up to today you can not build software without getting into the nitty gritty very quickly.
It’s like building a house but having find your own tree and rocks first to cut wood and blicks from.
And then construct nails and screws.
A better approach to that would help.

What do you think is the programming language of the future? What need should it address.

The Internet of Everything – toilet seats to human bodies

I walked into the restrooms. A mechanic stood at the sink fixing something. It saw him holding a toilet seat. He was fooling around with the wiring of the apparatus. Then he replaced some electronics components and rewired the seat.

Toilet sensors

It never occurred to me that even toilets could be usefully equipped with electronic features.

I asked the mechanic about this. He explained that the toilets in the building are all connected to the Internet. If there is something wrong with the anti-sceptic fluid produced by the toilet, it starts calling out for help. He told me that the towel dispenser was also connected to the Internet, so that when it runs out, a maintenance operator is called in. Makes sense.

Never has technology so much helped improve the First Little BIG Thing – – The Loo.

Towards cell sensors

So all things will be supplied with sensors. And it looks like the sensorized things are getting smaller and smaller. Reaching the nano space, see http://www.scientificamerican.com/article/the-internet-of-things-goes-nano/.

Sensors are reaching the nanoscale where they can flow through our blood and mend our bodies. Maybe fix cancer cells. Or detect issues with blood vessels. Or measure the chemistry in our bodies. They can be injected in plant to protect them from diseases similarly. Or in constructions to measure stability at smaller scales than we had ever assumed possible. Possibilities beyond imagination.

Neb sensors surveying the body

Imagine what it would mean if we could instrument every cell we like to. I would like a surveillance team of bot swimming through my body, like the Nebuchadnezzar in the Matrix flows through the sewers and tunnels of the abandoned cities.

To signal when my internals run out of supplies.