A concrete explanation of how a cache works
parksb.github.io
A concrete explanation of how a cache works
1–6 of 6 posts
Re: A concrete explanation of how a cache works
#2Wikipedia has it better and more comprehensive - https://en.wikipedia.org/wiki/CPU_cache
For usage of caches from a OS, particularly in the context of multicores/multiprocessors see Curt Schimmel's classic Unix Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers.
Re: A concrete explanation of how a cache works
#3Meh... Wikipedia has it better and more comprehensive - https://en.wikipedia.org/wiki/CPU_cache For usage of caches from a OS, particularly in the context of multicores/multiprocessors see Curt Schimmel's classic Unix Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers.
Re: A concrete explanation of how a cache works
#4Meh... Wikipedia has it better and more comprehensive - https://en.wikipedia.org/wiki/CPU_cache For usage of caches from a OS, particularly in the context of multicores/multiprocessors see Curt Schimmel's classic Unix Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers.
If it's not too much trouble, could you recommend some other books as well? I've only read Computer Systems: A Programmer's Perspective when it comes to caching-related books.
To that end;
1) Buy/Beg/Borrow/Steal the Curt Schimmel book mentioned above. That one book will teach you all about how OSes manage caches/memory for SMP multiprocessing systems. You really get to understand multiprocessing at a fundamental level.
2) Memory Systems: Cache, DRAM, Disk by Bruce Jacob et al. - Old classic and a comprehensive book on all aspects of memory systems. Supplement with papers on newer technologies as needed.
3) Ulrich Drepper's classic What every Programmer should know about Memory - https://news.ycombinator.com/item?id=36420502
4) Cache-Oblivious Algorithm - https://en.wikipedia.org/wiki/Cache-oblivious_algorithm See in particular, Harald Prokop's thesis on the above linked to under "References" section.
5) Cache-aware Programming pattern from the book Game Programming Patterns - https://gameprogrammingpatterns.com/data-locality.html
6) There are lots more resources on cache-aware programming and using compiler builtins to help you do it. Here is a list of tips - https://johnnysswlab.com/make-your-programs-run-faster-by-be... This website has a lot of info. on all aspects of memory optimization.
7) AoS and SoA - https://en.wikipedia.org/wiki/AoS_and_SoA
Re: A concrete explanation of how a cache works
#5Earlier quoted context omitted.
If it's not too much trouble, could you recommend some other books as well? I've only read Computer Systems: A Programmer's Perspective when it comes to caching-related books.
Caches and Memory Systems have to be looked at from three related perspectives viz. a) Hardware/SoC/Physical level b) OS/Compiler system software level c) Applications usage level. To that end; 1) Buy/Beg/Borrow/Steal the Curt Schimmel book mentioned above. That one book will teach you all about how OSes manage caches/memory for SMP multiprocessing systems. You really get to understand multiprocessing at a fundamenta…
Re: A concrete explanation of how a cache works
#6Earlier quoted context omitted.
Caches and Memory Systems have to be looked at from three related perspectives viz. a) Hardware/SoC/Physical level b) OS/Compiler system software level c) Applications usage level. To that end; 1) Buy/Beg/Borrow/Steal the Curt Schimmel book mentioned above. That one book will teach you all about how OSes manage caches/memory for SMP multiprocessing systems. You really get to understand multiprocessing at a fundamenta…
Thank you always for the great book recommendations. The books you've suggested are deep and interesting. I've read book no.5 from your recommendations, and I'm planning to read book no.2 next. Have a nice day.