Студопедия
Случайная страница | ТОМ-1 | ТОМ-2 | ТОМ-3
АрхитектураБиологияГеографияДругоеИностранные языки
ИнформатикаИсторияКультураЛитератураМатематика
МедицинаМеханикаОбразованиеОхрана трудаПедагогика
ПолитикаПравоПрограммированиеПсихологияРелигия
СоциологияСпортСтроительствоФизикаФилософия
ФинансыХимияЭкологияЭкономикаЭлектроника

Instruction Execution with the CPU

Types of Memory | Expansion Slots and Cards | USB and FireWire | Input Devices | IDE Interface | Disk Drive Reliability | Magnetic Media | How Components Work Together |


Читайте также:
  1. B) Overseeing the execution and monitoring of IT operational events and activities
  2. CAI (Computer-Assisted Instruction)
  3. Elaborate the document according to the instructions within 60 minutes!
  4. Elevator machine instructions
  5. Epilogue (optional) The Instructions
  6. Ex.1. Study the instructions how to write a reaction essay.
  7. Execution order

Processor and Memory

The processor and memory are essential components that enable a computer to process commands. The processor carries out instructions given to the computer. These instructions are stored in the computer's memory. In this section, you will learn how the processor executes instructions and the different types of memory a computer has.

Processor Basics

Processor

A computer's processor is usually referred to as the microprocessor due to its size, which is about the size of your fingernail.

Figure 1 Microprocessor chip

A microprocessor processes all the instructions given to the computer (for example, add two numbers, execute program instructions, or print documents). Physically, the microprocessor is a single chip known as an integrated circuit (IC). Each chip is made out of silicon and it contains millions of transistors packed onto a chip.

The Intel Pentium M Processor, introduced on March 12, 2003, has 77 million transistors, and the width of the smallest wire on the chip is 0.13 micron, or 0.00000013 meter. As a reference, 0.13 micron is about 1/800 of the width of a human hair.

The microprocessor is referred to as the Central Processing Unit (CPU). The job of a microprocessor is to execute a series of machine instructions. These instructions are procedures to carry out a task written in a form that the computer can understand.

Instruction Execution with the CPU

Instructions are stored in the computer's memory, RAM (random access memory), which will be covered in section 2.1.2 Types of Memory.

There are two main components of the CPU. One is the control unit, which accesses instructions stored in RAM, interprets what they mean, and then dispatches them. The other is the Arithmetic/Logic Unit (ALU) that performs arithmetic (i.e. addition, subtraction, multiplication, division) and logic (i.e. greater than, less than, equal to) operations needed to process the instructions.

There are four steps that the CPU performs when executing an instruction; they are called the fetch-execute cycle. The four steps are as follows:

1. Fetch - The control unit gets the instruction from memory.

2. Interpret - The control unit decodes what the instruction means and directs the necessary data to be moved from memory to the ALU.

3. Execute - The control unit directs the ALU to perform the necessary arithmetic or logic operations.

4. Store - The result of the computation is stored in memory.

The diagram below illustrates the steps taken by the CPU to execute an instruction that adds two numbers. The instruction is: Let R = X + Y.

Figure 2 Fetch-Execute cycle

Another component of the microprocessor is the cache, a special high-speed memory that stores most recently used data in order to speed up the process of instruction execution. A cache can speed up data retrieval because recently used data is likely to be used again by the computer.

Level 1 (L1) cache memory or primary cache memory is located on the CPU to provide the CPU with the fastest access to data. There is also a slower cache, the Level 2 (L2) cache memory or secondary cache, located between the RAM and the CPU (sometimes on the CPU). If data cannot be found on either cache, it will be retrieved from RAM. Relative to the physical distance between the CPU and storage areas for data and instructions, data is retrieved more quickly from the L1 cache, then the L2 cache, and then the RAM.

The figure below illustrates how parts of a microprocessor fit within the other components in a computer.

Figure 3 Microprocessor view

Performance: Factors and Measures

The rate at which instructions are processed is controlled by an internal clock, also known as the system clock. The internal clock sends pulses at a fixed rate to synchronize all computer operations. The unit of measure for cycles per second is the hertz (Hz). One Hz means one cycle per second, one kHz (kilohertz) means one thousand cycles per second, and one MHz means one million cycles per second. Computer clock cycles are closely related to the execution of instructions. So, a 3 GHz Pentium 4 machine can execute more instructions per second than a 2 GHz Pentium IV machine. The greater the hertz, the faster the execution speed.

As processors have become faster and storage capacity increased, it has become feasible to perform more tasks than before. For example, near-instantaneous spellchecking can be done as the user types out a word, whereas years ago, this was not practical. Due to limited processing resources, older processors could not enable a user to type while verifying spelling.

A fetch-execute cycle does not necessarily correspond rigidly to the execution of a fixed number of instructions. Sometimes it takes two or more cycles to execute an instruction. And, today's computers sometimes execute multiple instructions in a single cycle. Thus, the number of instructions completed is independent of the number of cycles used. Sometimes machines are compared on the number of instructions per second (IPS) rather than on raw clock speed; this measure depends on both the number of cycles per second and what kind of instruction mix (set of instructions) is executed. A machine that is fast at financial calculations may not perform as well on a graphics application, since the instruction mix is different.

Instructions can differ a great deal. Some complex instructions require a lot of cycles and take a comparatively long time to execute. Other instructions may be very simple and execute in very little time. For example, a division operation takes longer than an addition operation. Although the IPS rating is not the best method of comparison, it can be useful when comparing similar chips.

Another measure of computer performance is its bandwidth, the volume of data that can be transmitted within a fixed amount of time between components in a computer system (such as the transfer speed from the disk to the motherboard) or through connections to other computers. Bandwidth is expressed in bits per second (bps), or sometimes bytes per second (Bps) (recall that 8 bits equals 1 byte).

Different machines, however, should be compared by executing a standard suite of instructions with execution times carefully measured and recorded. This is a more careful way to measure machine performance, and it is known as benchmarking– comparing disparate systems or components via a standardized set of instructions or series of tasks. Benchmarking can test anything from just the processor to executing office applications. The comparison is measured by the time it takes to execute these instructions. For example, Intel benchmarks its Pentium III processors based on the processors' performance of a variety of tasks, and so does Advanced Micro Devices with its processors. You can view various benchmark results comparing AMD and Intel processors.

In general, it is good practice to ask which benchmarks are used in performance claims. For example, a benchmark that tests graphics speed may be irrelevant if the types of graphical applications you use are different from those used in the test. It is important to assure that comparisons or claims are based on the same benchmarks. Benchmarking results by unbiased, independent organizations are especially useful.


Дата добавления: 2015-11-14; просмотров: 60 | Нарушение авторских прав


<== предыдущая страница | следующая страница ==>
Sales and Marketing Using Electronic Commerce| Types of Processors

mybiblioteka.su - 2015-2024 год. (0.006 сек.)