Final Practice Problems
You’ll be given the following handout for the final exam.

Ch 4: Processor Architecture
- Given a Y86-64 program, assemble the program to Y86-64 object code
- Given Y86-64 object code, disassemble the object code to the Y86-64 assembly program
- Write simple Y86-64 functions
- Write simple HCL expressions
- Be able to describe what happens in each stage for a given Y86-64 instruction
- Understand how pipelining speeds up processing and the limitations of pipelining
- Understand all five stages of a pipelined processor
- Be able to read a pipeline timing diagram
- Data, control, and load/use pipeline hazards
- Avoiding data hazards by forwarding
- Exception handling
Practice Problems:
- 4.1 (p360)
- 4.2 (p360)
- 4.9 (p374)
- 4.12 (p380)
- 4.13 (p387)
- 4.14 (p390)
- 4.18 (p394)
- 4.19 (p406)
- 4.28 (p417)
- 4.31 (p449)
- 4.44 (p468) Note: The solution in the book is wrong. See http://csapp.cs.cmu.edu/3e/errata.html for details.
Ch 5: Optimizing Program Performance
- Understand the following terms:
- Memory Aliasing
- Code Motion
- Be able to loop unroll a function (in either C or Assembly)
Ch 6: The memory Hierarchy
- The differences between SRAM and DRAM
- The principle of locality and what is the difference between temporal and spatial locality
- The role of caches in the memory hierarchy
- The three types of cache misses: cold (compulsory), conflict, and capacity misses
- The LRU line replacement algorithm
- For a given cache, perform a cache lookup
- Cache terminology: Lines, Sets, Blocks, Tags, and the Valid bit
- The Differences between a fully associative, n-way set associative, and direct-mapped cache
- The difference between write-back and write-through caches
Practice Problems:
- 6.7 (p608)
- 6.8 (p609)
- 6.9 (p616)
- 6.12 (p628)
- 6.13 (p628)
- 6.14 (p629)
- 6.15 (p629)
- 6.16 (p630)