Is it possible yo use Cache as RAM?

Is it possible yo use Cache as RAM?

Hello Everyone,
I am Vivek Chand, pursuing my BE in Dr.AIT at Bangalore.
I am designing an OS for MultiCore and ManyCore chips to fully exploit it which wolud be a modification to xv6 and JOS Kernel(MIT's exokernel)
I have the ideas for implementing an deterministic and race-free Operating System.
Now, to make a bit different from the existing OS design, i want to load my microkernel into L2 cache permanently.
i.e, I want my microkernel to be bootloaded into L2 Cache rather than into main memory.
I think, It seems to be possible....but i;m not sure how to do it..
So, Can u please suggest me some ideas on implementing it....

6 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Some network adapters support a feature called Direct Cache Access (OS must support it too) which informs the CPU to store the incoming data preferably in cache to prevent possible cache misses. But I don't know if cache is usable as RAM in general. I must admit that I'm not very experienced with the exact designs of caches but isn't the cache managed by an on-chip cache controller? If so wouldn't the controller trash the information you might have written into the cache?

It is not possible to prevent the hardware to keep a copy of your OS in memory. However, it should be possible to prevent the hardware from evicting your code from cache. This can be done by assigning only pages to user space that do not map to cache lines that are occupied by your kernel code. However, you will need a descent understanding of the caching behaviour of the underlying hardware in order to make this work.
This method is similar to the technique called "page coloring" or "cache coloring". A description of page coloring can be found here.

I think it is not possible to use Cache as RAM.

http://www.printingperiod.com

Cache as RAM is possible by controlling MTRR. That is mostly done during BIOS initialization.

For more detail http://rere.qmqm.pl/~mirq/cache_as_ram_lb_09142006.pdf

Hi, It isnot possible to use your system cache memory as RAM.

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui