I am doing some experiments on the replacement algorithm. How do I know what replacement algorithm is used in the L1 cache on my Linux server? And how do I set up L1 Cache to use random replacement algorithm?
It seems that the replacement strategy of the real machine cannot be modified. It can only be modified on the simulator. Thanks,everyone.
I just learned that the replacement algorithm is fixed at the hardware level and cannot be modified. Therefore, different replacement algorithms can only be simulated on the simulator.
Thanks everyone.
答案1
他们中的大多数使用plru
和tlru
。有的用random replacement algorithms
.您可以编写一些代码进行简单的测试。或者查看CPU手册。