Upload
garcons0
View
1.914
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Citation preview
11.1 The Components of a Computer System Unit
Power Supply Storage Devices Motherboard
Peripherals
11.1 The Components of a Computer System Unit
A case contains circuit boards, a power supply and storage devices
Main memory
Motherboard
CPU
Display card
DVD-ROM driveFloppy disk drive
Power supply
Hard disk drive
A system unit
11.1 The Components of a Computer Motherboard
The main circuit board in the system unit. Provide sockets for CPU, memory chips and expansion
slots. Contain circuitry that connects the components together.
11.1 The Components of a Computer Peripherals
Hardware devices connected to the system unit.
Broadband modem
Digital video
camera Printer Microphone
USB flash drive
Scanner
Peripherals
Monitor
SpeakerMouse
Keyboard
11.1 The Components of a Computer Peripherals
Hardware devices connected to the system unit.
Broadband modem
Digital video
camera Printer Microphone
USB flash drive
Scanner
Peripherals
Monitor
SpeakerMouse
Keyboard
11.2 Central Processing Unit (CPU) What is a CPU?
‘Brain’ of a computer. Executes the instructions of a computer program. Processes data to do a specific tasks. The processing power of the CPU usually determines the
overall performance of a computer. Most devices communicate with the CPU to carry out
certain tasks. CPU communicates with other devices through bus lines.
11.2 Central Processing Unit (CPU) What is a CPU?
The role of a CPU
11.2 Central Processing Unit (CPU) Major Components
Arithmetic and logic unit (ALU) Control unit (CU) Registers
11.2 Central Processing Unit (CPU) Arithmetic and Logic Unit (ALU)
Perform arithmetic and logical operations Use registers to hold data during calculations Results are usually stored in a register called an
accumulator
+
÷X
-
NOT
OR AND
11.2 Central Processing Unit (CPU) Control Unit (CU)
Keep track of the sequence of instructions being processed
Monitors and coordinates all I/O operations and system units
How the ALU and the CU execute an addition instruction
11.2 Central Processing Unit (CPU) Registers
Memory units inside a CPU. Provide storage space for ALU and CU. Small number of registers Fastest way for a CPU to access data Three types of register:
General purpose registers Control registers Status registers
11.2 Central Processing Unit (CPU) General Purpose registers (GPRs)
Mainly used by instructions of assembly and machine code programs.
Examples of general purpose registers: Accumulator(AX) Base register (BX) Counter (CX) Data register (DX)
11.2 Central Processing Unit (CPU) General Purpose registers (GPRs)
Functions of GPRs and the corresponding examples
FunctionExample of assembly instructions
Instruction Explanation
Load data from main memory into a register.
LOAD AX, 8 Store 8 in register AX.
Store data temporarily in arithmetic operations.
ADD BX, CXAdd the value stored in CX to that in BX, and store the sum in BX.
Store data from a register into main memory.
STORE ANS, AX
Store the data in register AX to the main memory address variable ANS.
11.2 Central Processing Unit (CPU) Control Registers
Provide temporary memory for CU to control the operation of instructions.
Major control registers: Instruction Register (IR) Program Counter (PC) Memory Address Register (MAR) Memory Data Register (MDR)
11.2 Central Processing Unit (CPU) Control Registers
Instruction Register (IR) Contains the instructions to be executed by the CPUs
Program Counter (PC) Contains the memory address of the next instruction to be
executed.
11.2 Central Processing Unit (CPU) Control Registers
Memory Address Register (MAR) and Memory Data Register (MDR)
Facilitate the communication of the CPU with the main memory through the system bus.
MAR holds the address of the memory location. MDR contains the data to be written into or read from the
location specified in MAR.
11.2 Central Processing Unit (CPU) Control Registers
1. Control unit issues a command to load the next instruction.
2. Control unit sends a READ control signal to the main memory via the control bus
3. PC copies the address of the required instruction to MAR.
4. MAR passes the address to the main memory via the address bus.
5. The main memory returns the addressed data to MDR via the data bus.
6. The instruction in MDR is then loaded into IR for execution.
Execution process of program instructions
11.2 Central Processing Unit (CPU) Status Registers
Contain a number of flag bits indicating the status after the execution of instructions
Used in instructions of conditional testing and program branching
11.2 Central Processing Unit (CPU) Status Registers
Essential flags in the status register of CPU 8088
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Zero flag (Z): Set to 1 if the evaluated result is zero; set to 0 otherwise.Sign flag (S): Set to 1 if the evaluated result is negative; set to 0 otherwise.Parity flag (P): Set to 1 if the evaluated result is an odd parity.Carry flag (C): Set to 1 if the evaluated result contains a carry; set to 0 otherwise.Overflow flag (O): Set to 1 if the evaluated result has overflowed. (i.e. the resulting value is too large to be stored in the memory unit)
O S Z P C
11.2 Central Processing Unit (CPU) System Bus
Also know as bus line Physical wiring that connects the various components of
a computer system Transmit data between the CPU and other components
Bus type Function
Data bus Transfer data and instructions.
Address bus
Transfer the source address or the destination address of data.
Control bus
Indicate the direction of the data transfer and coordinate thetiming of the event during transfer.
Functions of data bus, address bus and control bus
11.2 Central Processing Unit (CPU) System Bus
Size of a bus = bus width Bus width determines the number of bits of data the
computer can transmit at one time.
System Bus
System Bus
11.2 Central Processing Unit (CPU) System Bus
Interconnection of computer units by system bus
11.2 Central Processing Unit (CPU) System Bus
Model of CPU Bus width
Intel 8088 8-bit
Intel 80286 16-bit
Intel 80486 32-bit
Pentium 64-bit
Intel Core 2 Duo 64-bit
Bus width among different CPUs
11.2 Central Processing Unit (CPU) System Bus
Model of CPU Bus width
Intel 8088 8-bit
Intel 80286 16-bit
Intel 80486 32-bit
Pentium 64-bit
Intel Core 2 Duo 64-bit
Bus width among different CPUs
11.3 Machine Cycle
Machine Cycle Process of executing an instruction in a CPU
Sub-cycle Description
FetchRead the next instruction from the main memory into instruction register (IR).
DecodeIdentify the operation code and operands in an instruction.
ExecuteInterpret the operation code and perform the required operation.
Sub-cycles of a machine cycle
11.3 Machine Cycle
Machine Cycle
Process of a machine cycle
11.3 Machine Cycle
Machine Cycle Interrupt Sub-cycle
At the end of the execution of an instruction, the CPU detects whether an interrupt has occurred.
If have interrupt
Interrupt served
CPU resumes the operation of
the next instruction of
the active process
End of execution of an instruction
1. CPU saves the current process status
2. Handles the interrupt immediately
11.3 Machine Cycle
Machine Cycle Interrupt Sub-cycle
At the end of the execution of an instruction, the CPU detects whether an interrupt has occurred.
If have interrupt
Interrupt served
CPU resumes the operation of
the next instruction of
the active process
End of execution of an instruction
1. CPU saves the current process status
2. Handles the interrupt immediately
11.4 Measurement of CPU Speed Clock Rate
Measure speed of CPU Measurement unit: megahertz (MHz) or gigahertz (GHz) 1 hertz = 1 clock cycle per second
Model of CPU
Years of production
Typical clock rate
Duration of one clock cycle
Intel 8088 1979 – 1982 4.77 MHz 0.21μs (210 ns)
Intel 80286 1982 – 1986 6 MHz – 25 MHz 40 ns – 166.7 ns
Intel 80386 1986 – 2007 16 MHz – 40 MHz 25 ns – 62.5 ns
Intel 80486 1989 – 2007 16 MHz – 100 MHz
10 ns – 33.4 ns
Pentium 1993 – 1996 60 MHz – 200 MHz
5 ns – 16.7 ns
Pentium II 1997 – 1999 233 MHz – 450 MHz
2.2 ns – 4.3 ns
Pentium III 1999 – 2001 500 MHz – 1.13 GHz
885 ps – 2 ns
Pentium IV 2000 – now 1.4 GHz – 3.4 GHz 294 ps – 714 ps
Intel Core 2 Duo
2000 – now 1.06 GHz – 3 GHz 333 ps – 943 ps
Clock rates of popular CPUs for the past thirty years
11.4 Measurement of CPU Speed Word Length
Number of bits of data and instructions the CPU can handle at one time
Advantage of longer word length: More data can be processed in one time. More instructions can be included in the instruction
set. More complicated instructions can be included in the
instruction set.
A 64-bit CPU
11.4 Measurement of CPU Speed Word Length
Number of bits of data and instructions the CPU can handle at one time.
Advantage of longer word length: More data can be processed in one time. More instructions can be included in the instruction
set. More complicated instructions can be included in the
instruction set.
A 64-bit CPU
11.5 Main Memory
Main Memory Accessible to the CPU of a computer without using other
I/O channels. The memory chips are installed on the motherboard. Used to store data Used to store instructions that CPU will execute 2 major types:
Random access memory (RAM) Read-only memory (ROM)
11.5 Main Memory
Random Access Memory (RAM) Temporarily hold the data and instructions of application
software and the operation system Volatile = all data stored in RAM disappears instantly
after the computer is turned off Access time is just a hundredth of hard disk Measurement units: bytes (B), kilobytes (KB), megabytes
(MB), gigabytes (GB), terabytes (TB)
A RAM module
11.5 Main Memory
Random Access Memory (RAM) Two main streams:
Dynamic random access memory (DRAM) Static random access memory (SRAM)
DRAM SRAM
Speed (clock rate) Lower Higher
Cost Lower Higher
Power consumption
Higher than SRMA Lower than DRAM
Storage capacity Larger Smaller
ApplicationComputer main memory, game console
CPU cache, hard disk buffer, printer buffer, PDA
Characteristics of DRAM and SRAM
11.5 Main Memory
Read-only Memory (ROM) Store the permanent information supplied by the
manufacturer Contain the bootstrap program which loads and initializes
the operation system of the computer. Store basic input/output system (BIOS) Non-volatile Variants of ROM:
Erasable programmable ROM (EPROM) Electrically erasable programmable ROM
(EEPROM)
A ROM chip installed on a motherboard
11.5 Main Memory
Cache Memory High-speed memory Store data and instructions that have been recently used
by the CPU Integrated into a CPU or resided close to a CPU
CPU requests an instruction or data
Searches cache memory first in a very short time
Acquires the data and proceeds to the next task
Look up in the main memory
Found
Not found
11.5 Main Memory
Cache Memory High-speed memory Store data and instructions that have been recently used
by the CPU Integrated into a CPU or resided close to a CPU
CPU requests an instruction or data
Searches cache memory first in a very short time
Acquires the data and proceeds to the next task
Look up in the main memory
Found
Not found
11.6 Latest Development of CPU and Main Memory
Latest Technology of CPU The future development of the CPU in the future has
focused on the integration of more cores into the CPU.
Processors on an Intel 45nm wafer photographed with a pencil. Each dual core chip consists of 410 million transistors.
11.6 Latest Development of CPU and Main Memory
Latest Technology of CPU Smaller chip die Parallel processing of multiple cores Better pipelining technology Take full advantage of the newly developed high speed
Double-Data-Rate 3 (DDR3) SDRAM Shortened the speed gap between the CPU and main
memory
AMD Phenom Quad-Core Processor Die
Intel 45nm quad-core processor and its chip die
11.6 Latest Development of CPU and Main Memory
Latest Technology of Main Memory The new standard of main memory module is known as
Double-Data-Rate 3 (DDR3) SDRAM. DDR3 operates at a lower voltage level but higher
frequency than its predecessor Popular in high-end computer market and notebook
computers
DDR3 memory modules
11.6 Latest Development of CPU and Main Memory
Latest Technology of Main Memory The new standard of main memory module is known as
Double-Data-Rate 3 (DDR3) SDRAM. DDR3 operates at a lower voltage level but higher
frequency than its predecessor Popular in high-end computer market and notebook
computers
DDR3 memory modules