Top 10 Interview Questions for Embedded Hardware Engineers - Memory Systems

Physical, Virtual, Cache Memory

BitMan
1. Name some types of advanced pipeline architectures?

R:

Superpipelining, Superscalar, Dynamic Pipeline

2. Define the aspects of locality in memory access.

Temporal locality R: Tendency to reference locations recently referenced

Spatial locality R: Tendency to reference locations "near" those recently referenced

3. Define the sources for these 2 locality types defined above.

Temporal locality R: Instruction fetch (loops), Locals (loops, repeated invocations), Data Structures

Spatial locality R: Instruction sequence, Indexing Arrays, Locals in a stack frame, Contiguous allocation

4. Describe the idea of cache memory:

R:

Processor accesses "Memory hierarchy" -> Accesses first check small, fast "cache" -> If "miss" in cache, retrieve data from main memory -> Cache exploits locality to provide high performance.

5. Define some benefits and limitations of cache memory:

R:

Performance depends on application structure, amount of locality present.

Effectively reduce the average access time.

Don't work well if there is no locality (pathological access patterns).

A probabilistic way to improve performance.

6. Define the following cache fundamentals terms:

cache hit R: an access where the data is found in the cache.

cache miss R: an access which isn't

hit time R: time to access the cache

miss penalty R: time to move data from further level to closer, then to cpu

hit ratio R: percentage of time the data is found in the cache

miss ratio R: (1 - hit ratio)

7. How do you compute the size of an associative cache memory?

R:

Cache size = Number of sets * block size * associativity

8. Explain the following policy cache.

write-through R: all writes go to both cache and main memory

write-back R: writes go only to cache. Modified cache lines are written back to memory when the line is replaced.

write-allocate R: on a store miss, bring written line into the cache

write-around R: on a store miss, ignore cache

9. Explain the following terms regarding cache memory miss.

Compulsory (or cold-start) misses R: first access to the data.

Capacity misses R: we missed only because the cache isn't big enough.

Conflict misses R: we missed because the data maps to the same line as other data that forced it out of the cache.

10. Define the term "Virtual memory

R:

Virtual memory is the name of the technique that allows us to view main memory as a cache of a larger memory space (on disk). Is just a mapping function from virtual memory addresses to physical memory locations, which allows cacheing of virtual pages in physical memory.

Published by BitMan

View profile

To comment, please sign in to your Yahoo! account, or sign up for a new account.