Subject: Re: NetBSD fork1() vs. Linux do_fork()
To: Miao Qingjun <qjmiao@yahoo.com>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: tech-kern
Date: 02/13/2001 01:27:59
Miao Qingjun <qjmiao@yahoo.com> writes:

> Since NetBSD fork1() has similar functionalities as Linux do_fork(),
> can we implement native kernel thread library on NetBSD just like
> LinuxThreads do using clone() syscall? Or there is already such one?

Yes, we could, if we exported a clone()-like interface in our system
call table, which would be easy.

Such a thread system would have the similar problems to LinuxThreads,
though: context switching would be expensive (because they involve
process context switches and trapping into the kernel), and it would
be hard to get signals right in a meaningful way.

        - Nathan