Unit 3
Unit 3
Unit 3
UNIT 3
Processors.
Processors
• The main brain or the engine of the PC is the processor (sometimes called
microprocessor) or the Central Processing Unit. The CPU performs the system’s
calculating and processing.
• It is the most expensive single component in the system, costing up to four times
greater than the mother board. This invention is generally accredited to Intel. This
means that all PC-compatible systems use Intel Processor.
• The processor acts like the conductor in an orchestra. It reads program instructions
( commands) from main memory that tell it what it needs to do to accomplish the
work that the user wants, and then executes them.
• The CPU is functionally divided into the control unit, internal registers and the
Arithmetic and Logic unit.
•
The CPU and Program Execution
• The computer has to read and obey every program, including the operating system itself,
one instruction at a time. The basic operation is the fetch-decode-execute cycle. It is the
sequence whereby each instruction within a program is read into the CPU from program
memory and then decoded and executed.
• In the history of the development of computers, the limiting factors have been dictated the
units involved in the fetch, decodes or execute cycle: memory, bus , or CPU. This affects
both design parameters for computer architecture and also the selection of algorithms for
problem solving. For example: ‘memory-intensive’ methods are chosen when memory is
fast and cheap, otherwise ‘compute –intensive’ methods are chosen.
• DRAM chips are used in main memory but they are not as fast as the CPU.
• SRAM chips are available or they faster than DRAM but cost higher so they are only used
in small, fat buffers, called memory caches. Memory cache helps reduce the main memory
access delay by holding copies of current instructions and data.
• The processor is responsible for actually executing the instructions that make up
programs and the operating system. Processors are made up several building
blocks: execution units, registers files, and control logic.
• The execution units contains the hardware that executes instructions. this includes
the hardware that fetches and decode instructions, as well as the arithmetic logic
units that perform actual computation.
• Many processor contain separate execution units for integer and floating –point
computations because very difficult hardware is required to handle these two data
types. Also, modern processors use multiple execution units to execute
instructions in parallel to improve performance.
The Register file
• This is small storage area for data that the processor is using. Values stored in the
register file can accessed more quickly than stored in the memory system, and
register file usually support multiple simultaneous accesses. This allows an
operation be read all of its inputs from the register file at the same time.
• The control logic controls the rest of the processor: It determines when
instructions can be executed and what operations are required to execute each
instruction.
• The main function of the microprocessor or the CPU is to accept data in the form
of a program from input devices, process the data, output the result and transform
the result either to the memory or an output device.
• All processors are organized into three major sections
Arithmetic and Logical Unit Section (ALU)
Control Unit section (CU)
Registers (Internal Mamory) IR
• The function of the ALU is to perform arithmetic operations such as addition,
subtraction, division, multiplication and Logical operations such as AND, OR and
NOT.
• The function of the Control Unit is to control I/O devices, generate control signals
to the other components of the computer such as the Read and Write signals and
also perform instruction execution.
• Information is moved from memory to the registers and also pass the information
to ALU for logical and arithmetic operations. It should also be noted that the
function of the microprocessor and the CPU are the same.
• If the Control Unit, the Registers and the ALU are all packaged into one ie,
Integrated circuit it is referred to as a microprocessor. Otherwise the unit is CPU.
Processor Design
• Instruction set architecture (ISA) encoding is the set of bits that is used to
represent the instructions in the memory of the computer. Generally, we need an
encoding that is both compact and requires little logic to decode, [meaning it is
simple for the processor to figure out which instruction is represented by a figure
out which instruction is represented by a given bit pattern in the program.]
Unfortunately, these two goals are somewhat in conflict.
Fixed-length
• Instruction set encodings use the same number of bits to encode each instruction
in the ISA. Fixed-length encodings have the encodings have the advantage that
they are simple to decode, reducing the amount of latency of the decode logic
required and the latency of the decode logic. Also, a processor that uses a fixed-
length ISA encoding can easily predict the location of the next instruction to be
executed (assuming that the current instruction is not a branch). This makes it
easier for the processor to use pipelining of multiple instructions.
Variable-length
• instruction set encodings use different numbers of bits to encode the instructions
in the ISA, depending on the number of inputs to the instruction, the addressing
modes used, and other factors.
• Using a variable length of encoding, each instruction takes only as much space in
memory as it requires, although many systems require that all instruction
encodings be an integer number of bytes long.
• Using a variable-length instruction set can reduce the amount of space taken up by
a program, but it greatly increases the complexity of the logic required to decode
instructions, since parts of the instruction, such as the input operands, may be
stored in different bit positions in different instructions.
• Also, the hardware cannot predict the location of the next instruction until the
current instruction has been decoded enough to know how long the current
instruction is
• Given the pros and cons of fixed-and variable-length instruction encodings fixed-
length encodings are more common in recent architectures. Variable-length
encodings are mainly used in architectures where there is a large variance between
the amounts of space required for the longest instruction in the ISA.
• Examples of this include stack-based architectures, because many operations do
not specify their inputs, and CISC architectures, which often contain a few
instructions that can take a large number of inputs.
Processor Micro architecture
• Processor micro architecture includes all of the details about how a processor is
implemented. The ISA has a great deal of impact on the micro architecture. An
ISA that contains only simple operations can be implemented using a simple,
straightforward micro architecture, while an ISA containing complex micro
architecture to implement.
SUMMARY OF PROCESSOR DESIGN
• The architecture is the build up of the processor. There are two main types of the
architecture or technology used to design a CPU.
CISC – Complex Instruction Set Computer
RISC – Reduced Instruction Set Computer
CISC technology
• The CISC was adopted or developed in 1978 by Intel. It started with the 8086
microprocessor chip. It was designed to process 16 bit data word. It had no
instructions for floating points operation. Presently Pentium processors possess 32
bit and 64 bit word and it can process floating point instructions. This is because
Intel designed the Pentium processor in such a way that it can execute programs
written for 8086 processor.
Characteristics of CISC
• Until the mid 1990s manufacturers were designing processors using the CISC
technology with large set of instructions. Because of the setbacks in the former
technology, manufacturers decided to adopt the RISC technology that executes
instructions with only
Characteristics of RISC technology
• The most common way to describe a processor is by the width of the processor’s
external data bus. This defines the number of data bits that can be moved into or
out of the processor in one cycle. A
• bus is simply a series of connections that carry common signals. Data buses are
bundles of wires (or pins) used to send and receive data.
• The more signals that can be sent at the same time, the more data that can be
transmitted in a specific interval and therefore the faster the bus.
• A wider bus is like having a highway with more lanes, which allow for greater
throughput. Since data in a computer is sent as digital information consisting of a
time interval in which a signal carries 1 data bit, the more wires you have, the
more individual bits you can send in the same time interval.
Internal Registers.
• The size of the internal register indicate how much information the processor can
operate on at one time, and how it moves data around internally within the chip.
The register size is essentially the internal databus size.
• A register is a holding cell within the processor eg the processor can add numbers
in two different registers, storing the result in a third register. The register size
determines the size of data the processor can operate on.
• The register size also describes the type of software or commands and instructions a
chip can run. That is, a processor with 32-bits internal registers can run 32-bit
instructions that are processing 32 bit chunks of data, but processors with 16bit
registers cannot.
• More advanced 6th generation processors such as Pentium Pro have as many as
six(6) internal pipelines for executing instructions.
Internal Cache
• Most processors have an integrated (LI) cache controller. This controller has built-in
full core speed cache memory.
• This cache basically is an area of very fast memory built into the processor and is used
to hold some of the current working set of code and data.
• Cache memory can be accessed with no wait states because it can fully keep up with
the speed of the processor core.
• Using cache memory reduces a traditional system bottle neck because system RAM
often is much slower than the CPU. This prevents the processor from having to wait for
code and data from much slower main memory, therefore improving performance.
• If the data the processor wants is already in the internal cache, the CPU does not have
to wait. If the data is not in the cache, the CPU must fetch it from the level 2 cache or
from the system bus, meaning main memory directly.
Address bus.
• The address bus is the set of wires that carry the addressing information used to
describe the memory location to which the data is being sent, or from which the
data is being retrieved. As with the data bus, each wire in an address bus carries a
single bit of information.
• This single bit is a single digit in the address. The more wire ( digits) used in
calculating these addresses, the greater the total number of address location. The
size ( or width) of the address bus indicates the maximum amount of RAM that a
chip can address.
Processor modes
• All Intel processors, from 386 on up, can run in several modes. Processor modes
refer to the various operating environments and affect the instructions and
capabilities of the chip. The processor sees and manages the system’s memory and
the tasks that use it.
• The 3 different modes of operation possible are
Real mode
Protected Mode
Virtual Real Mode (Real within Protected Mode)
Real Mode
• All software running in real mode must use only 16-bit instructions and live
within the 20-bit (1M) memory architecture. It also supports software of the type
– single tasking
• which means that only one program can run at a time. There is no built-in
protection to keep one from overwriting another program or even the operating
system in memory, which means that if more than one program is running, it is
possible for one of them to bring the entire system to a crash.
Protected mode.
• This chip can run an entirely new 32 bit of instruction set which also means that
softwares running at that mode is protected from overwriting one another in
memory. Such protection helps make the system more crash-proof as an errant
program cannot very easily damage other programs or the operating system. In
addition, a crashed program can easily be terminated.
Virtual Real Mode (Real within Protected)
• Virtual Real is essentially a virtual real mode 16-bit environment that run inside
32-bit protected mode. Eg. When you run a DOS prompt window inside windows
98 you have created a virtual real mode session.
• Because protected mode allows true multi-tasking you can actually have several
real mode sessions running, each with its own software running on a virtual; PC.
This can all run simultaneously even while other 32-bit applications are running.
• Note that any program running in virtual real mode window can access up to only
1M of memory.
Processor Features,
• Modern processors have several different features. The most notable are
SMM (Power Management)
Super Scaler execution
MMX Technology
Dynamic execution
Dual Independent Bus (DIN) architecture
SMM (Power Management)