



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




CMSC 212 โ F05 (lect 22)^1
CMSC 212 โ F05 (lect 22)^2
CMSC 212 โ F05 (lect 22)^3
Address
Instruction
Operations
Branching Results & Register Updates
CMSC 212 โ F05 (lect 22)^4
Operations
Integer/ Branch
General Integer
add
FP Load (^) Store mult/div
Operations Results
& Data Address
CMSC 212 โ F05 (lect 22)^7
Time 1 2 3 4 5 6 7 add R2 R3 R2 IF ID X M WB add R2 R4 R2 IF stall stall stall ID X
int sum = 0, arr[], i;
for (i = 0; i < 100; i++) { sum += arr[i]; }
CMSC 212 โ F05 (lect 22)^8
l Dependences hurt pipeline performance,
Time 1 2 3 4 5 6 7 add R2 R6 R2 IF ID X M WB add R3 R7 R3 IF ID X M WB add R4 R8 R4 IF ID X M WB bra IF ID X M add R2 R9 R2 IF ID X add R3 R10 R3 IF ID
int sum = 0, arr[], i;
for (i = 0; i < 100; i+=3) { suma += arr[i]; sumb += arr[i+1]; sumc += arr[i+2]; } sum = suma + sumb + sumc
no stall!
assume everything in registers
CMSC 212 โ F05 (lect 22)^9
for (i = 0; i < โฆ; i++) { arr[i] += a + b + c
CMSC 212 โ F05 (lect 22)^10
CMSC 212 โ F05 (lect 22)^13
Registers On-chip L cache (SRAM)
Main memory (DRAM)
Local secondary storage (local disks)
Larger, slower, and cheaper (per byte) storage devices Remote secondary storage (distributed file systems, Web servers)
Local disks hold files retrieved from disks on remote network servers.
Main memory holds disk blocks retrieved from local disks.
Off-chip L cache (SRAM)
L1 cache holds cache lines retrieved from the L2 cache.
CPU registers hold words retrieved from cache memory.
L2 cache holds cache lines retrieved from memory.
Smaller, faster, and costlier (per byte) storage devices