Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>How can i know my array is in cache?</p> </blockquote> <p>In general, you can't. Generally speaking, the cache is managed directly by hardware, not by Windows. You also can't control whether data resides in the cache (although it is possible to specify that an area of memory <em>shouldn't</em> be cached).</p> <blockquote> <p>Does windows use some of it while program is running? Maybe i am not able to use L1 because windows is making other programs work? Should i set priority of my program to use all cache?</p> </blockquote> <p>The L1 and L2 caches are shared by all processes running on a given core. When your process is running, it will use all of cache (if it needs it). When there's a context switch, some or all of the cache will be evicted, depending on what the second process needs. So next time there's a context switch back to your process, the cache may have to be refilled all over again.</p> <p>But again, this is all done automatically by the hardware.</p> <blockquote> <p>also functions are kept in cache?</p> </blockquote> <p>On most modern processors, there is a separate cache for instructions. See e.g. <a href="http://en.wikipedia.org/wiki/File%3aIntel_Nehalem_arch.svg">this diagram</a> which shows the arrangement for the Intel Nehalem architecture; note the shared L2 and L3 caches, but the separate L1 caches for instructions and data.</p> <blockquote> <p>cache is read only?(if i change my array then it loses the cache bond?)</p> </blockquote> <p>No. Caches can handle modified data, although this is considerably more complex (because of <a href="http://en.wikipedia.org/wiki/Coherence_protocol">the problem of synchronising multiple caches in a multi-core system</a>.)</p> <blockquote> <p>does the compiler create the asm codes to use cache more yield?</p> </blockquote> <p>As cache activity is generally all handled automatically by the hardware, no special instructions are needed.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload