[CSE]  Advanced Operating Systems 
 COMP9242 2002/S2 
UNSW

PRINTER Printer-Friendly Version
Administration               
- Notices
- Course Intro
- Consultations
# On-line Survey (closed)
- Survey Results
 
Work
- Lectures
- Milestone 0
- Project Admin
- Project Spec
- Project FAQ
- Exam
 
Documentation
- ASysT Lab
- L4 source browser
- Sulima ISA Simulator
R4x00 ISA Summary 
MIPS R4700 ReferenceMIPS R4000 User Manual 
- Network Driver
- GT64111
 
Related Info
- Aurema OS Prize
- OS Hall of Fame
 
History
- 2000
- 1999
- 1998
 
Staff
- Gernot Heiser (LiC)

 
Valid HTML 4.0!
next up previous
Next: Fully Virtual Caches Up: 03-cache Previous: Cache types

Subsections

Virtual Cache Issues


Homonyms:


  • 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

Synonyms (aliases):


  • 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!

Example: MIPS R4x00 synonyms


  • Virtually-indexed, physically tagged on-chip L1 cache
    • 16kB cache with 32B lines
    • 4kB (base) page size

r4k
  • Remember, location of data in cache determined by index
  • Tag only confirms whether it's a hit!
  • Synonym problem iff VA\(_{12} \not= \) VA\('_{12}\)

Synonyms...

  • 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\(_{12}=\) PA\(_{12}\)


next up previous
Next: Fully Virtual Caches Up: 03-cache Previous: Cache types
Gernot Heiser 2002-08-15