views:

58

answers:

2

What is the pros and cons of:
- Physical cache (between MMU and Memory)
- Logical cache (between CPU and MMU)

from a programmer's view? How to get the best of each of them?

Thanks

+1  A: 

Google gives this Link.

The article gives pros and cons of each type of caching system and states that both can be implemented at the same time. Froma programmer's point of view, anytime I need not worry about virtual addressing and associated costs, its a win, but programming for cache hit/misses is going to affect performance much more than slight latency I believe. This area is not my forte, coming from small embedded systems programming though where caching is just now starting to become relevent to what I do.

Michael Dorgan
A: 

Excellent book on the subject - UNIX® Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers, By Curt Schimmel. You'll find detailed discussion of virtually vs. physically tagged caches and what [kernel] programmers have to do about them.

Nikolai N Fetissov