Dojo (HowTo)







  Easter Eggs




  Martial Arts

Takin' the Bus
Public transportation in your computer..

By:David K. Every
©Copyright 1999

"Bus" is short for omnibus -- Omnibus is Latin meaning "for all". Which is exactly what a bus is -- a way for all chips (devices) to talk to each other. Public transportation for your computer chips.

Imagine that a computer is made up of many separate chips that all need to talk to each other though wires (leads). You could have enough wires so that each chip had a set of many wires directly connected to each and every other chip it wanted to talk to. Think about that. Say each chip is "32 bit" (has 32 wires) to talk to other chips &emdash; and imagine that there are 50 chips in your computer. Each chip would have to have 1600 pins (wires) just to communicate directly with every other chip. That would be very expensive, and hard to wire up -- so it isn't done. Instead chips just share one "bus". This "bus" is a common set of wires, that all the chips share, and talk to each other through.

A bus usually has a set of wires for the "address", and another set for the "data" &emdash; and a few extra wires for synchronization, stating whether the bus is already in use by someone else, clock (timing), and other miscellaneous functions. Each chip checks to see if the bus is available (is not in use) -- if the bus is in use, the chip waits until it becomes available -- otherwise the bus is available, and the chip puts an address and data value on the "bus". All chips are monitoring the "address" lines, and if they see an address that they "own", they grab the message (data) &emdash; otherwise they ignore it. (Now technically those addresses are also called "memory locations", or registers &emdash; but they basically all mean the same thing.) That is basically all there is to how a bus works.

As you can imagine, this bus is the freeway on which all computer information travels. The faster the speed limit (clock rate), and the more lanes there are (data width), the more commuters (information) it can handle. Busses are either serial (1 bit wide + control) or parallel; which can be 8, 16, 32 or 64 bits wide (some are even 128 bits wide, though these are rare). The wider the bus, the more data can be passed at one time (per clock). The clock rate regulates how fast the information is put on the bus -- one address and one data value per clock cycle. This rate is usually measured in MHz (megahertz) &emdash; which stands for millions of cycles per second. So millions of time per second, some chip (often your processor) is sending data to another chip (and the other chip knows this by the address).

Since this bus is shared it is often called a "bottleneck" (or potential bottleneck). It is a point through which a lot of information must flow (and can get stopped up). So if 10 chips all want to talk at once, one will talk, and 9 will wait (until their turn) -- slowing down system performance. This is why bus speed is important &emdash; but it is only important if your chips are going fast enough to need that speed. If the bus is a lot faster (and wider) than the chips, then the bus just sits there like an empty freeway (or only gets a few lanes used at a time). If the bus is slower (or too narrow), then it is always rush hour, and everyone is delayed. So things must be balanced. (In modern system, your main bus is usually not able to keep up with the demands of the processor and memory in peak times).

Types of Busses

Computers have grown more and more complex... and so there is no longer just one "bus". There are many. Often inside of chips there are many busses as well -- but most people referring to busses are talking about multi-chip communication (not the internal communication of chips).

In most cases a bus is something that connects more than two devices or chips. A point-to-point connection of only two devices is usually called a "port". One exception to the rules is something called LocalBus (only some machine have this) -- which is a point to point connection (bus) between the CPU and a single card, usually used for Video/Graphics. (Since the graphics card is the most data-hungry of the expansion cards, putting it on a separate bus makes sense and frees up the other bus). But in most cases, a bus generally means more than two -- and the more "modern" version of LocalBus is better named AGP (Advanced Graphics Port).

Peripheral busses allow one device to talk to other devices. IEEE488 (GPIB), SCSI, ADB, USB and FireWire are all peripheral busses -- through which peripherals talk to each other and the computer. (These are also basically networks, but are seldom referred to as such). Peripheral busses usually talk at slower speeds (compared to other busses), because they have to talk for much longer distances. Fast rates could be the 50MB/sec FireWire (a new serial bus), or 5MB/sec SCSI (20MB for Fast/Wide). The other busses are far slower (ADB is only something like 192KB/second).

Notice that RS-232 (Serial ports), and Parallel ports were not listed as busses. These are device to device connections, and are not shared among many devices -- so are not called a bus. Usually they are called a "port", hence you have a serial port, or a parallel port. The same with IDE, EIDE and UltraIDE -- these devices have a separate connector for each device and they don't share.

Daisy Chain -- many peripheral busses are connected by a "daisy chain". For those who have never seen a real daisy chain, it was a way to link daisies by tying the end of one stem, to the base of another (next to the flower) -- to make a chain of daisies (hence the name). Peripheral daisy chains work in much the same way. Every device is supposed to have an in and an out port. You plug each device to the prior one, in a chain that will eventually end at the computer -- but instead of daisies, you have peripherals.

Expansion busses allow many cards to be plugged into computers (to expand functionality). NuBus, LocalBus, and PCI are all forms of expansion busses -- as are ISA, EISA, PCI, MCA in the PC world (and of course S100 in the CP/M world), and there have been (and will be) many others. They all have their own timings and data widths. For now, the one that matters the most is PCI, which is a 33MHz, 32bit bus (for a theoretical rate of 132MB/sec). They are expanding the capabilities of PCI, to include fast (66MHz), and/or wide (64bit) versions -- which can quadruple the rate that cards could talk to each other and main memory.

Just to make it confusing, some on-board expansion is really done through built-on cards -- or basically through the expansion bus, even though the functions are on the motherboard itself (and not separate cards). This would likely make performance worse than if it was "truly" built-in (on the internal bus), but probably not enough so to matter for most people. You'd have to read the technical notes to know for sure, so this not usually mentioned, so you'd have to be a real propeller-head to care.

Internal Bus is how chips on the motherboard talk to each other. Most of the time when people say "bus" they are really referring to the internal bus. This is often unique for each version of the processor, and sometimes a tad unique by each model/manufacturer. This internal bus is how the CPU talks to memory, and its "on board" I/O (built in functions) -- and is the highest performance bus on a machine. When you hear (or see) people saying that "my machine has a 66mhz bus", this is what they are talking about.

Many machines have a 64 bit bus, and transfer at 66MHz (commonly) -- or roughly a total theoretical maximum of 528MB/Second. That is pretty fast, but think about this -- your computer (CPU) may be a 266MHz machine (or roughly four times faster). So often your CPU can way out-speed the main bus.

Your main RAM can't even keep up with the bus itself -- we are making faster and faster types of RAM, and using a technique called interleaving (alternating between chips so that multiple RAM chips can come closer to keeping up with total bus bandwidth). This performance gap is one of the reasons we use special types of "cache" memory to help keep the CPU fed (and busy) -- that, and to keep the CPU from completely saturating the main bus with memory requests (and preventing all the other chips from getting their work done).

There is another trick for keeping a CPU fed, which is to use something called a "backside" cache. What this means is that the CPU can talk to the main bus (and memory) -or- to a second bus on the "backside". This second bus basically has some very fast, temporary memory (which the CPU stores things on, and gets things from). While it is working on this "backside", the "front side" (main bus) is usually free to be used by other chips, and for other things. This can simulate having a faster bus -- since your main bus isn't saturated trying to satisfy your CPU's memory needs (most of the time). If you have an "inline" cache, it is on the main bus, and all those memory accesses can be keeping the main bus "in use". If you have multiple CPU's, bus saturation is one of the most critical problems (since you have multiple processors all fighting for the bus at the same time).


So there are many busses in your computer, and often inside a single chip. As the main bus (internal bus) performance is not keeping up with the rate at which CPU and memory performance has been increasing, it is likely that designers will use more and more busses to solve various problems (to off load other busses, and to reduce bottlenecks). Already it is not uncommon to have a special bus for handling Graphics or Video and Audio -- and sometimes there are special sub-busses for sending data or control signals from one point to another. But hopefully, you understand the basics of the bus -- that it is just a shared set of connections.

Created: 12/17/97
Updated: 11/09/02

Top of page

Top of Section