CS4431 (Computer Architecture) Exam 2

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/34

flashcard set

Earn XP

Description and Tags

Covers Branch Prediction, Measurement (Amdahl's Law, processor performance equation), Dynamic Pipelines (Tomasulo's Algorithm), Hardware Based Speculation, Memory Hierarchy, Cache (Tag, Index, Block offset, Hit time, Miss time, Miss penalty), Temporal Locality, Spatial Locality

Last updated 1:12 AM on 3/26/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

35 Terms

1
New cards

Amdahl’s Law for finding New Execution Time

ExTime old * [(1-Fractionenhanced)+(Fraction enhanced / Speedup enhanced)]

2
New cards

Amdahl’s Law for finding Speedup Overall

ExTimeold / ExTimenew = 1 / [(1-Fractionenhanced) + (Fractionenhanced/ Speedupenhanced)]

3
New cards

Best you can get from Amdahl’s law

Speedupmaximum = 1 / (1 - Fractionenhanced)

4
New cards

Processor Performance Equation

CPU time = seconds / program = [(instructions / program) (cycles / instruction) * (seconds / cycle)]

5
New cards

Measuring performance

1 / execution time

6
New cards

Finding the enhanced time with Amdahl’s Law

Te = T0(1-Fe) + (T0Fe /Se)

7
New cards

Arithmetic Mean (usual mean)

(x1 + x2 + … + xn) / n

8
New cards

Harmonic Mean

n / (1/x1 + 1/x2 + … + 1/xn)

9
New cards

Geometric Mean

nthroot(X1 x X2 x… x Xn)

10
New cards

Dynamic Scheduling

hardware rearranges instruction execution to reduce stalls (maintains data flow and exception behavior)

  • creates WAR and WAW hazards

11
New cards

Hardware Speculation

built on dynamic scheduling, offers more performance advantages

makes predictions - allowing processor to continue past branch

12
New cards

Tomasulo’s Algorithm

Uses reservation stations to accomplish dynamic scheduling. When an operands value is unknown, the instruction waits until the value is produced and sent out on the common data bus(CDB). Uses register renaming to avoid WAR and WAW hazards

  • three reservation stations for addition

  • two reservation stations for multiplication

Can overlap loops because of register renaming

13
New cards

Reservation Station Components

Op: operation to perform on unit

Vj, Vk: Value of source operands

Qj, Qk: Reservation stations producing the value that goes in a source register

  • if == 0, the value is ready

Busy: indicates this reservation station or FU(functional unit) is busy

Register result status: indicates which FU will write each register

14
New cards

Stages of Tomaulo’s Algorithm

Issue - get instruction from queue, if reservation station free, issue instruction

Execution - operate on the operands

Write Result - write on Common Data Bus to all waiting units and mark station as not busy

15
New cards

Reorder Buffer (ROB)

  • Array with head and tail pointer where speculative instructions are kept

  • When the instruction at the head is completed it becomes non speculative

  • If a prediction was wrong, the tail is moved to the head, ‘erasing’ the bad instructions

  • fields are instruction, destination and value

16
New cards

Map Table

Used for renaming registers

17
New cards

Temporal Locality

If an item is referenced, it will tend to be referenced again soon (loops, reuse)

18
New cards

Spatial Locality

If an item is referenced, items whose addresses are close by tend to be referenced soon (arrays)

19
New cards

Fully Associative Cache

Blocks can go anywhere

Size of index is 0

20
New cards

Direct Mapped Cache

Must go into one specific block (usually calculated by modulo)

Index is large

21
New cards

Set Associative Cache

Block can go in a space within a set (set calculated by modulo)

Typically 2, 4 or 8 way

Reduces conflict misses

22
New cards

Write Strategy: Write Through

on write cache and lower level updated

23
New cards

Write Strategy: Write Back

on write only cache updated

when block is replaced → write to lower level

has a bit marking dirty(written)/not

24
New cards

Block to be replaced on a miss

Random Block (large associativity)

Least Recently Used (smaller associativity)

25
New cards

What happens on cache access

Index is used to select a block/set

Tag is compared to see if match

If match - data is gotten from location at the block offset

If miss - data fetched from lower levels and then retrieved from block offset

26
New cards

Compulsory Miss

First access to a block

27
New cards

Capacity Miss

Cache cannot contain all the blocks needed during execution of a program

Blocks are discarded and later retrieved again

28
New cards

Conflict Miss

In set associative/direct mapped, block can be discarded and later retrieved if too many instructions map to the same block/set

29
New cards

Victim Cache

smaller cache that holds recently discarded blocks, offers “associativity as needed”

30
New cards

Pseudo-Associativity

divide cache, on miss flip bit to check other half of cache

typically only done in 2 way, 4 way can be slow since checks are sequential and not parallel like set associative

31
New cards

Complier Optimizations to Reduce Misses

Merging Arrays

Loop Interchange

Loop Fusion

Blocking

32
New cards

Average Memory Access Time

Hit time + Miss Rate * Miss Penalty

33
New cards

Early Restart

when requested word from block arrives - send to CPU so it can continue

34
New cards

Critical Word First

Retrieves missed word first, CPU can continue, then rest of block is retrieved

35
New cards

Calculating Cache Tag, Index and Offset

Offset = # words per block

Index = n; where 2n = # lines/sets in cache

Tag = what is left

Explore top notes

note
Uranus, Neptune, Pluto, and Beyond
Updated 1168d ago
0.0(0)
note
Ch 18 - Fiscal Policy
Updated 1080d ago
0.0(0)
note
Animal Kingdom - Chordata
Updated 1231d ago
0.0(0)
note
Chem study By Mexican Guy
Updated 567d ago
0.0(0)
note
Chapter 9: Visualizing Cells
Updated 990d ago
0.0(0)
note
The globalized world
Updated 1364d ago
0.0(0)
note
Uranus, Neptune, Pluto, and Beyond
Updated 1168d ago
0.0(0)
note
Ch 18 - Fiscal Policy
Updated 1080d ago
0.0(0)
note
Animal Kingdom - Chordata
Updated 1231d ago
0.0(0)
note
Chem study By Mexican Guy
Updated 567d ago
0.0(0)
note
Chapter 9: Visualizing Cells
Updated 990d ago
0.0(0)
note
The globalized world
Updated 1364d ago
0.0(0)

Explore top flashcards

flashcards
pathology final
232
Updated 182d ago
0.0(0)
flashcards
FCW 2
36
Updated 1207d ago
0.0(0)
flashcards
Week 2 vocabulary development
107
Updated 1099d ago
0.0(0)
flashcards
Miracles
22
Updated 11d ago
0.0(0)
flashcards
pathology final
232
Updated 182d ago
0.0(0)
flashcards
FCW 2
36
Updated 1207d ago
0.0(0)
flashcards
Week 2 vocabulary development
107
Updated 1099d ago
0.0(0)
flashcards
Miracles
22
Updated 11d ago
0.0(0)