1 / 11

More about Cache

Writing Data to the Cache. When executing a program, some information may need to be written into memory using either write-through or write-back. Write-through: Every time a value is written from CPU into a location in cache, it is also written to the

christine
Download Presentation

More about Cache

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. More about Cache Writing Data to the Cache Cache Performance Average Memory Access Time

    2. Writing Data to the Cache When executing a program, some information may need to be written into memory using either write-through or write-back. Write-through: Every time a value is written from CPU into a location in cache, it is also written to the corresponding location in physical memory Guarantees that physical memory is correct Requires additional time to write to physical memory Write-back: The value written to cache is not always written to physical memory Saves time

    3. Write-through + Write-back Example For I = 1 to 1000 x = x +1 With write-through every value of x will be written to memory While write-back only the final value will be saved into physical memory

    4. Additional Stuff Since a processor cannot take data from another processor's cache, the physical memory should have the most current value Write miss: Write miss writes data to locations not currently loaded into the cache Write-allocate policy: Loads the location into cache then writes the new value to cache using write-back or write-through Write-no allocate policy: Updates the value in physical memory without loading it into the cache.

    5. Additional Stuff Con't. Sooo write-back policy usually uses write-allocation While write-through policy usually uses write-no allocation.

    6. Average Memory Access Time

    7. Examples of Memory Access Time

    8. More Examples

    9. More Examples

    10. More Examples

    11. References

More Related