How much time spend a task switch?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pepito

How much time spend a task switch?

Post by pepito »

How much time spend a i386+ CPU to save the state of a task (in its TSS), load the state of another task (from its TSS) and initiate it?

Thank you,

pepito
Xerroz

RE:How much time spend a task switch?

Post by Xerroz »

only a few clocks....meaning nothing you would/should notice
carbonBased

RE:How much time spend a task switch?

Post by carbonBased »

A few _hundred_ clocks.

Yes, it's basically inperceivable by any human by itself, but as it's being called (potentially) many thousands of times per second, it's certainly an area where it makes sense to optimize and, quite literally, count every clock cycle.

It's the difference between clunky windows-style multitasking, and fluent linux-style multitasking ;)  (that coupled with any other things, of course, but the point is, the efficiency of your tasking code _can_ be perceived).

Cheers,
Jeff
VoidLogic

RE:How much time spend a task switch?

Post by VoidLogic »

I have also got the inverse feeling about windows and linux multitasking, I have RedHat 9 and Windows XP on this machine.
pepito

RE:How much time spend a task switch?

Post by pepito »

Thank you!
Post Reply