Chapter 6 Computer Architecture

Slides:



Advertisements
Similar presentations
Computer Memory System
Advertisements

Computer Organization and Architecture
Characteristics of Computer Memory
Associative Cache Mapping A main memory block can load into any line of cache Memory address is interpreted as tag and word (or sub-address in line) Tag.
University College Cork IRELAND Hardware Concepts An understanding of computer hardware is a vital prerequisite for the study of operating systems.
Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics Organisation.
TK 2123 COMPUTER ORGANISATION & ARCHITECTURE
TECH CH03 System Buses Computer Components Computer Function
Computer Organization and Assembly language
Cache memory Direct Cache Memory Associate Cache Memory Set Associative Cache Memory.
Characteristics of Computer Memory
CH05 Internal Memory Computer Memory System Overview Semiconductor Main Memory Cache Memory Pentium II and PowerPC Cache Organizations Advanced DRAM Organization.
CS-334: Computer Architecture
Faculty of Information Technology Department of Computer Science Computer Organization and Assembly Language Chapter 4 Cache Memory.
Cache Memory. Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics Organisation.
Top Level View of Computer Function and Interconnection.
Computer Architecture Lecture 3 Cache Memory. Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics.
03-04 Cache Memory Computer Organization. Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics.
Cache Memory.
Advanced Computer Architecture Cache Memory 1. Characteristics of Memory Systems 2.
2 nd Year - 1 st Semester Asst. Lect. Mohammed Salim Computer Architecture I 1.
Computer Architecture Lecture 2 System Buses. Program Concept Hardwired systems are inflexible General purpose hardware can do different tasks, given.
EEE440 Computer Architecture
1 CACHE MEMORY 1. 2 Cache Memory ■ Small amount of fast memory, expensive memory ■ Sits between normal main memory (slower) and CPU ■ May be located on.
2007 Sept. 14SYSC 2001* - Fall SYSC2001-Ch4.ppt1 Chapter 4 Cache Memory 4.1 Memory system 4.2 Cache principles 4.3 Cache design 4.4 Examples.
CSE 241 Computer Engineering (1) هندسة الحاسبات (1) Lecture #3 Ch. 6 Memory System Design Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.
ECEG-3202 Computer Architecture and Organization Chapter 3 Top Level View of Computer Function and Interconnection.
Memory Hierarchy. Hierarchy List Registers L1 Cache L2 Cache Main memory Disk cache Disk Optical Tape.
Chapter 6: Computer Components Dr Mohamed Menacer Taibah University
Dr Mohamed Menacer College of Computer Science and Engineering, Taibah University CE-321: Computer.
Chapter 8: System Memory Dr Mohamed Menacer Taibah University
1 Chapter 5 Cache Memory Chapter Five : Cache Memory Memory Processor Input/Output.
Cache Small amount of fast memory Sits between normal main memory and CPU May be located on CPU chip or module.
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
Chapter 4 Cache Memory. Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics Organisation.
Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics Organisation.
Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics Organisation.
Cache Memory.
William Stallings Computer Organization and Architecture 7th Edition
Chapter 3 Top Level View of Computer Function and Interconnection
Cache memory Direct Cache Memory Associate Cache Memory
ECEG-3202 Computer Architecture and Organization
Chapter 6 Memory System Design
Cache Memory.
Presentation transcript:

Chapter 6 Computer Architecture

Computer Components: Top Level View

Instruction Cycle Two steps: Fetch Execute

Program Counter (PC) holds address of next instruction to fetch Fetch Cycle Program Counter (PC) holds address of next instruction to fetch Processor fetches instruction from memory location pointed to by PC Increment PC Unless told otherwise Instruction loaded into Instruction Register (IR) Processor interprets instruction and performs required actions

Execute Cycle Processor-memory Processor I/O Data processing Control data transfer between CPU and main memory Processor I/O Data transfer between CPU and I/O module Data processing Some arithmetic or logical operation on data Control Alteration of sequence of operations e.g. jump Combination of above

Example of Program Execution

Interrupts Mechanism by which other modules (e.g. I/O) may interrupt normal sequence of processing Program e.g. overflow, division by zero Timer Generated by internal processor timer Used in pre-emptive multi-tasking I/O from I/O controller Hardware failure e.g. memory parity error

Transfer of Control via Interrupts

All the units must be connected Connecting All the units must be connected Different type of connection for different type of unit Memory Input/Output CPU

Computer Modules

A communication pathway connecting two or more devices What is a Bus? A communication pathway connecting two or more devices Usually broadcast Often grouped A number of channels in one bus e.g. 32 bit data bus is 32 separate single bit channels

Width is a key determinant of performance Data Bus Carries data Remember that there is no difference between “data” and “instruction” at this level Width is a key determinant of performance 8, 16, 32, 64 bit

Identify the source or destination of data Address bus Identify the source or destination of data e.g. CPU needs to read an instruction (data) from a given location in memory Bus width determines maximum memory capacity of system e.g. 8080 has 16 bit address bus giving 64k address space

Control and timing information Control Bus Control and timing information Memory read/write signal Interrupt request Clock signals

Bus Interconnection Scheme

Physical Realization of Bus Architecture

Cache Memory

Memory Hierarchy - Diagram

Access Methods (1) Sequential Direct Start at the beginning and read through in order Access time depends on location of data and previous location e.g. tape Direct Individual blocks have unique address Access is by jumping to vicinity plus sequential search Access time depends on location and previous location e.g. disk

Access Methods (2) Random Associative Individual addresses identify locations exactly Access time is independent of location or previous access e.g. RAM Associative Data is located by a comparison with contents of a portion of the store e.g. cache

Physical Types Semiconductor RAM Magnetic Disk & Tape Optical

Hierarchy List Registers L1 Cache L2 Cache Main memory Disk Optical Tape

Cache Small amount of fast memory Sits between normal main memory and CPU May be located on CPU chip or module

Cache/Main Memory Structure

Cache operation – overview CPU requests contents of memory location Check cache for this data If present, get from cache (fast) If not present, read required block from main memory to cache Then deliver from cache to CPU Cache includes tags to identify which block of main memory is in each cache slot

Typical Cache Organization

Comparison of Cache Sizes   Comparison of Cache Sizes Processor Type Year of Introduction L1 cachea L2 cache L3 cache IBM 360/85 Mainframe 1968 16 to 32 KB — PDP-11/70 Minicomputer 1975 1 KB VAX 11/780 1978 16 KB IBM 3033 64 KB IBM 3090 1985 128 to 256 KB Intel 80486 PC 1989 8 KB Pentium 1993 8 KB/8 KB 256 to 512 KB PowerPC 601 32 KB PowerPC 620 1996 32 KB/32 KB PowerPC G4 PC/server 1999 256 KB to 1 MB 2 MB IBM S/390 G4 1997 256 KB IBM S/390 G6 8 MB Pentium 4 2000 IBM SP High-end server/ supercomputer 64 KB/32 KB CRAY MTAb Supercomputer Itanium 2001 16 KB/16 KB 96 KB 4 MB SGI Origin 2001 High-end server Itanium 2 2002 6 MB IBM POWER5 2003 1.9 MB 36 MB CRAY XD-1 2004 64 KB/64 KB 1MB   a Two values seperated by a slash refer to instruction and data caches b Both caches are instruction only; no data caches

Mapping Function Cache of 64kByte Cache block of 4 bytes i.e. cache is 16k (214) lines of 4 bytes 16MBytes main memory 24 bit address (224=16M)

Each block of main memory maps to only one cache line Direct Mapping Each block of main memory maps to only one cache line i.e. if a block is in cache, it must be in one specific place

Direct Mapping Example

Associative Mapping A main memory block can load into any line of cache Cache searching gets expensive

Associative Mapping Example

Set Associative Mapping Cache is divided into a number of sets Each set contains a number of lines A given block maps to any line in a given set e.g. Block B can be in any line of set i e.g. 2 lines per set 2 way associative mapping A given block can be in one of 2 lines in only one set

Replacement Algorithms (1) Direct mapping No choice Each block only maps to one line Replace that line

Replacement Algorithms Associative & Set Associative Least Recently used (LRU) e.g. in 2 way set associative Which of the 2 block is lru? First in first out (FIFO) replace block that has been in cache longest Least frequently used replace block which has had fewest hits Random

Write Policy Write through Write back

Write through All writes go to main memory as well as cache Multiple CPUs can monitor main memory traffic to keep local (to CPU) cache up to date Slows down writes

Updates initially made in cache only Write back Updates initially made in cache only Update bit for cache slot is set when update occurs If block is to be replaced, write to main memory only if update bit is set