Can anyone tell how software context switching is performed without using TSS?
Is it really faster than harware switching?
I also need info on I/O protection and page fault handling.
Thanks
Software context switching
Re:Software context switching
You manually store and restore the registers and stuff the TSS holds.Can anyone tell how software context switching is performed without using TSS?
Depends, but usually yes. The TSS holds a lot of information -- frequently more than you need. And your scheduler is normally invoked via some interrupt, so your ISR has already stored some of the stuff you need to store during a task switch. So to do a software task switch, you only need to store and restore what hasn't already been stored by the ISR entry routine. You can usually do this pretty quick. Your ISR would have to be pretty thin, and your save/restore requirements pretty great, for you to have to do so much work that it would take you longer than using a hardware task switch (which will store the entire state, including redundantly storing things you already stored).Is it really faster than harware switching?
Did you check the Intel docs (vol. 3)?I also need info on I/O protection and page fault handling.