Memory interleaving

From Computer History Wiki
Jump to: navigation, search

Interleaving is a technique for speeding up access to sequential main memory addresses (e.g. by the CPU as it executes a program), for memories which have a cycle time which is significantly longer than their access time. (The classic example is core memory, which inherently has a much longer cycle time since it has destructive readout; the data has to be written back before a read cycle can complete.)

It consists of assigning sequential addresses to different memory units; so that a reference to word A goes to one bank, and a following reference to word A+1 goes to the other. It was not unknown for interleaving to decrease the access time for a second word by up to 50%, a very significant savings. This is called 'two-way interleaving', but it was possible to extend the technique; e.g. the KL10 could use four-way interleaving.

The implementation was fairly simple, and thus has a large cost/benefit ratio (especially in a period where individual transistors, needed to do anything complex, had significant cost). Switches were provided which exchanged two of the bits on the address bus as they were fed into each memory unit; the two bits would be the low bit of the word address (since some memories were byte addressed), and the bit just above the highest bit of the memory's internal address. Thus, sequential addresses (on the bus) would alternate between memory units.

Use of this method did mean that sequential words in the actual memory would be in different blocks of the address space (since the high bit in the bus address. which selected the block, would be the low address bit inside the memory), but keeping the words in order would have required a lot more wiring (to effectively shift the entire local part of the address down one bit). It was much simpler to simply accept the unusual order (which the CPU could not see, anyway).

Also, the simple technique of exchanging address bits only works with two (or more) memories of equal size.