Chapter-3 Computer HW and OS
Chapter-3 Computer HW and OS
03/08/24 1
Introduction to CPU
• Central processing unit imprinted on silicon chip
called microprocessor.
• Contain tens of millions of tiny transistors.
• Key components:
– Central processing unit.
– Registers.
– System clock.
03/08/24 2
Types of Chips
• Intel makes a family of processors:
– Pentium III and Pentium4 processors in most PCs
– Celeron processor sold for low-cost PCs
– Xeon and Itanium for high-end workstations and network
servers.
• Other processors:
– Cyrix and AMD make Intel-compatible microprocessors.
– Power PC chips used primarily in Macintosh computers.
– HP’s Alpha microprocessor used in high-end servers.
03/08/24 3
Microprocessor Speeds
• Measure of system clock speed :
– How many electronic pulses the clock produces per second
– Usually expressed in gigahertz (GHz)
• Billions of machine cycles per second
• Some old PCs measured in megahertz (MHz)
• Comparison of clock speed only meaningful between
identical microprocessors.
• CPU cycle time – inverse of clock rate or speed.
03/08/24 4
Current Technology Capabilities
and Limitations
• Moore’s Law
– Rate of increase in transistor density on microchips doubles
every 18-24 months with no increase in unit cost.
• Rock’s Law
– Cost of fabrication facilities for chip generation doubles
every four years.
• Increased packing density.
• Electrical resistance.
03/08/24 5
03/08/24 6
Components of the CPU
• Control Unit (CU)
– Moves data and instructions between main memory and
registers.
• Arithmetic Logic Unit (ALU)
– Performs computation and comparison operations.
• Set of registers (R)
– Storage locations that hold inputs and outputs for the ALU.
03/08/24 7
03/08/24 8
Actions Performed by CPU
• Fetch cycle
• CPU:
• Fetches an instruction from primary storage.
• Increments a pointer to location of next instruction.
• Separates instruction into components (instruction code and data
inputs).
• Stores each component in a separate register.
• Execution cycle
• ALU:
• Retrieves instruction code from a register.
• Retrieves data inputs from registers.
• Passes data inputs through internal circuits to perform data
transformation.
• Stores results in a register.
03/08/24 9
CPU Registers
• Primary roles
– Hold data for currently executing program that is
needed quickly or frequently (general-purpose
registers).
– Store information about currently executing program
and about status of CPU (special-purpose registers).
03/08/24 10
General-Purpose Registers
• Hold intermediate results and frequently needed
data items.
• Used only by currently executing program.
03/08/24 12
Word Size
• Number of bits a CPU can process simultaneously.
03/08/24 13
The Physical CPU
• Electrical device implemented as silicon-based
microprocessor.
• Contains millions of switches, which perform
basic processing functions.
• Physical implementation of switches and
circuits.
03/08/24 14
Transistors
• Electronic switches that may or may not allow
electric current to pass through.
– If current passes through, switch is ON, representing
a 1 bit.
– Otherwise, switch is OFF, representing a 0 bit.
03/08/24 15
Switches and Gates
• Basic building blocks of computer processing circuits.
• Electronic switches
– Control electrical current flow in a circuit.
– Implemented as transistors.
• Gates
– An interconnection of switches.
03/08/24 17