Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Dec 1996 22:52:34 -0800
From:      Julian Elischer <julian@whistle.com>
To:        cracauer@wavehh.hanse.de
Cc:        nawaz921@cs.uidaho.EDU, freebsd-hackers@freebsd.org
Subject:   Re: clone()/rfork()/threads (Re: Inferno for FreeBSD)
Message-ID:  <32A27CB2.59E2B600@whistle.com>
References:  <11648.849446420@waldrog.cs.uidaho.edu> <9612011710.AA00991@wavehh.hanse.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Martin Cracauer wrote:
> 
>
> >can the linux clone syscall be emulated with rfork?

MOSTLY

> The Linux clone() syscall will also support options to share the PID
> and the signal mask.

yes.. this requires some work that was done by another developer 
(I have it here somewhere) who implimented threads using fork
but with special process linkages to allow thread processes
to be grouped together.

> 
> The additonal options are needed to produce a Posix-compatible thread
> interface that has no userlevel threads anymore. Linus claims Linux
> syscalls are fast enough to be acceptable even in applications with
> heavy use of locking (and therefore resheduling by the kernel).

He might be correct.
sharing memory spaces makes for a much smaller contect switch.

> 
> These options don't work for now, so it's a good bet that inferno uses
> only shared memory options. They probably don't need Posix
> compatiblity for their Threads.
In that regard, our rfork is not quite finished either
It requires a different memory sharing method to be grafted
into it..
namely use of the vm-space reference counts instead of
actually duplicating the vm space with shared objects..
Once teh kernel stacks are not in the user space 
(they might already be gone by now I haven't looked.. SMP needs it too
I think) then the way is clear for this...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?32A27CB2.59E2B600>