Computer architecture: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Pat Palmer
(moving more "how computers work" from Computers main page)
imported>Pat Palmer
(more stuffed moved from main article)
Line 117: Line 117:


These alternative models for computation remain research projects at the present time, and will likely find application only for those problems where conventional computers are inadequate.
These alternative models for computation remain research projects at the present time, and will likely find application only for those problems where conventional computers are inadequate.
===Other types of computers===
* [[Analog computer]]
* [[Chemical computer]]
* [[DNA computer]]
* [[Human computer]]
* [[Molecular computer]]
* [[Optical computer]]
* [[Quantum computer]]
* [[Wetware computer]]
See also [[Unconventional computing]].


See also [[Unconventional computing]].
See also [[Unconventional computing]].

Revision as of 15:08, 23 April 2007

In computer science, Computer Architecture is the design, organization, optimization and verification of a computer system, usually focusing on the CPU, memory and other peripheral devices and the interfaces that those components communicate through. In a more concrete sense, a computer architecture may refer to a specific platform such as SPARC, X86 or PowerPC and ARM or 680x0.

Computer Architectures can span multiple purposes such as general desktop computing as in the case of the x86, PowerPC and SPARC architectures, or more specific purposes such as embedded computing where the ARM and 680x0 processor lines are preferred. The lines tend to blur though on exactly what system architecture is best and ultimately is left up to the engineer designing the system. For instance, the Intel 386 processor (X86 family) appeared initially on desktop and server systems for its first run but now resigns itself to small embedded devices because the power requirements and cost per unit is much less than faster processors which typically are not necessary.

The Motorola 68000 series processors once powered Apple's line of computers before being replaced by PowerPC and now Intel X86 processors. The 68000 can now be found in embedded platforms and in antiquated legacy hardware that has not been replaced with newer, faster systems.

How computers work: the stored program architecture

While the technologies used in computers have changed dramatically since the first electronic, general-purpose computers of the 1940s, most still use the stored program architecture (sometimes called the von Neumann architecture). The design made the universal computer a practical reality.

The architecture describes a computer with four main sections: the arithmetic and logic unit (ALU), the control circuitry, the memory, and the input and output devices (collectively termed I/O). These parts are interconnected by bundles of wires (called "buses" when the same bundle supports more than one data path) and are usually driven by a timer or clock (although other events could drive the control circuitry).

Conceptually, a computer's memory can be viewed as a list of cells. Each cell has a numbered "address" and can store a small, fixed amount of information. This information can either be an instruction, telling the computer what to do, or data, the information which the computer is to process using the instructions that have been placed in the memory. In principle, any cell can be used to store either instructions or data.

The ALU is in many senses the heart of the computer. It is capable of performing two classes of basic operations. The first is arithmetic operations; for instance, adding or subtracting two numbers together. The set of arithmetic operations may be very limited; indeed, some designs do not directly support multiplication and division operations (instead, users support multiplication and division through programs that perform multiple additions, subtractions, and other digit manipulations). The second class of ALU operations involves comparison operations: given two numbers, determining if they are equal, or if not equal which is larger.

The I/O systems are the means by which the computer receives information from the outside world, and reports its results back to that world. On a typical personal computer, input devices include objects like the keyboard and mouse, and output devices include computer monitors, printers and the like, but as will be discussed later a huge variety of devices can be connected to a computer and serve as I/O devices.

The control system ties this all together. Its job is to read instructions and data from memory or the I/O devices, decode the instructions, providing the ALU with the correct inputs according to the instructions, "tell" the ALU what operation to perform on those inputs, and send the results back to the memory or to the I/O devices. One key component of the control system is a counter that keeps track of what the address of the current instruction is; typically, this is incremented each time an instruction is executed, unless the instruction itself indicates that the next instruction should be at some other location (allowing the computer to repeatedly execute the same instructions).

Since the 1980s the ALU and control unit (collectively called a central processing unit or CPU) have typically been located on a single integrated circuit called a microprocessor.

The functioning of such a computer is in principle quite straightforward. Typically, on each clock cycle, the computer fetches instructions and data from its memory. The instructions are executed, the results are stored, and the next instruction is fetched. This procedure repeats until a halt instruction is encountered.

The set of instructions interpreted by the control unit, and executed by the ALU, are limited in number, precisely defined, and very simple operations. Broadly, they fit into one or more of four categories: 1) moving data from one location to another (an example might be an instruction that "tells" the CPU to "copy the contents of memory cell 5 and place the copy in cell 10"). 2) executing arithmetic and logical processes on data (for instance, "add the contents of cell 7 to the contents of cell 13 and place the result in cell 20"). 3) testing the condition of data ("if the contents of cell 999 are 0, the next instruction is at cell 30"). 4) altering the sequence of operations (the previous example alters the sequence of operations, but instructions such as "the next instruction is at cell 100" are also standard).

Instructions, like data, are represented within the computer as binary code — a base two system of counting. For example, the code for one kind of "copy" operation in the Intel x86 line of microprocessors is 10110000 [1]. The particular instruction set that a specific computer supports is known as that computer's machine language. Using an already-popular machine language makes it much easier to run existing software on a new machine; consequently, in markets where commercial software availability is important suppliers have converged on one or a very small number of distinct machine languages.

More powerful computers such as minicomputers, mainframe computers and servers may differ from the model above by dividing their work between more than one main CPU. Multiprocessor and multicore personal and laptop computers are also beginning to become available.[2][3]

Supercomputers often have highly unusual architectures significantly different from the basic stored-program architecture, sometimes featuring thousands of CPUs, but such designs tend to be useful only for specialized tasks. At the other end of the size scale, some microcontrollers use the Harvard architecture that ensures that program and data memory are logically separate.


Digital circuits

The conceptual design above could be implemented using a variety of different technologies. As previously mentioned, a stored program computer could be designed entirely of mechanical components like Babbage's devices or the Digi-Comp I. However, digital circuits allow Boolean logic and arithmetic using binary numerals to be implemented using relays — essentially, electrically controlled switches. Shannon's famous thesis showed how relays could be arranged to form units called logic gates, implementing simple Boolean operations. Others soon figured out that vacuum tubes — electronic devices, could be used instead. Vacuum tubes were originally used as a signal amplifier for radio and other applications, but were used in digital electronics as a very fast switch; when electricity is provided to one of the pins, current can flow through between the other two.

Through arrangements of logic gates, one can build digital circuits to do more complex tasks, for instance, an adder, which implements in electronics the same method — in computer terminology, an algorithm — to add two numbers together that children are taught — add one column at a time, and carry what's left over. Eventually, through combining circuits together, a complete ALU and control system can be built up. This does require a considerable number of components. CSIRAC, one of the earliest stored-program computers, is probably close to the smallest practically useful design. It had about 2,000 valves, some of which were "dual components"[4], so this represented somewhere between 2,000 and 4,000 logic components.

Vacuum tubes had severe limitations for the construction of large numbers of gates. They were expensive, unreliable (particularly when used in such large quantities), took up a lot of space, and used a lot of electrical power, and, while incredibly fast compared to a mechanical switch, had limits to the speed at which they could operate. Therefore, by the 1960s they were replaced by the transistor, a new device which performed the same task as the tube but was much smaller, faster operating, reliable, used much less power, and was far cheaper.

Integrated circuits are the basis of modern digital computing hardware.

In the 1960s and 1970s, the transistor itself was gradually replaced by the integrated circuit, which placed multiple transistors (and other components) and the wires connecting them on a single, solid piece of silicon. By the 1970s, the entire ALU and control unit, the combination becoming known as a CPU, were being placed on a single "chip" called a microprocessor. Over the history of the integrated circuit, the number of components that can be placed on one has grown enormously. The first IC's contained a few tens of components; as of 2006, the Intel Core Duo processor contains 151 million transistors.[5]

Tubes, transistors, and transistors on integrated circuits can be used as the "storage" component of the stored-program architecture, using a circuit design known as a flip-flop, and indeed flip-flops are used for small amounts of very high-speed storage. However, few computer designs have used flip-flops for the bulk of their storage needs. Instead, earliest computers stored data in Williams tubes — essentially, projecting some dots on a TV screen and reading them again, or mercury delay lines where the data was stored as sound pulses travelling slowly (compared to the machine itself) along long tubes filled with mercury. These somewhat ungainly but effective methods were eventually replaced by magnetic memory devices, such as magnetic core memory, where electrical currents were used to introduce a permanent (but weak) magnetic field in some ferrous material, which could then be read to retrieve the data. Eventually, DRAM was introduced. A DRAM unit is a type of integrated circuit containing huge banks of an electronic component called a capacitor which can store an electrical charge for a period of time. The level of charge in a capacitor could be set to store information, and then measured to read the information when required.

I/O devices

I/O (short for input/output) is a general term for devices that send computers information from the outside world and that return the results of computations. These results can either be viewed directly by a user, or they can be sent to another machine, whose control has been assigned to the computer: In a robot, for instance, the controlling computer's major output device is the robot itself.

The first generation of computers were equipped with a fairly limited range of input devices. A punch card reader, or something similar, was used to enter instructions and data into the computer's memory, and some kind of printer, usually a modified teletype, was used to record the results. Over the years, other devices have been added. For the personal computer, for instance, keyboards and mice are the primary ways people directly enter information into the computer; and monitors are the primary way in which information from the computer is presented back to the user, though printers, speakers, and headphones are common, too. There is a huge variety of other devices for obtaining other types of input. One example is the digital camera, which can be used to input visual information. There are two prominent classes of I/O devices. The first class is that of secondary storage devices, such as hard disks, CD-ROMs, key drives and the like, which represent comparatively slow, but high-capacity devices, where information can be stored for later retrieval; the second class is that of devices used to access computer networks. The ability to transfer data between computers has opened up a huge range of capabilities for the computer. The global Internet allows millions of computers to transfer information of all types between each other.

Programs

Computer programs are simply lists of instructions for the computer to execute. These can range from just a few instructions which perform a simple task, to a much more complex instruction list which may also include tables of data. Many computer programs contain millions of instructions, and many of those instructions are executed repeatedly. A typical modern PC (in the year 2005) can execute around 3 billion instructions per second. Computers do not gain their extraordinary capabilities through the ability to execute complex instructions. Rather, they do millions of simple instructions arranged by people known as programmers.

In practice, people do not normally write the instructions for computers directly in machine language. Such programming is time-consuming and error-prone, making programmers less productive. Instead, programmers describe the desired actions in a "high level" programming language which is then translated into the machine language automatically by special computer programs (interpreters and compilers). Some programming languages map very closely to the machine language, such as Assembly Language (low level languages); at the other end, languages like Prolog are based on abstract principles far removed from the details of the machine's actual operation (high level languages). The language chosen for a particular task depends on the nature of the task, the skill set of the programmers, tool availability and, often, the requirements of the customers (for instance, projects for the US military were often required to be in the Ada programming language).

Computer software is an alternative term for computer programs; it is a more inclusive phrase and includes all the ancillary material accompanying the program needed to do useful tasks. For instance, a video game includes not only the program itself, but also data representing the pictures, sounds, and other material needed to create the virtual environment of the game. A computer application is a piece of computer software provided to many computer users, often in a retail environment. The stereotypical modern example of an application is perhaps the office suite, a set of interrelated programs for performing common office tasks.

Going from the extremely simple capabilities of a single machine language instruction to the myriad capabilities of application programs means that many computer programs are extremely large and complex. A typical example is Windows XP, created from roughly 40 million lines of computer code in the C++ programming language;[6] there are many projects of even bigger scope, built by large teams of programmers. The management of this enormous complexity is key to making such projects possible; programming languages, and programming practices, enable the task to be divided into smaller and smaller subtasks until they come within the capabilities of a single programmer in a reasonable period.

Nevertheless, the process of developing software remains slow, unpredictable, and error-prone; the discipline of software engineering has attempted, with some success, to make the process quicker and more productive and improve the quality of the end product.

A problem or a model is computational if it is formalized in such way that can be transformed to the form of a computer program. Computationality is the serious research problem of humanistic, social and psychological sciences, for example, modern systemics, cognitive and socio-cognitive [7] approaches develop different attempts to the computational specification of their "soft" knowledge.

Libraries and operating systems

Soon after the development of the computer, it was discovered that certain tasks were required in many different programs; an early example was computing some of the standard mathematical functions. For the purposes of efficiency, standard versions of these were collected in libraries and made available to all who required them. A particularly common task set related to handling the gritty details of "talking" to the various I/O devices, so libraries for these were quickly developed.

By the 1960s, with computers in wide industrial use for many purposes, it became common for them to be used for many different jobs within an organization. Soon, special software to automate the scheduling and execution of these many jobs became available. The combination of managing "hardware" and scheduling jobs became known as the "operating system"; the classic example of this type of early operating system was OS/360 by IBM.[8]

The next major development in operating systems was timesharing — the idea that multiple users could use the machine "simultaneously" by keeping all of their programs in memory, executing each user's program for a short time so as to provide the illusion that each user had their own computer. Such a development required the operating system to provide each user's programs with a "virtual machine" such that one user's program could not interfere with another's (by accident or design). The range of devices that operating systems had to manage also expanded; a notable one was hard disks; the idea of individual "files" and a hierarchical structure of "directories" (now often called folders) greatly simplified the use of these devices for permanent storage. Security access controls, allowing computer users access only to files, directories and programs they had permissions to use, were also common.

Another major addition to the operating system was tools to provide programs with a standardized graphical user interface. While there are few technical reasons why a GUI has to be tied to the rest of an operating system, it allows the operating system vendor to encourage all the software for their operating system to have a similar looking and acting interface.

With the rise of the Internet most operating systems have a TCP/IP networking stack. Just as hard disks induced operating systems to come up with storage abstractions of files and directories, the network hardware induced abstractions such as sockets and URLs. The regular connection of computers to the Internet raised the importance of security in Operating Systems and as a result operating systems have had to adopt firewall, encryption, update and runtime protection functionalities.

Outside these "core" functions, operating systems are usually shipped with an array of other tools, some of which may have little connection with these original core functions but have been found useful by enough customers for a provider to include them. For instance, Apple's Mac OS X ships with a digital video editor application.

Operating systems for smaller computers may not provide all of these functions. The operating systems for early microcomputers with limited memory and processing capability did not, and Embedded computers typically have specialized operating systems or no operating system at all, with their custom application programs performing the tasks that might otherwise be delegated to an operating system.

Computer applications

The first digital computers, with their large size and cost, mainly performed scientific calculations, often to support military objectives. The ENIAC was originally designed to calculate ballistics-firing tables for artillery, but it was also used to calculate neutron cross-sectional densities to help in the design of the hydrogen bomb[9] significantly speeding up its development. (Many of the most powerful supercomputers available today are also used for nuclear weapons simulations.) The CSIR Mk I, the first Australian stored-program computer, was amongst many other tasks used for the evaluation of rainfall patterns for the catchment area of the Snowy Mountains Scheme, a large hydroelectric generation project[10] Others were used in cryptanalysis, for example the first programmable (though not general-purpose) digital electronic computer, Colossus, built in 1943 during World War II. Despite this early focus of scientific and military engineering applications, computers were quickly used in other areas.

From the beginning, stored program computers were applied to business problems. The LEO, a stored program-computer built by J. Lyons and Co. in the United Kingdom, was operational and being used for inventory management and other purposes 3 years before IBM built their first commercial stored-program computer. Continual reductions in the cost and size of computers saw them adopted by ever-smaller organizations. Moreover, with the invention of the microprocessor in the 1970s, it became possible to produce inexpensive computers. In the 1980s, personal computers became popular for many tasks, including book-keeping, writing and printing documents, calculating forecasts and other repetitive mathematical tasks involving spreadsheets.

As computers have become less expensive, they have been used extensively in the creative arts as well. Sound, still pictures, and video are now routinely created (through synthesizers, computer graphics and computer animation), and near-universally edited by computer. They have also been used for entertainment, with the video game becoming a huge industry.

Computers have been used to control mechanical devices since they became small and cheap enough to do so; indeed, a major spur for integrated circuit technology was building a computer small enough to guide the Apollo missions[11][12] two of the first major applications for embedded computers. Today, it is almost rarer to find a powered mechanical device not controlled by a computer than to find one that is at least partly so. Perhaps the most famous computer-controlled mechanical devices are robots, machines with more-or-less human appearance and some subset of their capabilities. Industrial robots have become commonplace in mass production, but general-purpose human-like robots have not lived up to the promise of their fictional counterparts and remain either toys or research projects.

Robotics, indeed, is the physical expression of the field of artificial intelligence, a discipline whose exact boundaries are fuzzy but to some degree involves attempting to give computers capabilities that they do not currently possess but humans do. Over the years, methods have been developed to allow computers to do things previously regarded as the exclusive domain of humans — for instance, "read" handwriting, play chess, or perform symbolic integration. However, progress on creating a computer that exhibits "general" intelligence comparable to a human has been extremely slow.

Networking and the Internet

Computers have been used to coordinate information in multiple locations since the 1950s, with the US military's SAGE system the first large-scale example of such a system, which led to a number of special-purpose commercial systems like Sabre.

In the 1970s, computer engineers at research institutions throughout the US began to link their computers together using telecommunications technology. This effort was funded by ARPA, and the computer network that it produced was called the ARPANET. The technologies that made the Arpanet possible spread and evolved. In time, the network spread beyond academic and military institutions and became known as the Internet. The emergence of networking involved a redefinition of the nature and boundaries of the computer. In the phrase of John Gage and Bill Joy (of Sun Microsystems), "the network is the computer". Computer operating systems and applications were modified to include the ability to define and access the resources of other computers on the network, such as peripheral devices, stored information, and the like, as extensions of the resources of an individual computer. Initially these facilities were available primarily to people working in high-tech environments, but in the 1990s the spread of applications like e-mail and the World Wide Web, combined with the development of cheap, fast networking technologies like Ethernet and ADSL saw computer networking become ubiquitous almost everywhere. In fact, the number of computers that are networked is growing phenomenally. A very large proportion of personal computers regularly connect to the Internet to communicate and receive information.[13] "Wireless" networking, often utilizing mobile phone networks, has meant networking is becoming increasingly ubiquitous even in mobile computing environments. Wi-Fi is also a popular application, involving the wireless transfer of data through the internet. Wi-Fi is commonly used with laptops and can even be used with modern video game consoles.

Alternative computing models

Despite the massive gains in speed and capacity over the history of the digital computer, there are many tasks for which current computers are inadequate. For some of these tasks, conventional computers are fundamentally inadequate, because the time taken to find a solution grows very quickly as the size of the problem to be solved expands. Therefore, there has been research interest in some computer models that use biological processes, or the oddities of quantum physics, to tackle these types of problems. For instance, DNA computing is proposed to use biological processes to solve certain problems. Because of the exponential division of cells, a DNA computing system could potentially tackle a problem in a massively parallel fashion. However, such a system is limited by the maximum practical mass of DNA that can be handled.

Quantum computers, as the name implies, take advantage of the unusual world of quantum physics. If a practical quantum computer is ever constructed, there are a limited number of problems for which the quantum computer is fundamentally faster than a standard computer. However, these problems, relating to cryptography and, unsurprisingly, quantum physics simulations, are of considerable practical interest.

These alternative models for computation remain research projects at the present time, and will likely find application only for those problems where conventional computers are inadequate.

Other types of computers

See also Unconventional computing.

See also Unconventional computing.

  1. Unknown (Unknown). [http://www.sandpile.org/ia32/opc_1.htm IA-32 architecture one byte opcodes]. sandpile.org. Retrieved on 2006-04-09.
  2. Kanellos, Michael (2005). Intel: 15 dual-core projects under way. CNET Networks, Inc.. Retrieved on 2006-07-15.
  3. Chen, Anne (2006). Laptops Leap Forward in Power and Battery Life. Ziff Davis Publishing Holdings Inc.. Retrieved on 2006-07-15.
  4. The last of the first : CSIRAC : Australia's first computer, Doug McCann and Peter Thorne, ISBN 0-7340-2024-4.
  5. Thon, Harald and Topel, Bert (January 16, 2006). Will Core Duo Notebooks Trade Battery Life For Quicker Response?. Tom's Hardware. Retrieved on 2006-04-09.
  6. Tanenbaum, Andrew S. Modern Operating Systems (2nd ed.). Prentice Hall. ISBN 0-13-092641-8.
  7. Gadomski Adam Maria (1993). TOGA Meta-theory. ENEA. Retrieved on 2006-07-24.
  8. System/360 Announcement,IBM Data Processing Division (April 7, 1964) [url=http://www-03.ibm.com/ibm/history/exhibits/mainframe/mainframe_PR360.html]
  9. Classical Super / Runaway Super. Globalsecurity.org (Unknown). Retrieved on 2006-04-05.
  10. The last of the first : CSIRAC : Australia's first computer, Doug McCann and Peter Thorne, ISBN 0-7340-2024-4.
  11. Brown, Alexander (August 22, 2002). Integrated Circuits in the Apollo Guidance Computer. Retrieved on 2006-04-05.
  12. Technological Innovation and the ICBM. Smithsonian Institution (Unknown). Retrieved on 2006-04-05.
  13. North America Internet Usage Stats. Internet World Stats (April 3, 2006). Retrieved on 2006-04-05.