本文介绍了操作系统如何努力最小化TLB刷新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否在操作系统中实现了一种通用的机制,例如通过将同一进程中的线程分组到待调度"列表中来最小化TLB刷新.

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.

我认为这是决定对线程使用进程之间的重要因素.如果OS不在乎下一个线程是否在同一进程空间中,则最小化TLB刷新"线程的所谓优势可能会被高估.是这样吗?

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.

推荐答案

CPU设计似乎是逐渐发展为对标记的TLB条目的硬件支持.这消除了冲洗TLB的需要.因此,即使假设TLB冲洗对于当今的处理器来说是一个问题,但在几年后它可能不再适用.我不会在此基础上做出任何设计决定.

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.

这篇关于操作系统如何努力最小化TLB刷新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 02:23