This introductory chapter commences by discussing the various types of computers, namely, microcomputers, midrange computers, mainframe computers, and supercomputers. A general uniprocessor computer system is composed of hardware, software, and network. In order to implement efficient computer programs, it is essential to understand the basic hardware structure of computers. This chapter examines the hardware components of a typical computer (central processing unit [CPU], memory, storage, graphics processing unit [GPU], etc.), focusing on issues that are relevant for algorithm design and software development to ultimately achieve efficient program execution and computer performance. A typical computer is composed of several important components that are connected to the computerās motherboard, including the CPU, the GPU, the memory, and the disk drive.
To set the context for understanding computer performance issues, the chapter introduces the concept of hardware and software logical equivalence, and discusses the stack of abstraction consisting of a modeling-level, algorithm-level, high-level, assembly-level, system or instruction set architecture (ISA) level, machine or microarchitecture-level, control or logic-level, and device-level architecture. The chapter concludes by introducing the concept of application programming interfaces (APIs). The API defines the set of instructions the hardware is designed to execute and gives the application access to the ISA.
1.1 Types of Computers
Todayās computer systems come in a variety of sizes, shapes, and computing capabilities. The Apollo 11 spacecraft that enabled men to land on the moon and return safely to Earth was equipped with a computer that assisted them in everything from navigating to systems monitoring, and it had a 2.048 MHz CPU built by the Massachusetts Institute of Technology (MIT). Todayās standards can be measured in 4 GHz in many home personal computers (PCs; megahertz [MHz] is 1 million computing cycles per second, while gigahertz [GHz] is 1 billion computing cycles per second). Further, the Apollo 11 computer weighed 70 pounds versus todayās powerful laptops weighing as little as 1 poundāwe have come a long way. Rapid hardware and software developments and changing end-user needs continue to drive the emergence of new computer models, from the smallest handheld personal digital assistant/cell phone combinations to the largest multiple CPU mainframes for enterprises. Categories such as microcomputer, midrange, mainframe, and supercomputer systems are still used to help us express the relative processing power and number of end users that can be supported by different types of computers. These are not precise classifications, and they do overlap each other.
1.1.1 Microcomputers
Microcomputers are the most important category of computer systems for both business and household consumers. Although usually called a personal computer, or PC, a microcomputer is much more than a small computer for use by an individual as a communication device. The computing power of microcomputers now exceeds that of the mainframes of previous computer generations, at a fraction of their cost. Thus, they have become powerful networked professional workstations for business professionals.
1.1.2 Midrange Computers
Midrange computers are primarily high-end network servers and other types of servers that can handle the large-scale processing of many business applications. Although not as powerful as mainframe computers, they are less costly to buy, operate, and maintain, and thus meet the computing needs of many organizations. Midrange systems first became popular as minicomputers in scientific research, instrumentation systems, engineering analysis, and industrial process monitoring and control. Minicomputers were able to easily handle such functions because these applications are narrow in scope and do not demand the processing versatility of mainframe systems. Today, midrange systems include servers used in industrial process control and manufacturing plants and play major roles in computer-aided manufacturing (CAM). They can also take the form of powerful technical workstations for computer-aided design (CAD) and other computation and graphics-intensive applications. Midrange systems are also used as front-end servers to assist mainframe computers in telecommunications processing and network management.
Midrange systems have become popular as powerful network servers (computers used to coordinate communications and manage resource sharing in network settings) to help manage large Internet websites, corporate intranets and extranets, and other networks. Internet functions and other applications are popular high-end server applications, as are integrated enterprise-wide manufacturing, distribution, and financial applications. Other applications, such as data warehouse management, data mining, and online analytical processing, are contributing to the demand for high-end server systems.
1.1.3 Mainframe Computers
Mainframe computers are large, fast, and powerful computer systems; they can process thousands of million instructions per second (MIPS). They can also have large primary storage capacities with main memory capacity ranging from hundreds of gigabytes to many terabytes. Mainframes have downsized drastically in the last few years, dramatically reducing their air-conditioning needs, electrical power consumption, and floor space requirementsāand thus their acquisition, operating, and ownership costs. Most of these improvements are the result of a move from the cumbersome water-cooled mainframes to a newer air-cooled technology for mainframe systems.
Mainframe computers continue to handle the information processing needs of major corporations and government agencies with high transaction processing volumes or complex computational problems. For example, major international banks, airlines, oil companies, and other large corporations process millions of sales transactions and customer inquiries every day with the help of large mainframe systems. Mainframes are still used for computation-intensive applications, such as analyzing seismic data from oil field explorations or simulating flight conditions in designing aircraft.
Mainframes are also widely used as super servers for large client/server networks and high-volume Internet websites of large companies. Mainframes are becoming a popular business computing platform for data mining and warehousing, as well as electronic commerce applications.
1.1.4 Supercomputers
Supercomputers are a category of exceedingly powerful computer systems specifically designed for scientific, engineering, and business applications requiring extremely high speeds for massive numeric computations. Supercomputers use the parallel processing architectures of interconnected microprocessors (which can execute many parallel instructions). They can easily perform arithmetic calculations at speeds of billions of floating-point operations per second (gigaflops)āa floating-point operation is a basic computer arithmetic operation, such as addition, on numbers that include a decimal point. Supercomputers that can calculate in trillions of floating-point operations per second (teraflops), which use massively parallel processing (MPP) designs of thousands of microprocessors, are now in use.
The market for supercomputers includes government research agencies, large universities, and major corporations. They use supercomputers for applications such as global weather forecasting, military defense systems, computational cosmology and astronomy, microprocessor research and design, and large-scale data mining.
1.2 Computer System
A typical desktop computer system is representative of a whole spectrum of computer systems.
1.2.1 Hardware
A typical desktop computer has a system unit, which is the case or box that houses, for example:
- ⢠Motherboard
- ⢠Other printed circuit boards
- ⢠Storage devices
- ⢠Power supply
- ⢠Peripheral devices
The motherboard is the main printed circuit board, and holds the computerās processor chip(s), read-only memory (ROM) chips, random-access memory (RAM) chips, and several other key electronic components.
The processor is an important part of a computer, and can be a single chip or a collection of chips.
- ⢠ROM chips typically contain a small set of programs that start the computer, run system diagnostics, and control low-level input and output activities. The instructions in the ROM chips are permanent, and the only way to modify them is to reprogram the ROM chips.
- ⢠RAM chips are volatile and hold programs and data that are temporary in nature.
These programs are collectively called the basic input output system (BIOS) in PCs.
Each printed circuit board houses a number of chips, some of which are soldered and the rest are plugged into the board. The latter permits the user to upgrade the computer components.
Chipsets: Chipsets provide hardware interfaces for the processor to interact with other devices, such as dynamic random-access memory (DRAM) and graphics cards.
A battery powered real-time clock chip keeps track of the current date and time.
The system unit is generally designed in such a way that it can be easily opened to add or replace modules. The different components in the system unit are typically connected using a bus, which is a set of wires for transferring electrical signals. Circuits etched into the boards act like wires, providing a path for transporting data from one chip to another.
The motherboard also typically contains expansion slotsāthe number of expansion slots in the motherboard determines its expandability. Expansion slots are sockets into which expansion cards such as a video card, sound card, and internal modem can be plugged. An expansion card has a card edge connector with metal contacts, which when plugged into an expansion slot socket, connects the circuitry on the card to the circuitry on the motherboard:
- ⢠A sound card contains circuitry to convert digital signals from the computer into sounds that play through speakers or headphones that are connected to the expansion ports of the card.
- ⢠A modem card connects the computer to a telephone system to transport data from one computer to another ov...