x86 TSS 对于硬件多任务处理非常慢,与软件任务切换相比几乎没有任何好处。(事实上,我认为手动操作会击败 TSS 很多次)
TSS 也以使用起来烦人且乏味而著称,而且它不可移植,即使对于 x86-64 也是如此。Linux 旨在处理多种架构,因此他们可能选择使用软件任务切换,因为它可以以独立于机器的方式编写。此外,软件任务切换提供了比 TSS 更强大的功能,并且通常比 TSS 更容易设置。
我相信 Windows 3.1 使用了 TSS,但至少 NT >5 内核没有。我不知道任何使用 TSS 的类 Unix 操作系统。
Do note that the TSS is mandatory. The thing that OSs do though is create a single TSS entry(per processor) and everytime they need to switch tasks, they just change out this single TSS. And also the only fields used in the TSS by software task switching is ESP0
and SS0
. This is used to get to ring 0 from ring 3 code for interrupts. Without a TSS, there would be no known Ring 0 stack which would of course lead to a GPF and eventually triple fault.