Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Dec 96 18:10:07 +0100
From:      cracauer@wavehh.hanse.de (Martin Cracauer)
To:        nawaz921@cs.uidaho.EDU
Cc:        freebsd-hackers@freebsd.org
Subject:   clone()/rfork()/threads (Re: Inferno for FreeBSD)
Message-ID:  <9612011710.AA00991@wavehh.hanse.de>
References:  <11648.849446420@waldrog.cs.uidaho.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
nawaz921@cs.uidaho.EDU (faried nawaz) wrote;

>>I just put the Linux binaries
>>up on the website.

>i tried it on my machine (3.0-current) but didn't get very far --

>Linux-emul(2746): clone() not supported

>can the linux clone syscall be emulated with rfork?

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

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).

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.

The existing Posix library above the clone() syscall looks pretty nice
and could be ported to FreeBSD quite easily (mostly sheduler
interfacing), but to make rfork() the base for a Posix-kompatible
Interface, it will have to get the PID and mask options, too.

As a side note: while Sun's JDK doesn't support any kernel-shedulable
thread interface on Unix (the Solaris port uses green threads), the
Inferno folks not only offer a Linux port, but it obviously has a
thread interface that supports multiple processors. I bet they didn't
even cared about existing libraries and just did their own on top of
clone(). The Java folks at Sun still tangle with their own threads
(http://java.sun.com/people/pavani/techconf.html). Could make me
think...

Regarding Inferno on FreeBSD, why not just take the constants for
Linux' clone() and add a function to Linux compatiblity that calls
rfork()? I'm busy with other ports for 2.2, sorry.

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin_Cracauer@wavehh.hanse.de http://cracauer.cons.org  Fax.: +4940 5228536
"As far as I'm concerned,  if something is so complicated that you can't ex-
 plain it in 10 seconds, then it's probably not worth knowing anyway"- Calvin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9612011710.AA00991>