Hi, Is the cost , in terms of CPU , when there occurs a context switch between two kernel threads is the same as when there is a context switch between two user space threads ? Is this cost the same when there is a context switch between a kernel thread and a user space thread ?
If you look at the implementation of kernel_thread() method (in i386 it's in arch/i386/kernel/process.c), you will see that it ultimately calls do_fork() ; in fact also when you create a user space process/thread by fork() or pthread_create() you also ultimately call do_fork(). There are of course some differences between kernel threads and user space threads. for example : a kernel thread does not have any need for access to memory of user space. But do these differences cause a conetxt switch between 2 kernel threads to be quicker ? Rafi G. ================================================================To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]