r/computerscience • u/servermeta_net • Jan 28 '26
CPUs with addressable cache?
I was wondering if is there any CPUs/OSes where at least some part of the L1/L2 cache is addressable like normal memory, something like:
- Caches would be accessible with pointers like normal memory
- Load/Store operations could target either main memory, registers or a cache level (e.g.: load from RAM to L1, store from registers to L2)
- The OS would manage allocations like with memory
- The OS would manage coherency (immutable/mutable borrows, collisions, writebacks, synchronization, ...)
- Pages would be replaced by cache lines/blocks
I tried to search google but probably I'm using the wrong keywords so unrelated results show up.
27
Upvotes
View all comments
Show parent comment
7
u/servermeta_net Jan 28 '26
You're very perceptive, I'm taking a lot of inspiration from the itanium/bulldozer/UltraSPARC research body.
I don't care too much about performance for now, I'm more concerned about the formal correctness of my system, even though if some operations would reveal themselves to be extremely expensive and often needed that would be a boon for my design.
On the other hand I would argue that the C semantics are completely wrong for these kind of systems, hence why they failed, and sacrificing backward compatibility is the only way to ensure maximum performance while at the same time making this completely unmarketable.
Also compiler technology improved a lot, also thanks to novel architectures like GPGPU/accelerators. For example yesterday I was playing with finding the provably optimal scheduling / register/ memory allocation at compile time. It's an NP problem, but given the limited size of the code it's possible to use GPUs to run an optimized brute force search algorithm, taking around 2-3 hours for each million lines. The problem is solved using graph coloring algorithms.