Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Can I use namespace System.Runtime.Caching in order to modify the properties and values of CPU Cache L1, L2 and L3?

msdn.microsoft.com told me the namespace allows create new cache storage in windows like a virtual RAM.

But, i wanna program with Cache which is included by CPU. Can you tell me how to do that?

Thanks for solutions!
Posted
Updated 5-Sep-14 1:50am
v3

No, you can't.
L1, L2, L3 caches are typically inside the processor silicon in multicore processors: "normal" memory (which is what the System.Runtime.Caching namespace is concerned with) is external to the processor and is not a part of L1, L2, or L3 caches.

http://en.wikipedia.org/wiki/CPU_cache#Multi-level_caches[^]
 
Share this answer
 
What???
Do you know what CPU cache is? I doubt. At least read wikipedia: http://en.wikipedia.org/wiki/CPU_cache[^]

It would be a disaster if one could modify those cache values. CPU cache and runtime cache is totally different things, on totally different level of functionality regarding running code. The first one is on the lowest, whilst the other one is on the highest edge of this structure.

You can't directly influence the behavior of the CPU processing pipeline - where CPU caches work. You can, however optimize - but less in .net :(

Some lecture: http://onward-conference.org/2011/images/Pueschel_2011_AutomaticPerformanceProgramming_Onward11.pdf[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900