Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Caches

 Caches

A quick overview of how caches work, given at PyLadies Boston.

Jennifer Konikowski

November 23, 2016
Tweet

More Decks by Jennifer Konikowski

Other Decks in Technology

Transcript

  1. DIRECT MAPPED Slot Valid Block Blocks Copied 0 0 1

    0 2 0 3 0 4 0 0 5 0 6 0 7 0 8 0 Main Mem Addresses: 438 439 534 473 434 535
  2. DIRECT MAPPED Tag Slot Block Offset 4 3 8 4

    3 9 5 3 4 4 7 3 4 3 4 5 3 5 Main Mem Addresses: 438 439 534 473 434 535 First, we split the addresses:
  3. DIRECT MAPPED Slot Valid Block Blocks Copied 0 0 1

    0 2 0 3 1 4 430-439 4 0 0 5 0 6 0 7 0 8 0 Main Mem Addresses: 438 439 534 473 434 535 miss!
  4. DIRECT MAPPED Slot Valid Block Blocks Copied 0 0 1

    0 2 0 3 1 4 430-439 4 0 0 5 0 6 0 7 0 8 0 Main Mem Addresses: 438 439 534 473 434 535 miss! hit!
  5. DIRECT MAPPED Slot Valid Block Blocks Copied 0 0 1

    0 2 0 3 1 5 530-539 4 0 0 5 0 6 0 7 0 8 0 Main Mem Addresses: 438 439 534 473 434 535 miss! hit! miss!
  6. DIRECT MAPPED Slot Valid Block Blocks Copied 0 0 1

    0 2 0 3 1 5 530-539 4 0 0 5 0 6 0 7 1 4 470-479 8 0 Main Mem Addresses: 438 439 534 473 434 535 miss! hit! miss! miss!
  7. DIRECT MAPPED Slot Valid Block Blocks Copied 0 0 1

    0 2 0 3 1 4 430-439 4 0 0 5 0 6 0 7 1 4 470-479 8 0 Main Mem Addresses: 438 439 534 473 434 535 miss! hit! miss! miss! miss!
  8. DIRECT MAPPED Slot Valid Block Blocks Copied 0 0 1

    0 2 0 3 1 5 530-539 4 0 0 5 0 6 0 7 1 4 470-479 8 0 Main Mem Addresses: 438 439 534 473 434 535 miss! hit! miss! miss! miss! miss!
  9. SET ASSOCIATIVE Slot Valid Block Blocks Copied 0 0 0

    0 1 0 1 0 2 0 2 0 3 0 3 0 4 0 4 0 Main Mem Addresses: 438 439 534 403 434 535
  10. SET ASSOCIATIVE Slot Valid Block Blocks Copied 0 0 0

    0 1 0 1 0 2 0 2 0 3 1 4 430-439 3 0 4 0 4 0 Main Mem Addresses: 438 439 534 403 434 535 miss!
  11. SET ASSOCIATIVE Slot Valid Block Blocks Copied 0 0 0

    0 1 0 1 0 2 0 2 0 3 1 4 430-439 3 0 4 0 4 0 Main Mem Addresses: 438 439 534 403 434 535 miss! hit!
  12. SET ASSOCIATIVE Slot Valid Block Blocks Copied 0 0 0

    0 1 0 1 0 2 0 2 0 3 1 4 430-439 3 1 5 530-539 4 0 4 0 Main Mem Addresses: 438 439 534 403 434 535 miss! hit! miss!
  13. SET ASSOCIATIVE Slot Valid Block Blocks Copied 0 0 4

    400-409 0 0 1 0 1 0 2 0 2 0 3 1 4 430-439 3 1 5 530-539 4 0 4 0 Main Mem Addresses: 438 439 534 403 434 535 miss! hit! miss! miss!
  14. SET ASSOCIATIVE Slot Valid Block Blocks Copied 0 0 4

    400-409 0 0 1 0 1 0 2 0 2 0 3 1 4 430-439 3 1 5 530-539 4 0 4 0 Main Mem Addresses: 438 439 534 403 434 535 miss! hit! miss! miss! hit!
  15. SET ASSOCIATIVE Slot Valid Block Blocks Copied 0 0 4

    400-409 0 0 1 0 1 0 2 0 2 0 3 1 4 430-439 3 1 5 530-539 4 0 4 0 Main Mem Addresses: 438 439 534 403 434 535 miss! hit! miss! miss! hit! hit!