Cache Coloring - Details of Operations

Details of Operations

A physically indexed CPU cache is designed such that addresses in adjacent physical memory blocks take different positions ("cache lines") in the cache, but this is not the case when it comes to virtual memory; when virtually adjacent but not physically adjacent memory blocks are allocated, they could potentially both take the same position in the cache. Coloring is a technique implemented in memory management software, which solves this problem by selecting pages that do not contend with neighbor pages.

Physical memory pages are "colored" so that pages with different "colors" have different positions in CPU cache memory. When allocating sequential pages in virtual memory for processes, the kernel collects pages with different "colors" and map them to the virtual memory. In this way, sequential pages in virtual memory do not contend for the same cache line.

Read more about this topic:  Cache Coloring

Famous quotes containing the words details of, details and/or operations:

    Then he told the news media
    the strange details of his death
    and they hammered him up in the marketplace
    and sold him and sold him and sold him.
    My death the same.
    Anne Sexton (1928–1974)

    Then he told the news media
    the strange details of his death
    and they hammered him up in the marketplace
    and sold him and sold him and sold him.
    My death the same.
    Anne Sexton (1928–1974)

    Plot, rules, nor even poetry, are not half so great beauties in tragedy or comedy as a just imitation of nature, of character, of the passions and their operations in diversified situations.
    Horace Walpole (1717–1797)