I am studying OS and we are discussing page coloring. I have found Jochen Liedtke's paper Colorable Memory (1996) and have viewed the wiki article on cache coloring: https://en.wikipedia.org/wiki/Cache_coloring so I will try to describe my understanding with a cache that is physically tagged.
We want to maximize the number of virtual pages cached by the processor. So we map virtual to physical memory in such a way that virtually adjacent memory blocks have colors in physical memory that are adjacent.
What I don't understand about this is that frequently, cache line sizes are much smaller than page sizes. So, if we are sequentially accessing data in the same block then we are continually overwriting the same cache line.
I feel that my understanding of page coloring is incomplete
How exactly does page coloring (cache coloring) work?
-
- Member
- Posts: 5501
- Joined: Mon Mar 25, 2013 7:01 pm
Re: How exactly does page coloring (cache coloring) work?
I think your understanding of caches is incomplete. Cache lines map adjacent physical memory, so if you're sequentially accessing data in one page, you're accessing many sequentially adjacent cache lines, not one cache line over and over.