Performance of the Architecture Flashcards
What does the fundamental concept in computer architecture state
programs tend to access a small, localised portion of memory repeatedly over short periods of time
What’re the two mains types of locality
Temporal Locality (locality in time)
Spatial Locality (locality in space)
Define temporal locality
If a memory location is accessed, it is likely to be accessed again soon
Define spatial locality
if a memory location is accessed, nearby location are also likely to be accessed soon
Describe temporal locality using a real-world analogy
if you use a book frequently, you keep it on your desk rather than returning it to the shelf every time
Describe spatial locality using a real-world analogy
if you pick up a book from a shelf, you’re likely to pick other books from the same section
Give an example of temporal locality
A loop iterating over an array repeatedly accesses the same variable multiple times
Give an example of spatial locality
When accessing an element of an array, adjacent elements are often accessed next (as in sequential loops)
What is the 90-10 rule of thumb
States that programs spend 90% of their execution time in just 10% of the code
What are the key takeaways from the 90-10 rule
- Focus on optimising the critical 10% of code rather than the premature optimisation of the entire program
- recognise demising returns
- favour the common case
Define Amdahl’s Law
States that the performance improvements to be gained from using some faster mode of execution (or parallelism) is limited by the fraction of timetnat faster mode can be used
What is the speed up equation
performance for entire task using enhancement when possible
Speedup = ——————————————————————————————–
Performance for entire task without using enhancement
execution time for entire task without using enhancement Speedup = -------------------------------------------------------------------------------------------- Execution time for entire task using the enhancement when possible
Overall what two parts is speed up comprised off
1 - The fraction of computation time in the original computer that can be converted to take advantage of the enhancement
2 - The improvement gained by the enhancement execution mode, i.e., how much faster the task would run if the enchanced mode were used for the entire program (the time of the original mode over the time of the enchanted mode)
What is the overall speed up equation
execution time (new)
Example for over all speed up:
(1 - fraction(enhanced) + Fraction(enhanced)
—————————-
Speedup(enhanced)
Define block
the minimum unit of information that can either present or not present in the memory hierarchy
Define Hit rate
the fraction of memory accesses found in cache
Define miss rate
the fraction of memory accesses not found in a certain level of memory (1 - hit rate)
Define hit time
time required to access a level of memory hierarchy when it is a hit
Define miss penalty
time required to replace a clock of memory in upper level with a lock from lower level plus the time to deliver the block to processor