I'm reading about cache in wiki https://en.m.wikipedia.org/wiki/CPU_cache and the following phrase seems not clear.

Also, a write to a main memory location that is not yet mapped in a write-back cache may evict an already dirty location, thereby freeing that cache space for the new memory location.

There could be writes from 1) peripherals and 2) CPU cache. For 1) I do not see meaning in the phrase at all. For 2) I understand computer need to write from cache to new location which was not in cache. Then that location becomes mapped to that cache line. Again I do not see any evictions.

Do I miss Something?

Added: found other part I could not understand and could not find good place via Web search where it is explained in a clear way (tags + index, how and where memory location is stored). Please point to good detailed article.


I can answer your second part.

In the book Computer Architecture: Fundamentals and Principles of Computer Design by Dumas in 2.3.4 chapter (https://books.google.ru/books?id=TZ6VDQAAQBAJ&pg=PT89&hl=ru&source=gbs_selected_pages&cad=2#v=onepage&q&f=false) it is explained is much details and with better graphic aids (schemes). In summary from there: tags are most significant bytes, index are middle, but that is not by chance, for e.g. direct access adjustant memory blocks maybe loaded together w/out eviction because they differ by index, tag will be same and will allow to check for cache hit/miss.

Also in the book it is mentioned (not seen in wiki too) ssociative type mapping is physically organized by storing tags in special type memory - content associative memory CAM, which locates not by address, but by content. You can read more on it in wiki, where there are mentions of specific semiconductor implementations: https://en.m.wikipedia.org/wiki/Content-addressable_memory.

As for you first question, I think it maybe not perfect phrase in Wikipedia, it is written by people and that part does not have references attached to check the wording.

| improve this answer | |
  • \$\begingroup\$ Thanks! Not enough rep to update you... \$\endgroup\$ – Child Detektiv Sep 25 '19 at 15:40
  • \$\begingroup\$ @child,upvote? you can still accept it then !-) \$\endgroup\$ – Alexei Martianov Sep 26 '19 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.