Software is probably going to be a better choice.
I'd say they're both pretty much as easy, so no significant difference there.
Portability is also a non-issue, non of the hardware related stuff is portable anyway.
As for speed, I'm not sure. The general opinion is that software is faster, and it probably is for many kernel designs. For instance many syscalls don't actually switch processes and don't necessarily need to save much of the context. Assuming you do all the things that a hardware task switch does, then I doubt doing it manually in software is going to be faster. But if you don't do all the things then software can be faster.
And finally, as already mentioned, long mode doesn't support it. So if you want to do long mode there's no option.
Personally I wouldn't bother with hardware tasks witching mainly due to long mode support missing and prot mode is pretty much obsolete.
|