Von Neumann architecture

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Design of the von Neumann architecture

The von Neumann architecture is a design model for a stored-program digital computer that uses a processing unit and a single separate storage structure to hold both instructions and data. It is named after the mathematician and early computer scientist John von Neumann. Such computers implement a universal Turing machine and have a sequential architecture.

A stored-program digital computer is one that keeps its programmed instructions, as well as its data, in read-write, random access memory (RAM). Stored-program computers were an advancement over the program-controlled computers of the 1940s, such as the Colossus and the ENIAC, which were programmed by setting switches and inserting patch leads to route data and to control signals between various functional units. In the vast majority of modern computers, the same memory is used for both data and program instructions.

The terms "von Neumann architecture" and "stored-program computer" are generally used interchangeably, and that usage is followed in this article. In contrast, the Harvard architecture stores a program in a modifiable form, but without using the same physical storage or format for general data.

Contents

[edit] Description

The earliest computing machines had fixed programs. Some very simple computers still use this design, either for simplicity or training purposes. For example, a desk calculator (in principle) is a fixed program computer. It can do basic mathematics, but it cannot be used as a word processor or to play games with. Changing the program of a fixed-program machine requires re-wiring, re-structuring, or re-designing the machine. The earliest computers were not so much "programmed" as they were "designed". "Reprogramming", when it was possible at all, was a laborious process, starting with flow charts and paper notes, followed by detailed engineering designs, and then the often-arduous process of physically re-wiring and re-building the machine. It could take up to three weeks to set up a program on ENIAC and get it working.[1]

The idea of the stored-program computer changed all that. A computer that by design includes an instruction set architecture and can store in memory a set of instructions (a program) that details the computation.

A stored-program design also lets programs modify themselves while running. One early motivation for such a facility was the need for a program to increment or otherwise modify the address portion of instructions, which had to be done manually in early designs. This became less important when index registers and indirect addressing became usual features of machine architecture. Self-modifying code has largely fallen out of favor, since it is usually hard to understand and debug, as well as being inefficient under modern processor pipelining and caching schemes.

On a large scale, the ability to treat instructions as data is what makes assemblers, compilers and other automated programming tools possible. One can "write programs which write programs".[2] On a smaller scale, I/O-intensive machine instructions such as the BITBLT primitive used to modify images on a bitmap display, were once thought to be impossible to implement without custom hardware. It was shown later that these instructions could be implemented efficiently by "on the fly compilation" ("just-in-time compilation") technology, e.g. code-generating programs—one form of self-modifying code that has remained popular.

There are drawbacks to the von Neumann design. Aside from the von Neumann bottleneck described below, program modifications can be quite harmful, either by accident or design. In some simple stored-program computer designs, a malfunctioning program can damage itself, other programs, or the operating system, possibly leading to a computer crash. This ability for programs to create and modify other programs is also frequently exploited by malware and hackers. A buffer overflow is one very common example of such a malfunction. Malware might use a buffer overflow to smash the call stack, overwrite the existing program, and then proceed to modify other program files on the system to further propagate the malware to other machines. Memory protection and other forms of access control can help protect against both accidental and malicious program modification.

[edit] Development of the stored-program concept

The mathematician Alan Turing, who had been alerted to a problem of mathematical logic by the lectures of Max Newman at Cambridge University, wrote a paper in 1936 entitled On Computable Numbers, with an Application to the Entscheidungsproblem, which was published in the Proceedings of the London Mathematical Society.[3] In it he described a hypothetical machine which he called a "universal computing machine", and which is now known as the "universal Turing machine". The hypothetical machine had an infinite store (memory in today's terminology) that contained both instructions and data. The German engineer Konrad Zuse independently wrote about this concept in 1936.[4] Von Neumann became acquainted with Turing when he was visiting professor at Cambridge in 1935 and also during the year that Turing spent at Princeton University in 1936-37. Whether he knew of Turing's 1936 paper at that time is not clear.

Independently, J. Presper Eckert and John Mauchly, who were developing the ENIAC at the Moore School of Electrical Engineering, at the University of Pennsylvania, wrote about the stored-program concept in December 1943.[5][6] In planning a new machine, EDVAC, Eckert wrote in January 1944 that they would store data and programs in a new addressable memory device, a mercury metal delay line. This was the first time the construction of a practical stored-program was proposed. At that time, they were not aware of Turing's work.

Von Neumann was involved in the Manhattan Project at the Los Alamos National Laboratory, which required huge amounts of calculation. This drew him to the ENIAC project, in the summer of 1944. There he joined into the ongoing discussions on the design of this stored-program computer, the EDVAC. As part of that group, he volunteered to write up a description of it. The term "von Neumann architecture" arose from von Neumann's paper First Draft of a Report on the EDVAC dated 30 June 1945, which included ideas from Eckert and Mauchly. It was unfinished when his colleague Herman Goldstine circulated it with only von Neumann's name on it, to the consternation of Eckert and Mauchly.[7] The paper was read by dozens of von Neumann's colleagues in America and Europe, and influencing the next round of computer designs.

Later, Turing produced a detailed technical report Proposed Electronic Calculator describing the Automatic Computing Engine (ACE).[8] He presented this to the Executive Committee of the British National Physical Laboratory on 19 February 1946. Although Turing knew from his wartime experience at Bletchley Park that what he proposed was feasible, the secrecy that was maintained about "Colossus" for several decades prevented him from saying so. Various successful implementations of the ACE design were produced.

Both von Neumann's and Turing's papers described stored program-computers, but von Neumann's earlier paper achieved greater circulation and the computer architecture it outlined became known as the "von Neumann architecture". In the 1953 book Faster than Thought edited by B V Bowden a section in the chapter on Computers in America read as follows.[9]

THE MACHINE OF THE INSTITUTE FOR ADVANCED STUDIES, PRINCETON

In 1945, Professor J. von Neumann, who was then working at the Moore School of Engineering in Philadelphia, where the E.N.I.A.C. had been built, issued on behalf of a group of his co-workers a report on the logical design of digital computers. The report contained a fairly detailed proposal for the design of the machine which has since become known as the E.D.V.A.C. (electronic discrete variable automatic computer). This machine has only recently been completed in America, but the von Neumann report inspired the construction of the E.D.S.A.C. (electronic delay-storage automatic calculator) in Cambridge (see page 130).

In 1947, Burks, Goldstine and von Neumann published another report which outlined the design of another type of machine (a parallel machine this time) which should be exceedingly fast, capable perhaps of 20,000 operations per second. They pointed out that the outstanding problem in constructing such a machine was in the development of a suitable memory, all the contents of which were instantaneously accessible, and at first they suggested the use of a special tube—called the Selectron, which had been invented by the Princeton Laboratories of the R.C.A. These tubes were expensive and difficult to make, so von Neumann subsequently decided to build a machine based on the Williams memory. This machine, which was completed in June, 1952 in Princeton has become popularly known as the Maniac. The design of this machine has inspired that of half a dozen or more machines which are now being built in America, all of which are known affectionately as "Johniacs."

In the same book, in a chapter on ACE, the first two paragraphs read as follows.[10]

AUTOMATIC COMPUTATION AT THE NATIONAL PHYSICAL LABORATORY

One of the most modern digital computers which embodies developments and improvements in the technique of automatic electronic computing was recently demonstrated at the National Physical Laboratory, Teddington, where it has been designed and built by a small team of mathematicians and electronics research engineers on the staff of the Laboratory, assisted by a number of production engineers from the English Electric Company, Limited. The equipment so far erected at the Laboratory is only the pilot model of a much larger installation which will be known as the Automatic Computing Engine, but although comparatively small in bulk and containing only about 800 thermionic valves, as can be judged from Plates XII, XIII and XIV, it is an extremely rapid and versatile calculating machine.

The basic concepts and abstract principles of computation by a machine were formulated by Dr. A. M. Turing, F.R.S., in a paper1. read before the London Mathematical Society in 1936, but work on such machines in Britain was delayed by the war. In 1945, however, an examination of the problems was made at the National Physical Laboratory by Mr. J. R. Womersley, then superintendent of the Mathematics Division of the Laboratory. He was joined by Dr. Turing and a small staff of specialists, and, by 1947, the preliminary planning was sufficiently advanced to warrant the establishment of the special group already mentioned. In April, 1948, the latter became the Electronics Section of the Laboratory, under the charge of Mr. F. M. Colebrook.

[edit] Von Neumann bottleneck

The separation between the CPU and memory leads to the von Neumann bottleneck, the limited throughput (data transfer rate) between the CPU and memory compared to the amount of memory. In most modern computers, throughput is much smaller than the rate at which the CPU can work. This seriously limits the effective processing speed when the CPU is required to perform minimal processing on large amounts of data. The CPU is continuously forced to wait for needed data to be transferred to or from memory. Since CPU speed and memory size have increased much faster than the throughput between them, the bottleneck has become more of a problem.

The term "von Neumann bottleneck" was coined by John Backus in his 1977 ACM Turing award lecture. According to Backus:

Surely there must be a less primitive way of making big changes in the store than by pushing vast numbers of words back and forth through the von Neumann bottleneck. Not only is this tube a literal bottleneck for the data traffic of a problem, but, more importantly, it is an intellectual bottleneck that has kept us tied to word-at-a-time thinking instead of encouraging us to think in terms of the larger conceptual units of the task at hand. Thus programming is basically planning and detailing the enormous traffic of words through the von Neumann bottleneck, and much of that traffic concerns not significant data itself, but where to find it.[11]

The performance problem is reduced by a cache between the CPU and the main memory, and by the development of branch prediction algorithms. It is less clear whether the intellectual bottleneck that Backus criticized has changed much since 1977. Backus's proposed solution has not had a major influence. Modern functional programming and object-oriented programming are much less geared towards "pushing vast numbers of words back and forth" than earlier languages like Fortran were, but internally, that is still what computers spend much of their time doing.

[edit] Early von Neumann-architecture computers

The First Draft described a design that was used by many universities and corporations to construct their computers.[12] Among these various computers, only ILLIAC and ORDVAC had compatible instruction sets.

  • ORDVAC (U-Illinois) at Aberdeen Proving Ground, Maryland (completed Nov 1951[13])
  • IAS Machine at Princeton University (Jan 1952)
  • MANIAC at Los Alamos Scientific Laboratory (Mar 1952)
  • ILLIAC at the University of Illinois, (Sept 1952)
  • AVIDAC at Argonne National Laboratory (1953)
  • ORACLE at Oak Ridge National Laboratory (Jun 1953)
  • JOHNNIAC at RAND Corporation (Jan 1954)
  • BESK in Stockholm
  • BESM in Moscow
  • DASK in Denmark
  • PERM in Munich
  • SILLIAC in Sydney (1956?)
  • WEIZAC in Rehovoth

[edit] Early stored-program computers

The date information in the following chronology is difficult to put into proper order. Some dates are for first running a test program, some dates are the first time the computer was demonstrated or completed, and some dates are for the first delivery or installation.

  • The IBM SSEC was a stored-program electromechanical computer and was publicly demonstrated on January 27, 1948. However it was partially electromechanical, thus not fully electronic.
  • The Manchester SSEM (the Baby) was the first fully electronic computer to run a stored program. It ran a factoring program for 52 minutes on June 21, 1948, after running a simple division program and a program to show that two numbers were relatively prime.
  • The ENIAC was modified to run as a primitive read-only stored-program computer (using the Function Tables for program ROM) and was demonstrated as such on September 16, 1948, running a program by Adele Goldstine for von Neumann.
  • The BINAC ran some test programs in February, March, and April 1949, although it wasn't completed until September 1949.
  • The Manchester Mark 1 developed from the SSEM project. An intermediate version of the Mark I was available to run programs in April 1949, but it wasn't completed until October 1949.
  • The EDVAC was delivered in August 1949, but it had problems that kept it from being put into regular operation until 1951.
  • The CSIR Mk I ran its first program in November 1949.
  • The SEAC was demonstrated in April 1950.
  • The SWAC was completed in July 1950.
  • The Whirlwind was completed in December 1950 and was in actual use in April 1951.
  • The first ERA Atlas (later the commercial ERA 1101/UNIVAC 1101) was installed in December 1950.


[edit] See also

[edit] References

[edit] Inline

  1. ^ Copeland (2006) p. 104.
  2. ^ "MFTL (My Favorite Toy Language) entry Jargon File 4.4.7". http://catb.org/~esr/jargon/html/M/MFTL.html. Retrieved on 2008-07-11. 
  3. ^ Turing, A.M. (1936), "On Computable Numbers, with an Application to the Entscheidungsproblem", Proceedings of the London Mathematical Society, 2 42: 230–65, 1937  (and Turing, A.M. (1937), "On Computable Numbers, with an Application to the Entscheidungsproblem: A correction", Proceedings of the London Mathematical Society, 2 43: 544–6 )
  4. ^ "The Life and Work of Konrad Zuse Part 10: Konrad Zuse and the Stored Program Computer". http://www.epemag.com/zuse/part10.htm. Retrieved on 2008-07-11. 
  5. ^ Lukoff, Herman (1979). From Dits to Bits...: A Personal History of the Electronic Computer. Robotics Press. ISBN 978-0-89661-002-6. 
  6. ^ ENIAC project administrator Grist Brainerd's December 1943 progress report for the first period of the ENIAC's development implicitly proposed the stored program concept (while simultaneously rejecting its implementation in the ENIAC) by stating that "in order to have the simplest project and not to complicate matters" the ENIAC would be constructed without any "automatic regulation".
  7. ^ Copeland (2006) p. 113
  8. ^ Copeland (2006) pp. 108-111
  9. ^ Bowden (1953) pp. 176,177
  10. ^ Bowden (1953) p. 135
  11. ^ "E. W. Dijkstra Archive: A review of the 1977 Turing Award Lecture". http://www.cs.utexas.edu/~EWD/transcriptions/EWD06xx/EWD692.html. Retrieved on 2008-07-11. 
  12. ^ "Electronic Computer Project". http://www.ias.edu/spfeatures/john_von_neumann/electronic-computer-project/. 
  13. ^ Illiac Design Techniques, report number UIUCDCS-R-1955-146, Digital Computer Laboratory, University of Illinois at Urbana-Champaign, 1955 

[edit] General

  • Bowden, B.V., ed. (1953), "Computers in America", Faster Than Thought: A Symposium on Digital Computing Machines, London: Sir Isaac Pitman and Sons Ltd. 
  • Rojas, Raúl; Hashagen, Ulf, eds. (2000), The First Computers: History and Architectures, MIT Press, ISBN 0-262-18197-5 
  • Davis, Martin (2000), The universal computer: the road from Leibniz to Turing, New York: W W Norton & Company Inc., ISBN 0-393-04785-7 
  • Can Programming be Liberated from the von Neumann Style?, John Backus, 1977 ACM Turing Award Lecture. Communications of the ACM, August 1978, Volume 21, Number 8. Online PDF
  • C. Gordon Bell and Allen Newell (1971), Computer Structures: Readings and Examples, McGraw-Hill Book Company, New York. Massive (668 pages).
  • Copeland, Jack (2006), "Colossus and the Rise of the Modern Computer", in Copeland, B. Jack, Colossus: The Secrets of Bletchley Park's Codebreaking Computers, Oxford: Oxford University Press, ISBN 978-0-19-284055-4 

[edit] External links

Personal tools