How hard do operating systems try to minimize TLB flushes?

杀马特。学长 韩版系。学妹 提交于 2019-12-10 20:49:26

问题


I wonder if there is a common mechanism implemented in operating systems to minimize TLB flushes, by for instance grouping threads in the same process together in a "to be scheduled" list.

I think this is an important factor when deciding between using processes against threads. If OS doesn't care whether the next thread is in the same process space or not, the so called advantage of threads "minimizing TLB flushes" might be overrated. Is that the case?

Consider a system with hundreds of threads and tens of processes. If these are not optimized in a way to schedule threads in same process in tandem, our expectations on thread performance may not be that big.

I'll give examples if question isn't that clear.


回答1:


CPU designs appear to be evolving towards hardware support for tagged TLB entries. This eliminates the need to flush the TLB. So even assuming that TLB flushing is a concern for today's processors, it may not be relevant anymore in a few years. I wouldn't base any design decisions on it.



来源:https://stackoverflow.com/questions/1199805/how-hard-do-operating-systems-try-to-minimize-tlb-flushes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!