Tuesday, March 27, 2007

Understanding Processor Architecture: Simplify Computer Complexity

Computers are complex systems. We study computer systems by using layers of abstraction. We use a hierarchical structure to simplify the management. Each level of management filters out unnecessary details on the lower levels and presents only an abstracted version to the higher-level management.

People can look at computer systems from several different perspectives depending on the type of their interaction. We use the concept of abstraction to look at only the details that are necessary from a particular viewpoint. For example, a computer user interacts with the system through an application program. Suppose you are interested in browsing the Internet. Your obvious choice is to interact with the system through a Web browser such as the Fire fox (FF) or Internet Explorer (IE). On the other hand, if you are a computer architect, you are interested in the internal details that do not interest a normal user of the system.

From the programmer’s viewpoint, there exists a hierarchy from low-level languages to high-level languages (see Figure 1). At the lowest level, we have the machine language that is the language understood by the machine hardware. Because digital computers use 0 and 1 as their alphabet, machine language naturally uses 1s and 0s to encode the instructions. One level up, there is the assembly language as shown in Figure 1. Assembly language does not use 1s and 0s; instead, it uses mnemonics to express the instructions. Assembly language is closely related to the machine language.

computer abstraction layersFigure 1. Abstract layers of Computer Systems

References

  • Guide to RISC Processors for Programmers and Engineers by Sivarama P. Dandamudi, Springer (2005), ISBN 0-387-21017-2.


Monday, March 26, 2007

Understanding Processor Architecture: ISA

A programmer uses the Instruction Set Architecture (ISA) as an abstraction to understand the processor’s internal details. This abstraction suits us very well as we are interested in the logical details of the processor without getting bogged down by the myriad implementation details.

The ISA specifies how a processor functions: what instructions it executes and what interpretation is given to these instructions. If these specifications are precise, they give freedom to various chip manufacturers to implement physical designs that look functionally the same at the ISA level. Thus, if we run the same program on these different implementations, we still get the same results. For example, the Intel 32-bit ISA (IA-32) has several implementations including the Pentium processors, cheaper Celeron processors, high-performance Xeon processors, and so on.

The ISA-level abstraction provides a common platform to execute programs. If a program is written in C, a compiler translates it into the equivalent machine language program that can run on the ISA-level logical processor. Similarly, if you write your program in FORTRAN, use a FORTRAN compiler to generate code that can execute on the ISA-level logical processor.

References

  • Guide to RISC Processors for Programmers and Engineers by Sivarama P. Dandamudi, Springer (2005), ISBN 0-387-21017-2.