|
|
|
|
|
by kqueue
5346 days ago
|
|
I didn't say there is no distinction. I said system calls that require disk io, or network io, or triggers locking/sleeping requires a context switch. Calls like read/write/accept triggers context switches (which starts with a mode switch). The switch is required for the kernel to execute the system calls and operate on it's own data structures. Only the kernel can alter mbufs in this case. Go read your OS book. I am not trolling. you just lack experience and this sounds new to you. |
|
I've asked around a bit and am fairly sure of my facts again, and my understanding is:
* kernel mode is cheaper than ever to reach; SYSCALL/SYSENTER etc so its not even an interrupt and there are no hardware threads or anything involved
* in kernel mode, the thread can get straight at the buffer and the locks that protect it; there is nothing that we'd call a 'context switch' in there
* being as this seems to be what is meant by monolithic kernel, surely its the same on freebsd too?