archives

Lamport: Interprocess Communication

Something that may be pertinent to the recent (lengthy) discussion of the deep implementation details of interprocess communication is Leslie Lamport's interesting discussion of how to implement various kinds of interprocess communication. The bulk of the paper deals with various kinds of shared registers, which are taken as the primitives through which messages are passed. Starting from non-atomic operations, Lamport shows how to build atomic operations that allow message-passing to occur.

"At a low level, message passing is often considered to be a form of transient communication between asynchronous processes. However, a closer examination of asynchronous message passing reveals that it involves a persistent communication. Messages are placed in a buffer that is periodically tested by the receiver. Viewed at a low level, message passing is typically accomplished by putting a message in a buffer and setting an interrupt bit that is tested on every machine instruction.
...
Hardware implementations of asynchronous communication often make assumptions about the relative speeds of the communicating processes. Such assumptions can lead to simplifications. For example, the problem of constructing an atomic register, discussed below, is shown to be easily solved by assuming that two successive reads of a register cannot be concurrent with a single write. If one knows how long a write can take, a delay can be added between successive reads to ensure that this assumption holds. No such assumptions are made here about process speeds. The results therefore apply even to communication between processes of vastly differing speeds."

Exporting the database

I'm interested in playing around with ways to render large discussions, to see what is readable / easy to navigate. This is motivated by part in the 500-comment+ discussions that span indented posts across multiple pages. I've already hacked together something that parses the html on the site (Drupal generates really nicely structured html) and rebuilds the comment database, but it seemed a bit rude to spider the whole site.

My first question is do you mind people pulling off copies of the site to experiment with, maybe building a tool to render the site in a different format? Which may then lead to technical questions such as:

  • Is it possible to export the Drupal comment database in some way?
  • What format?
  • Can it export smaller slices, e.g. something like particular days?

New paper: Theory of Programs

A simple mathematical framework, based on elementary set theory, to cover programming concepts.

See http://bit.ly/1CkZBPj.

-- Bertrand Meyer