Subject: RE: NetBSD is not Linux
To: None <wojtek@wojtek.3miasto.net>
From: ali \(Anders Lindgren\) <dat94ali@ludat.lth.se>
List: netbsd-users
Date: 06/12/2001 12:41:51
On Tue, 12 Jun 2001 wojtek@wojtek.3miasto.net 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) dat94ali@ludat.lth.se - http://www.ludat.lth.se/~dat94ali
(home) ali@h543.sparta.lu.se - http://h543.sparta.lu.se/
* A4000/040-40/CV3D/Ariadne·AmigaOS·NetBSD·A3000/040-25/Ariadne *