[an error occurred while processing this directive]
School of Computer Science & Engineering
University of New South Wales
Advanced Operating Systems
COMP9242 2002/S2
Next: Fully Virtual Caches
Up: 03-cache
Previous: Cache types
Subsections
- Same VA corresponds to several PAs
- standard situation in multitasking systems (not SASOS!)
- Problem: tag may not uniquely identify cache data!
- Homonyms lead to cache accessing the wrong data!
- Homonym prevention:
- tag virtual address with address-space ID (ASID)
- disambiguates virtual addresses (makes them globally valid)
- use physical tags
- flush cache on context switch
- use a SASOS
- Several VAs map to the same PA
- frames shared between processes
- multiple mappings of a frame within an address space
- Synonyms in cache may lead to accessing stale data:
- same data may be cached in several lines
- on write, one synonym is update
- a subsequent read on the other synonym returns the old value
- Physical tagging doesn't help!
- ASIDs don't help either!
- Whether synonyms are a problem depends on cache size and page size!
- Virtually-indexed, physically tagged on-chip L1 cache
- 16kB cache with 32B lines
- 4kB (base) page size
- Remember, location of data in cache determined by index
- Tag only confirms whether it's a hit!
- Synonym problem iff VA
VA
- Avoiding synonym problems:
- hardware synonym detection
- flush cache on context switch
- doesn't help for aliasing within address space
- detect synonyms and ensure
- all read-only, OR
- only one synonym mapped
- restrict VM mapping so synonyms map to same cache set
- e.g., R4x00: ensure that VA
PA
Next: Fully Virtual Caches
Up: 03-cache
Previous: Cache types
Gernot Heiser
2002-08-15
[an error occurred while processing this directive]