From owner-freebsd-hackers Sun Dec 1 12:35:24 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA29458 for hackers-outgoing; Sun, 1 Dec 1996 12:35:24 -0800 (PST) Received: from ki1.chemie.fu-berlin.de (ki1.Chemie.FU-Berlin.DE [160.45.24.21]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id MAA29453 for ; Sun, 1 Dec 1996 12:35:19 -0800 (PST) Received: by ki1.chemie.fu-berlin.de (Smail3.1.28.1) from mail.hanse.de (193.174.9.9) with smtp id ; Sun, 1 Dec 96 21:35 MET Received: from wavehh.UUCP by mail.hanse.de with UUCP for nawaz921@cs.uidaho.EDU id ; Sun, 1 Dec 96 21:35 MET Received: by wavehh.hanse.de (4.1/SMI-4.1) id AA00991; Sun, 1 Dec 96 18:10:07 +0100 Date: Sun, 1 Dec 96 18:10:07 +0100 From: cracauer@wavehh.hanse.de (Martin Cracauer) Message-Id: <9612011710.AA00991@wavehh.hanse.de> To: nawaz921@cs.uidaho.EDU Cc: freebsd-hackers@freebsd.org Subject: clone()/rfork()/threads (Re: Inferno for FreeBSD) References: <11648.849446420@waldrog.cs.uidaho.edu> Reply-To: cracauer@wavehh.hanse.de Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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