programming4us
programming4us
ENTERPRISE

HP ProLiant Servers AIS : Processors and Multiprocessing - How Processors Work

11/30/2012 2:07:57 AM
At the most basic level, a processor is a group of components that execute instructions. An instruction is an order (such as add, subtract, or compare) that a computer program gives to a processor. Instructions are written in binary code, which means they are represented by 1s and 0s. The binary code opens and closes gates between two devices in the processor that need to communicate with each other. This process moves information from one device to the other.

Typically, a programmer creates a new application with a high-level programming language. Commands in the high-level programming language correspond to several instructions. When the programming is complete, a compiler converts the high-level program into instructions. This process is illustrated in Figure 1.

Figure 1. The process of building instructions for a processor to perform.


1. Processor Components

The key components in a processor are illustrated in Figure 2, and are described as follows:

  • Prefetch unit— A holding place for instructions and operands that a processor will need.

  • Decode unit— A component that breaks an instruction into its constituent parts.

  • Execution unit— A component that performs the actual data processing, such as adding and subtracting. The execution unit can be further divided into two other components: (1) the arithmetic logic unit (ALU), and (2) the floating-point unit (FPU).

  • Control unit— A component that acts as a scheduler for the execution units.

  • Registers— A small number of memory locations used by the control and execution units to store data temporarily.

  • Level 1 (L1) cache— A small, fast memory area that holds recently used instructions and data.

    Note

    Some processors are designed around the Harvard architecture. In this architecture, the L1 cache is divided into an instruction cache (Icache) and a separate data cache (Dcache), as shown in the graphic.


  • Branch target buffer— A register that stores recently taken branches to aid in branch prediction.

  • Bus interface unit— A component that controls access to the address and data buses.

Figure 2. The main components of a processor.


2. How Processors Handle Instructions

In general, a processor goes through five stages when it receives input.

2.1. STAGE 1: FETCHING INSTRUCTION

The prefetch unit searches for an instruction to handle the input. First it looks for an instruction in the L1 cache (or the Icache portion of L1). If it does not find the instruction there, the prefetch unit looks for it in successive layers of the memory hierarchy.

After the correct instruction is found, it is stored in the L1 cache. The prefetch unit fetches the instruction from the cache and sends it to the decode unit.

2.2. STAGE 2: DECODING INSTRUCTION

The decode unit breaks the instruction into its basic elements, such as an index, data, and the operation code. The decode unit sends the decoded result to the control unit.

2.3. STAGE 3: EXECUTING INSTRUCTION

The control unit sends the decoded instruction to an execution unit, such as the ALU. The execution unit completes the command, such as adding, subtracting, multiplying, and dividing.

2.4. STAGE 4: TRANSFERRING DATA

If the instruction is a command, the data it needs to complete the command is transferred to the execution unit from the registers.

2.5. STAGE 5: WRITING DATA

If required, the execution unit writes the result to a register and data cache.

3. Clock Synchronization

 Clock Cycle 1Clock Cycle 2Clock Cycle 3Clock Cycle 4Clock Cycle 5Clock Cycle 6Clock Cycle 7Clock Cycle 8Clock Cycle 9Clock Cycle 10
Instruction 1Fetch instructionDecode instructionExecute instructionFetch dataWrite data     
Instruction 2     Fetch instructionDecode instructionExecute instructionFetch dataWrite data

Each stage that the processor goes through is synchronized with the system clock. If each stage takes one clock cycle to complete, one instruction will be processed in five clock cycles. After five cycles, the next instruction can be processed
Other  
 
GTS - youtube channel
video
 
Video tutorials
- How To Install Windows 8

- How To Install Windows Server 2012

- How To Install Windows Server 2012 On VirtualBox

- How To Disable Windows 8 Metro UI

- How To Install Windows Store Apps From Windows 8 Classic Desktop

- How To Disable Windows Update in Windows 8

- How To Disable Windows 8 Metro UI

- How To Add Widgets To Windows 8 Lock Screen

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010
programming4us programming4us
programming4us
 
 
programming4us