Home > Articles > Programming

  • Print
  • + Share This
From the author of

ALGOL and the B5000

Later on in this series, we'll take a look at Smalltalk, the language that first embodied the idea of object-oriented programming. The Smalltalk Virtual Machine was heavily inspired by a real machine, the Burroughs B5000. Virtual machines in modern JavaScript, and even Java and .NET, inherit a lot from this system. Just as the PDP-11 defined the machine model for C, the B5000 defined the model for a lot of dynamic object-oriented languages.

The B5000 was designed to run ALGOL programs. The entire operating system and everything above it was written in a dialect of ALGOL. Although derivatives of this architecture survive, in the form of the Burroughs Large Systems mainframes, they never achieved widespread popularity—something of a shame, as the architecture had some very interesting features.

Being designed for ALGOL, it was built to make structured code fast. This meant that function calls had to be cheap, and was accomplished by having a very fast hardware stack. You can see the influence of this design decision in a lot of more-recent architectures.

Some of the features that didn't make it into other systems include garbage collection and fast task-switching. The B5000 had a single (privileged) instruction that allowed switching between executing threads and encouraged concurrent code. It was one of the first successful multiprocessor machines, largely as a result of encouraging developers to write concurrent programs for it.

Garbage collection, while common in virtual machines, is quite uncommon in real hardware. The B5000 was able to implement accurate garbage collection because it used tagged memory. Every word in memory had an associated tag, telling the CPU what kind of value it contained. This design also led to quite dense code. For example, it only needed one ADD instruction; if you gave it two integer values as operands, you got an integer addition; if you gave it two floating-point values, you got floating-point addition. More importantly, it allowed all pointers in the system to be identified, which meant that garbage collection could be accurate.

  • + Share This
  • 🔖 Save To Your Account