3 ms·
> Write instructions for forcing a read/write of memory into L1 cache Mightn't optimizing compilers create something of a "crabs in the bucket" syndrome where
by smitherfield 10y ago
> Write instructions for forcing a read/write of memory into L1 cache
Mightn't optimizing compilers create something of a "crabs in the bucket" syndrome where all the running programs are trying to hog the L1 cache?
- gravypod 10y agoThat should be handled at the OS level and the processor should provide facilities to directly store/page a program into a long term memory. The more the hardware can facilitate the lie that our program is living "forever" in ram the better. I have a feeling that we could also easily just add some memory chips into the computer board to just act as a super fast in-hardware swapfile to wait for things to be paged into memory then into disk. The L1 cache should be configurable for the entier existance of a program and I'm pretty sure we'd see a lot less paging/pagefaults then. How far away from your function is $some_global_variable? It doesn't matter if we can force the machine to always keep some_global_variable in cache. But in short, it would definetly end up being like you say: people skrewing over other people, if there weren't other facilities in place to keep it safe and fast. It's a job for someone smarter then I.