> > The costs depend on the particular method Pth uses for the context > > implementation, of course. But all available methods Pth uses are very > > cheap, because they are user-space only methods. Keep also in mind that > > because Pth is a non-preemtive threading implementation, the context > > switching is only performed if really required by the I/O.
> There is no reason a user-space context switch should be > any faster than a > kernel-space context switch unless the user-space context switch saves a > kernel call. Measurements under Linux (at least) bear this out. [snip] I should point out that you didn't actually say that user-space context switches are always faster than kernel context switches (which is false). What you did say is that user-space only context swithces are generally quite fast (which is true). So I'm not dsiagreeing with you. I'm just pointing out that there's usally kernel overhead associated with these user-space context switches, especially if they're associated with I/O blocking. DS ______________________________________________________________________ GNU Portable Threads (Pth) http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing List [EMAIL PROTECTED] Automated List Manager (Majordomo) [EMAIL PROTECTED]