Subject: RE: NetBSD is not Linux
To: None <>
From: ali \(Anders Lindgren\) <>
List: netbsd-users
Date: 06/12/2001 12:41:51
On Tue, 12 Jun 2001 wrote:

[Why process threads are slow]

> because context switching takes time, especially in linux with lots of
> processes.

With LWPs, you preemptively trap into kernel and switch LWPs. Since
neither method incur a user address-space switch, the kernel overhead
ought to be roughly the same?

I understand completely the difference between userland threads
implementations and kernel implementations; the question is why it is
"known to be inefficient" (as is said around here every time the issue of
kernel threads appear) to switch a struct proc instead of a struct lwp
when both will incur the kernel overhead of preemption and neither will
change the user address-space.

However, I will look into Brian's pointer on the issue -- should be
interesting reading -- and see if there are any answers there.

/ali: Computer Science Major and aspiring cartoonist. :-) 
(dept) -
(home) -
* A4000/040-40/CV3D/Ariadne·AmigaOS·NetBSD·A3000/040-25/Ariadne *