Author | Message | Time |
---|---|---|
Skywing | What operating systems really make use of x86 hardware taskswitching? Apparently Win32 and Linux (2.4+ according to Kp) both use software-based task management for the most part (differences between kernel mode and user mode excepted). Thus, I'm considering things like implementing processes or threads using hardware taskswitching as "really making use" of it. | April 10, 2003, 3:52 AM |
Yoni | What about the multi-processor version of the NT kernel? | April 10, 2003, 11:40 AM |
Skywing | [quote author=Yoni link=board=7;threadid=1002;start=0#msg7454 date=1049974823] What about the multi-processor version of the NT kernel? [/quote]Good question. I don't have a multiprocessor system to check with, though. | April 10, 2003, 12:36 PM |
Adron | From process.c in linux 2.4.18: [code] /* * switch_to(x,yn) should switch tasks from x to y. * * We fsave/fwait so that an exception goes off at the right time * (as a call from the fsave or fwait in effect) rather than to * the wrong process. Lazy FP saving no longer makes any sense * with modern CPU's, and this simplifies a lot of things (SMP * and UP become the same). * * NOTE! We used to use the x86 hardware context switching. The * reason for not using it any more becomes apparent when you * try to recover gracefully from saved state that is no longer * valid (stale segment register values in particular). With the * hardware task-switch, there is no way to fix up bad state in * a reasonable manner. * * The fact that Intel documents the hardware task-switching to * be slow is a fairly red herring - this code is not noticeably * faster. However, there _is_ some room for improvement here, * so the performance issues may eventually be a valid point. * More important, however, is the fact that this allows us much * more flexibility. */ [/code] | April 11, 2003, 7:52 PM |