Von Neumann Invasion

Core Computer Comprehension

Almost all computers are 'von Neumann machines.' There are two other types of electronic computer, 'Harvard Machines' and 'Analog Computers.' I have seen one analog computer and it wasn't being used in 1969 and Harvard Machines are used as Digital Signal Processors because two memories enable faster processing for limited dedicated applications. If you see a computer the chances are better than 99% it is a von Neumann machine, regardless of whether it is called a PDA, a server, a host, a workstation, a netbook or a mainframe. Mainframes today are usually just multiple von Neumanns in a single box.

The name comes from the non-famous mathematician John von Neumann who worked on the first general purpose electronic computer, the ENIAC. I say non-famous because I worked for a major computer company from 2/78 until 11/81 and I never read or heard of a von Neumann machine during my employment even though I spent plenty of available time studying computer documentation. I have one book about assembly language programming for the Linux Operating System which mentions von Neumann in two sentences of a 240 page book and the diagram is worthless. So I shall endeavor to convey the hidden mysteries of von Neumann in a few paragraphs.

The defining element of a computer is the CPU, Central Processing Unit. The destiny of the computer industry changed in the mid-1970's when it became possible to put enough transistors on a single piece of silicon to make a CPU. A simple 8-bit processor could be made with 6,000 transistors, therefore a CPU became a single electronic component. The stage was set for the electronics industry to take over the computer industry. By 1989 the single chip CPUs were 32-bit and had more than 1 million transistors. Now anyone can buy a computer for less than $2000 that has more processing power than a computer that cost $1,000,000 in 1980.

The transistors in the CPU are electrically controlled switches. Many computer books talk about switches but do not emphasize the ELECTRICAL CONTROL. Each transistor has an input, an output and a control. The flow of electricity goes from input to output but can be turned on or off by an electrical signal on the control. This makes complex arrangements of transistors possible with a transistor controlling a transistor, controlling a transistor, etc., etc. The number, speed and arrangement of the transistors determines the performance and characteristics of the computer but some things are common to all von Neumann machines.

The problem with the ENIAC computer in the 1940's was that it had to be hard wired to solve problems. It had plugboards and switches that had to be reset for different problems. The machine could be idle for days while reprogramming took place. This was extremely wasteful for a system that cost the equivalent of 3 million 1990 dollars to design and build. Von Neumann's solution to this was to store the control program for the CPU in some type of memory capable of holding electrical states to send to the CPU in a way to make it solve the desired problem. This would make it possible to load different programs into the memory to solve different problems almost instantly. The data would be in the same memory as the control program.

The memory consists of thousands or millions of 'pigeonholes' each capable of storing from 6 to 64 electrical states called bits. Multiples of eight bits have been the standard since the early 70's, eight bits are called a byte. A 'pigeonhole' is selected by address lines coming from the CPU. The CPU puts a high or low voltage on each line and the address decode circuity sends a signal to the individual 'pigeonhole' desired. Since the CPU can read from or write to memory some method must be devised to 'tell' the memory which operation is occuring. This is done by the control lines from the CPU. The data lines are bidirectional and carry electrical signals from the CPU to memory on a write operation, and the other way on a read operation. The number of data lines depends on the CPU design and memory is built to match. The diagram shows 10 address lines and 8 data lines but a modern PC has 32 of each, making 4 billion memory locations the upper limit. In 1985 I was at a rather large company that had a mainframe with 24 megabytes of memory. Noone sells a computer with that little memory these days. 32 megabytes is the low end and 64 is usual.

The CPU contains memory locations called registers and a read instruction transfers information from memory to one of the registers. Different CPU designs have different numbers of registers and the registers can have different capabilities. One CPU might be designed so that all mathematical operations occur between only 2 registers and another CPU designed so that any registers can be used for math, but of course that means the registers must be specified somehow and will probably require more transistors and a more complex instruction set. Since the constant increase in the transistor budget means that designers have more design options every year, this creates a possible design conflict with old software. A completely new but superior instruction set means more power but none of the old software works. Keeping the old instructions means not realizing the potential power of the added transistors. This is the problem with the Intel processors. They still have registers similar to the old 8-bit 8080 CPU. Software could be translated from the 8080 to the 8086 and the Pentium still has compatibility with the 8086, a late 1970's processor.

The instructions that control the CPU are called machine language and I will use an analogy to explain how they work. Suppose you were to create a finger code to communicate with another person actions he was to perform. Using eight fingers, no thumbs, this code would tell someone to sit down, stand up, turn left, turn right, etc. A finger up would be a one and a finger down a zero. So eight fingers would give you 256 codes. Different people creating codes would develop incompatible finger combinations. Everyone would have a code for 'stand up' but noone would recognize anyone elses code. Of course the memory 'pigeonholes' store voltage levels instead of fingers and these voltages manipulate the transistors in the CPU making them jump through the appropriate hoops to accomplish the desired task. In the 70's there were multiple manufacturers with 8-bit processors of similar performance, but the software was incompatible at the machine code level. The 6800 from Motorola could not run Intel code for the 8080 which could not run 6502 code used in the Apple.

Programming in a processor dependent language is tedius and restrictive, to escape this high level languages were developed in the 50's. ForTran and COBOL were two of the earliest languages. ForTran stands for FORmula TRANslation and was used mostly for scientific work while COBOL is COmmon Business Oriented Language. Languages have proliferated since then, others are PL/I, Pascal, C, C++, Awk, Perl, and numerous others. Von Neumann machines do not understand high level languages, they must be converted to machine code which the CPU can respond to. There are two methods for accomplishing this, compiling and interpreting. A compiler is a machine code program that takes a high level language program and converts the entire thing to a machine code program. This produces fast code but if there is an error the source code has to be fixed and recompiled, again and again until correct. An interpreter is a machine code program that has to be in memory with the high level source code and runs the source line by line. No permanent machine code is produced. This is slower than compiled code but usually easier to write and fix.

Of course writing these computer languages, and sending e-mail and downloading the latest music that only brain damaged 15 year olds will listen to requires some means of entering data into the von Neumann machine. There are many different types of input and output devices and each device must be attached to and communcate with the memory and CPU. The address, control and data lines make up a bus for passing electrical signals. Electrical signals to and from the I/O devices must be converted to the same form to match the von Neumann bus. This is accomplished by some interface electronics designed for that purpose. Some interfaces are built onto the motherboard and some may plug into slots on the motherboard. Each device has to be controlled by the computer and this is done via modules of code called device drivers. A device driver is attached to the operating system and the application software passes data to the OS and the OS passes it to the device driver and the device driver knows how to control the device, be it a printer or a robot arm.

Integrated circuits have been getting denser and faster since the introduction of microcomputers in the mid 70's. The speed increases have forced certain design changes in order take advantage of that speed. The memory has trouble keeping up with the CPU. A Central Processing Unit is CLOCKED LOGIC. That means timing of transistors switching on and off is controlled by one circuit called the CLOCK. The CLOCK produces a steady stream of pulses, uniform in shape and timing, commonly called a SQUARE WAVE. The frequency and time of the CLOCK are reciprocal. A ONE MEGAHERTZ clock is 1,000,000 cycles per second and each cycle takes 1/1,000,000th of a second, called a MICROSECOND. A ten megahertz clock would be a 1/10,000,000th of a second or 100 nanoseconds. A NANOSECOND is a BILLIONTH of a second. Now that processors are in the 3 GIGAHERTZ range we are dealing with 1/3rd of a billionth of a second. I think that is PICOSECOND range.

On the dominant processor in the market a MEMORY CYCLE is four CLOCK CYCLES. The CPU puts out an address and activates the read control line. The CPU expects the desired data on the data lines in a certain period of time and will continue jogging its digital path whether the correct data is there or not. If it is not the right stuff the CPU will start doing unpredictable things, what is commonly called running off into the weeds. So a 2 MHz processor has a 500 nanosecond cycle time and must have its data in 2,000 nanoseconds. This is extremely slow and applies to 1976 technology. Things get complicated as the clock speeds up. The fastest Dynamic Random Access Memory, DRAM, in the early 90's was 60 nanoseconds. So if the clock cycle approaches 15 nanoseconds trouble could be expected. This occurs at 66 MHz.

486/66 processors began using a CACHE to get data into the CPU fast enough. There are two basic types of transistors, BIPOLAR and FIELD EFFECT TRANSISTORS. Bipolar transistors are faster but use more power and get hotter. FETs use less power and can be packed more densely and are therefore cheaper. So DRAM was made of FETs but was running out of steam and making all of memory of BIPOLAR or STATIC TECHNOLOGY would be very expensive so an engineering compromise was made. Put of CACHE of STATIC RAM between the CPU and the DRAM and have the CACHE fetch the memory before the CPU wants it. This works great as long as the predictive circuitry gets it right, but if the CPU wants something not in the CACHE then the CPU has to wait. The dreaded WAIT STATES. This cache concept comes from mainframes and minicomputers, microcomputers were just going through the same technological evolution with denser, cheaper implementations of the technology. The probability of the desired data being in the cache is called the HIT RATE and can change with the program being run.

The STATIC RAM chips of the cache were rated at 15 nanoseconds and would work fine until the speeds approached 300 megahertz. So the next step was to build a cache on the CPU chip. Now we have a level one cache on the CPU and a level two cahce off the CPU. I have never seen any documentation saying there are WAIT STATES when the CPU accesses the L2 cache but that is the only logical conclusion. Of course there will be even more wait states if the CPU has to go to memory. Various technologies are being applied to speed up memory, that is why we have EDO, SDRAM and DDR. One trick is to have the memory remember the last address accessed so if the next access is sequential time doesn't have to be wasted decoding the new address. One thing users should concentrate on is ECC, Error Checking and Correction. With memory in the gigabytes ranges the probability of failure increases. ECC memory can have 1 or 2 bits in error and fix the errors. This can significantly improve reliability. Memory is cheap and the reduced headaches can easily be worth the money.

The Operating System, or OS, is the last but most complex piece of the puzzle. When you turn on a computer the memory is almost completely blank and the machine is useless. A small area of memory which is not erased by lack of power contains code which reads a program from the disk drive and executes it. This program loads more code from the disk which is the operating system. There are plenty of operating systems like OS/2, BeOS, Linux and more. Here incompatibility rears its ugly head again. Application software that runs on one operating system probably will not run on another OS. This creates the possibility of users becoming hooked on some application and being locked into a particular operating system. This can have long term technological and economic consequences. It is up to the buyer to decide how to cope with this potential economic trap.

In the 50's and 60's computers were extremely expensive so getting maximum efficiency from them was extremely important. Even though the electronics was primative by today's standards it was still very fast compared to the input and output devices. Keeping expensive hardware waiting on a printer was very bad form. A modem operating a 300 baud sends a character every thirtieth of a second. If the main processor could execute 100,000 instructions per second then it could do 3,000 instructions while waiting for one character to be transmitted. The serial port cannot wait for a character though, it needs a continuous stream or gaps will ruin the transmission over the phone line. One way to handle this was to have the CPU to constantly interrogate the serial port and give it a character when it is ready. It would read the status port, check the port empty bit and send a character when the bit is in the proper state. This is called a "busy wait loop." This wastes 3,000 CPU instructions every 1/30th of a second. That is a lot of instructions in a ten minute message.

A better method was developed using interrupt service routines. The I/O interface is designed to send a signal to the CPU when it needs something. The CPU interrogates the device to see what it wants and provides it. The CPU then returns to whatever it was doing. This can free 90% of the CPU's time to do other work. This is the IRQ or Interrupt ReQuest business on PC machines. The same procedure may be called something else on other computers. An even more efficient method is DMA, Direct Memory Access. A simple CPU can have 10,000 transistors. This was a big deal in the early 60's. The CPU could do a lot more than I/O. If you make a really dumb CPU with 1,000 transistors and let it do nothing but I/O then the 10,000 transistors can go about their business. The main CPU passes info to the DMA controller. "Send 5000 characters starting at location 34,256 to device X." The main CPU can then go about its business until the DMA controller says the job is completed. The DMA controller can use idle memory cycles when the main CPU is doing internal calculations and have very little impact on main processing. So the busy wait loop takes 100% of the CPU time, the interrupt service routine can take 10% and DMA might take less than 1%. Of course the device drivers that interface to the operating system have to be written to handle these interrupts and DMAs for the various I/O devices. These complicate matters when major operating system changes are made. Sometimes manufacturers don't provide device drivers for old hardware when a new OS comes out. The customer is stuck with the choice of not upgrading the OS or trashing the old but functional hardware and buying the new hardware. Someone has produced a lot of operating systems since 1995.

I recently purcahsed a used 166 megahertz computer with 64 Meg of memory and a 3 gigabyte hard disk for $92. 400 mhz with a bigger hard disk was too much money at $300. It's getting so it doesn't make sense to buy a new computer anymore. In 1998 400 mhz computers cost $3,000, you loose 90% depreciation in 4 years. What can the average user do with 2,000 more mhz? The disk drive may be bigger but not faster. The user can't type faster and noone is going to fill 30 gig of disk space by typing. It takes 10 years at 80 words per minute to produce 1 gigabyte of data. Most small businesses don't produce that much data in a year. The computer industry is producing machines that are overkill for almost all practical purposes. High speed, high resolution games can be created to use up any amount of processing power but is that a good reason to buy THE LATEST AND MOST EXPENSIVE computer.

If a medical clinic saw 200 patients per day and each patient resulted in 10K of data entered into the computer, a 40 Gig drive could hold ten years worth of data. A CD-ROM could hold one months worth of of information. Inventories of 10,000 items would be no problem. The computer hardware is no longer an issue, the concern is software and user training. One Computer magazine for POWER USERS tests CPUs with game benchmarks. There is a QUAKE benchmark and a SERIOUS SAM benchmark. Are businessmen concentrating on the bottom line supposed to take this nonsense seriously? A one gigahertz computer is probably capable of more than the above average employee can figure out how to do. American society has to decide what to do with all this processing power even though many people can't figure out how to program their VCRs.

As a final example I would like to close with the biggest joke in the computer industry. The QWERTY keyboard. Why is the arrangement of the alphabet on the keyboard so strange and typing so annoying to learn? In the early days of typewriters one of the first nearly succesful machines had a wooden mechanism. As a result users who typed too fast caused the machine to jam. So the brilliant inventor came up with an ingenious solution. Force the users to type more slowly! By deliberately arranging the keys in a sequence that made no sense people were forced to slow down. By the 1920's the mechanisms were so good jamming was no longer a problem, but so many people had been trained on the backward design it was not regarded as worthwhile to massively enforce a superior standard. Of course this was before the days of computers, but now we have people with highly efficient 2 gigahertz computers with keyboards designed for wooden typewriters. So much for efficiency and productivity for tens of millions of people for the last 50 years. History doesn't say much about von Neumann's sense of humor. I hope he would find that hysterically funny.


SI:Simulated Intelligence


Before ending but as a seperate issue I would like to discuss computers from a psycho-linguistic-philosophical perspective. Computers are referred to as electronic brains and said to do information processing. Computers do things, like play chess, which are normally associated exclusively with human behavior and many people find computers threatening. Human beings use symbols, words, written and verbal to communicate about reality. These symbols, usually the written form, can be put into a computer and manipulated according to a program. The question is: Does the computer UNDERSTAND the symbols?

The "classic" Turing test of having a person communicating with a computer via a terminal and not being able to determine whether it is a computer or a person might be regarded as a test of computer intelligence. But even if you can make a program respond properly to the phrase "pain in the ass", how can anyone claim a computer without a body understands pain or comprehends where an ass is. The computer's response would simply be a symbolic-linguistic trick, probably more complex than playing chess but not associating symbols with reality. A classic case involving translating English into Russian had the computer translate the phrase "out of sight, out of mind." The result was "blind idiot." This translation is VERY logically correct, but most people wouldn't think of it.

The computer's advantage is being able to manipulate symbols far more quickly and in larger quantities than the human brain can handle. It could take 1/10 of a second for your nerves to send a signal from your finger to your brain. An electrical signal like that used in a computer could go 3/4 of the way around the world in that time. The transistors in a modern computer can switch in much less than a millionth of a second while the neurons in your brain would take multiple thousandths of a second. I doubt that there is an accurate method of quantifying the data storage capacity of the human brain, but few if any people could assimilate and retrieve ten megabytes of data in a matter of seconds. This would not qualify as a challenge for a modern compter.

A computer can give the appearence of being intelligent in a limited universe like a chess board, but it still doesn't play the game like a person. The computer has the speed to simulate possible moves that an opponent might make, including the absurdly stupid ones. The ridiculous moves can be tested to the point of being proven ridiculous whereas a human player wouldn't think of analyzing those loosing pathways. So if you can get a computer to be stupid fast enough it can appear to be intelligent. This is why I would prefer the term Simulated Intelligence to Artificial Intelligence. Unfortunately many people are really using their brains in Simulated Intelligence mode. People go to school and memorize and regurgitate without understanding subjects and teachers let students get away with this. Problem solving software known as Expert Systems work this way.

We must stamp out Simulated Intelligence in human beings.

Vulcans of Terra unite, you have nothing to loose but Ferengi.

The Competition

My competition is interested in doing a decent job of explaining computers in sections 1 thru 1.3, but there is no mention of von Neumann until the History of Computers near the end. Transistors are mentioned in the history section but there is no explanation of how they are used as electrically controlled switches. The history section contains plenty of trivia which may be interesting but does not contribute to comprehending how computers work. The figures 1A, 1.2 and 1.3 show some of the internals of the von Neumann machine but they don't show individual wires for address, data and control lines. Figure 1.4 shows addresses for memory but doesn't clearly describe the relationship of those addresses to the bus. The words volt or voltage are not in the essay and electricity is mentioned once in the history section to say that the tabulators used for the 1890 census ran on electricity. CD-ROMs are mentioned before the term von Neumann machine but they were not invented until 30 years later. Since complexity tends to increase over time presenting and explaining technologies, with the correct names, in the sequence of invention makes sense by expanding the student's knowledge from the simple to the complex. Having a seperate history including irrelevant details causes confusion in prioritizing data.

The Electrical Engineering and Computer Science perspectives on computers are quite different. Computer Science is more of an intellectual exercise while EE is about getting something done. Computer Science is an invention of our universities created since World War II. Everything in the field of Computer Science could be put into Electrical Engineering, Mathematics or Linguistics. The entire department could be eliminated. The politics of higher education probably won't allow that though.



Copyright © 2009, Netbookation.com All Rights Reserved.