Can someone say why is using the TSS still mandatory with software-based task switching? Is this a requirement imposed by x86?<p>In looking at the OS dev wiki I see the following:<p>>"The TSS is primarily suited for hardware multitasking, where each individual process has its own TSS. In Software multitasking, one or two TSS's are also generally used, as they allow for entering Ring 0 code after an interrupt."<p>Would you not be able to enter Ring0 after an interrupt with a TSS entry? Is this why it is still required?
I recall reading a paper comparing Linux and Solaris context switch times in ~98 and Linux was 10-100X faster. Solaris did something incredibly slow and safe.
Enjoyed this article, anybody know the significance of adding the do..while(0) loop within the macro starting Linux 1.3?<p>Was curious if it guards against some C pre-processor issues.<p><pre><code> /** include/asm-i386/system.h */
#define switch_to(tsk) do {
[...]
} while (0)</code></pre>
An addition to "Linux 2.2 (1999)" is: introduced meltdown vulnerability. That was the then-unknown cost of software context switching.<p>Later, with Red Hat's 4g4g kernels that Linus rejected, the problem would go away for people who installed Red Hat's version of the OS on systems with many gigabytes of memory.
I really like how good the article looks when printed. I enjoy reading long, in-depth articles much more when I can read them in print. Unfortunately many blog posts need a lot of tweaking until I can get an acceptable print result. This one looks good enough without any trickery.<p>Thanks to the author, for caring about the paper people. : )