+ All Categories
Home > Documents > Lecture on Central Process Unit (CPU)

Lecture on Central Process Unit (CPU)

Date post: 06-Jan-2018
Category:
Upload: lora-dickerson
View: 218 times
Download: 0 times
Share this document with a friend
Description:
Central Processing Unit Brain of any “processing” device What are the processing devices? Computers, cell phones, game consoles, TVs, refrigerators, … just about any electronics CPU is a conceptually simple, but a highly complex circuitry that responds to executable inputs (i.e., program instructions).
22
Lecture on Central Process Unit (CPU)
Transcript
Page 1: Lecture on Central Process Unit (CPU)

Lecture on Central Process Unit (CPU)

Page 2: Lecture on Central Process Unit (CPU)

Central Processing Unit

• Brain of any “processing” device• What are the processing devices?

– Computers, cell phones, game consoles, TVs, refrigerators, … just about any electronics

• CPU is a conceptually simple, but a highly complex circuitry that responds to executable inputs (i.e., program instructions).

Page 3: Lecture on Central Process Unit (CPU)
Page 4: Lecture on Central Process Unit (CPU)

Intel Pentium 4 CPU

Page 5: Lecture on Central Process Unit (CPU)

Main Components of CPU• Control unit: Directs all program instructions. It does

not actually execute instructions, but makes other parts to do so.

• Arithmetic logic unit: It executes all arithmetic and logical operations. Commonly known as ALU.

• Registers: Small memory blocks (a few kilo bytes) inside CPU to store intermediate computation results or addresses during processing

• Caches: Larger memory blocks (a few mega bytes) inside CPU to store data during processing

Page 6: Lecture on Central Process Unit (CPU)

How Does Computer Work?• Application software is written in a human

readable form, normally stored in hard disk.

• To run application software, OS retrieves it first from hard disk, and translates it to a machine readable form. Then, OS instructs CPU how to run it.

• CPU interfaces with rest of computing hardware and together executes the machine readable code from OS.

• Computing hardware is controlled by CPU.

Application Software(Outlook, Safari, iTune)

Operating System(Windows, MacOS)

CPU(Intel, AMD)

Computing Hardware(Dell, IBM, Apple)

Page 7: Lecture on Central Process Unit (CPU)

Computing Hardware

• CPU: Main controller• Memory: All instructions and data are entered into CPU through

memory• Input device: Keyboard, mouse, touch screen, etc.• Output device: Display terminal, printer, speaker etc.• Hard disk: Mass storage for all data, program, and information

MEMORY

INPUTDEVICE

OUTPUTDEVICE

HARD DISK

CPU

MOTHERBOARD

Page 8: Lecture on Central Process Unit (CPU)

Mother of All Boards = “Motherboard”CPU

Page 9: Lecture on Central Process Unit (CPU)

Addressing

• In computer, all storage devices (memories and hard disk) are given unique addresses.

• Main memory is fast and can interact with CPU directly. But its size is limited (a few giga bytes) and cannot store all of the data or programs.

• Data or program is loaded into main memory when needed by CPU. Otherwise, it is stored in hard disk. This process is called “swapping.”

Page 10: Lecture on Central Process Unit (CPU)

What Happens When You Turn on Computer?• When you turn on the computer, the hardware starts.

• With the power on, the CPU starts executing instruction at certain memory location. This is the “BIOS.”

• The BIOS contains the start-up programs such as device detection, initialize background programs (demons), and the start of OS.

• Critical part of OS (i.e., part needed by all programs) is permanently loaded into the main memory. This part is called the kernel.

• Now the computer is ready to accept any command that the user enters.

Page 11: Lecture on Central Process Unit (CPU)

Scheduling Queues• Scheduling queues is a main functions of OS.• Job queue: Set of all processes• Ready queue: Set of all processes residing in main

memory, ready and waiting to execute• Device queue: Set of processes waiting for I/O

device

Page 12: Lecture on Central Process Unit (CPU)

Interactions with Memory

CPU Memory

Write Line

Read Line

Data Lines

Address Lines

Page 13: Lecture on Central Process Unit (CPU)

CPU Execution CycleInstructionFetch

InstructionDecode

OperandFetch

Execute

ResultStore

NextInstruction

Obtain instruction from program storage

Determine required actions and instruction size

Locate and obtain operand data

Compute result value or status

Deposit results in storage for later use

Determine successor instruction; can generally be combined w/ Decode

Page 14: Lecture on Central Process Unit (CPU)

Thread• Thread: Schedulable stream of controls

– Defined by CPU– Suspend: Save register values in memory– Resume: Restore registers from memory

• Multiple threads can execute independently– They can run in parallel on multiple CPUs...– Or interleaved on a single CPU– Each thread must have its own control stack.

Page 15: Lecture on Central Process Unit (CPU)

Single and Multithreaded Processes

Page 16: Lecture on Central Process Unit (CPU)

Two Threads Sharing a CPU

reality

concept

context switch

Page 17: Lecture on Central Process Unit (CPU)

Speed• How fast the CPU can execute instructions• Limited by many factors

– Speed of electronic circuits in CPU– Speed of memory access– Speed of hard disk– Efficiency of OS– Efficiency of application software

Page 18: Lecture on Central Process Unit (CPU)

Processor Speed

Year

Perfo

rman

ce

0

50

100

150

200

250

300

1982

1983

1984

1985

1986

1987

1988

1989

1990

1991

1992

1993

1994

1995

RISC

Intel x86

35%/yr

Page 19: Lecture on Central Process Unit (CPU)

CPU

slower I/O devices

high speed

Page 20: Lecture on Central Process Unit (CPU)

PCI Bus• Peripheral Connection Interface• South Bridge architecture

– 66 MHz, 64-bit, 512 MB/second– Shared bus with arbitration

Page 21: Lecture on Central Process Unit (CPU)

PCI Express• North Bridge architecture• Switched, point-to-point

connection • Data rate up to 4 GB/second

Page 22: Lecture on Central Process Unit (CPU)

Recommended