Re:starting first process
Posted: Wed Jun 18, 2003 1:30 am
i think it has been discussed before, but roughly, when you use hardware task switching, you can't prevent the CPU from clearing the whole page mapping cache (the so-called Translation Lookaside Buffers), which will make all further memory reference pretty long as it'll have to fetch the page directory entry and the page table entry from memory before it actually can read/write your memory location.
Considering the frequencies difference between memory references and instructions execution, this make the switch veery slower when you stay in the same process (i mean, in the same address space).
When you come to switching from one process to another, then the execution time will be roughly the same, maybe a bit faster for TSS if you have very different process (using other segments, a new LDT, other I/O bitmap infrastructure, etc.)
Another thing that remains fuzzy for me is how MMX/FPU state is preserved by software switching. Intel guyz had a special exception raised when you try to access the FPU register bank after a switch, so that you can write back the register content to the outgoing process and load the content of the ingoing process. As this is made only on FPU access attempt, it save switch time when you move into a process that uses no FPU.
How do one implement this with software switching ? manually setting TS bit ? i'm not sure you can ...
Considering the frequencies difference between memory references and instructions execution, this make the switch veery slower when you stay in the same process (i mean, in the same address space).
When you come to switching from one process to another, then the execution time will be roughly the same, maybe a bit faster for TSS if you have very different process (using other segments, a new LDT, other I/O bitmap infrastructure, etc.)
Another thing that remains fuzzy for me is how MMX/FPU state is preserved by software switching. Intel guyz had a special exception raised when you try to access the FPU register bank after a switch, so that you can write back the register content to the outgoing process and load the content of the ingoing process. As this is made only on FPU access attempt, it save switch time when you move into a process that uses no FPU.
How do one implement this with software switching ? manually setting TS bit ? i'm not sure you can ...