3 ms·
> It's quite a complex feature and yet I'm not sure any OS ever used it. They did. Linux used x86 hardware task switching and TR (task register) for years. S
by jlokier 3y ago
> It's quite a complex feature and yet I'm not sure any OS ever used it.
They did.
Linux used x86 hardware task switching and TR (task register) for years. See "struct tss_struct" and "switch_to" in older kernels.
Linux also allowed userspace processes to get hardware-managed access to individual I/O ports using the per-task x86 I/O port bitmap, and to local segments using the x86 LDT which were useful for running 16-bit code in a 32-bit task.
The hardware task switching was eventually changed to software task switching. By that time, software switching was faster, and it was always more versatile. This change removed the hardware-imposed limit on the number of processes and threads Linux could support.
Here's a nice article about the evolution of task switching in Linux. https://www.maizure.org/projects/evolution_x86_context_switch_linux/ https://www.maizure.org/projects/evolution_x86_context_switc...