From owner-freebsd-hackers Fri Oct 20 05:15:09 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id FAA00587 for hackers-outgoing; Fri, 20 Oct 1995 05:15:09 -0700 Received: from Relay1.Austria.EU.net (relay1.Austria.EU.net [192.92.138.47]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id FAA00581 for ; Fri, 20 Oct 1995 05:15:01 -0700 From: marino.ladavac@aut.alcatel.at Received: from aut.alcatel.at (dnisun.aut.alcatel.at) by Relay1.Austria.EU.net with SMTP id AA21815 (5.67b/IDA-1.5 for ); Fri, 20 Oct 1995 13:08:55 +0100 Received: from atuhc16 by aut.alcatel.at (4.1/SMI-4.1/AAA-1.29/main) id AA26365; Fri, 20 Oct 95 13:08:48 +0100 Message-Id: <9510201208.AA26365@atuhc16.aut.alcatel.at> Received: by atuhc16 (1.38.193.4/16.2) id AA06319; Fri, 20 Oct 1995 13:08:44 +0100 Subject: Re: NetBSD/FreeBSD (pthreads) To: jb%cimaxp1@werple.net.au (John Birrell) Date: Fri, 20 Oct 95 13:08:43 MET Cc: hackers@freebsd.org In-Reply-To: <199510200208.MAA11995@werple.net.au>; from "John Birrell" at Oct 20, 95 12:11 (noon) Mailer: Elm [revision: 70.85] Sender: owner-hackers@freebsd.org Precedence: bulk > > If you get a real blocking operation (ie: one outside the model, etc.), > > then all threads are blocked because the context switcher can't run > Our scheduler runs on signals, so any calls outside the model are interrupted > and the next thread is run. An example of a blocking call that is outside > the pthreads model is msgrcv(). In our implementation, a blocking call to > msgrcv() will block for its time slice and then be interrupted by a SIGVTALRM > so that the next thread runs. The application has to handle the EINTR that is > returned to the thread once it gets to run again. Either that or the > application has to be written to use IPC_NOWAIT. Either way requires a > compromise. Are you sure that the virtual timer keeps running when process is blocked? I would think not. This means that you shouldn't be able to use SIGVTALRM to interrupt this sort of calls. You would have to jacket them (within the pthread library, hopefully) and activate normal timer and await SIGALRM instead. Is this what you have done in your pthread lib rewrite? > > unless it converts the call. Like fstatfs/statfs on a remote but > > down server (yit's not a select()'able operation). > This should still be interruptable by a signal. > -- > John Birrell CIMlogic Pty Ltd > jb@cimlogic.com.au 119 Cecil Street > Ph +61 3 9690 9600 South Melbourne Vic 3205 > Fax +61 3 9690 6650 Australia > Mob +61 18 353 137 /Alby