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

In EWD 54 Dijkstra continues his considerations regarding multiprogramming for the X8 computer. In the first section of this EWD Dijkstra dives into the difficulties of optimizing data transfer to/from drum storage, and the timely communication of readiness of such a I/O operation with the  processes in the computer waiting for the I/O to complete. Dijkstra in this paper designs the coordination needed between abstract and concrete processes.

In the times of disk storage, which are now almost over with the introduction of solid-state drives, minimizing the wait times for spindles to reach the correct position on the drum/disk was an important factor for performance.

Such optimizations require that the consumer processes in the computer, Dijkstra refers to them as Abstract Machines (as opposed to concrete machines – running in the hardware such as a drum subsystem), are coordinated such that the IO operations, once completed can immediately be informed about the next waiting IO operation. This requires efficient organisation of the interaction between waiting processes and the drum operations. Also error-situations must be taken into account. While doing this, Dijkstra also seeks to minimize memory access (geheugencontacten) and memory usage (in bits!).

Dijkstra presents a high level algorithm for handling the IO you could fit into your operating system. Describing this he dives into the considerations regarding low-level issues as minimizing the number of memory access operation, minimizing the drum-movements, detailed correctness of the underpinning algorithm is cases of error-situations, minimizing memory usage (in bits (!)).

The complex mechanisms of coordinating between abstract and concrete machines are simplified by using daily-life analogies. The process of keeping a record of processes doing I/O is explained in terms of keeping a register of guests in a hotel. The guests (processes) are assigned a hotel room (some space in memory). Rooms are freed up by setting Dijkstra’s own invention of semaphores.

Dijkstra innovate Ditch language. He uses Dutch words in new contaxts: haastsituatie (racing condition), with a essential (must do for correctness) and a moral (need to do for efficiency) variant. A tandepoetsprogramma (toothbrushing program) is introduced to set values of variables to an initial state. Unscientific phrases like “Dat is toch wel al te gek” and “Het is natuurlijk erg prettig”, “Over de administratie van een bevolking” are strewn through the tekst, which together with the analogies makes it a very interesting read.

EWDs becoming a hobby. Quite nerdy – I was told.

Geef een reactie

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