From: Thomas Fiebig <fiebig@igd.fhg.de>
Newsgroups: comp.parallel
Subject: usinit()/user lock on IRIX 6.2
Date: 12 Nov 1998 05:16:25 GMT
Organization: Technische Universitaet Darmstadt
Approved: bigrigg@cs.cmu.edu
Message-Id: <72dqv9$fu0$1@encore.ece.cmu.edu>
Originator: bigrigg@ece.cmu.edu


I've got a problem using the user lock calls library (ulocks.h) on IRIX
6.2. Two unrelated processes are trying to create/bind to a shared arena
of file <filename>. Both are calling usinit(<filename>). The first
process is creating the arena, does several mallocs on it, creates and
frees a lock. After the first process has completed initializing the
arena, the second process calls usinit(<filename>) and should bind to
this arena rather than to create the arena again. However, the second
process hangs in the usinit call until the first process releases the
entire arena. The second process attempts to create the arena again and
succeds only if there's no arena with file <filename>. The traces of
both processes until the second process blocks look like this:

first process:
TRACE: Process 18524 creating new arena filename:locktype 0 maxusers 8
TRACE: Process 18524 Initializing R4000 UP LOCKS
TRACE: Process 18524 header size 1128 malloc arena size 64408
TRACE: arena @ 0x680000 gets semaphore device 0xbc0006 sfd 13
TRACE: Process 18524 added as tid 0 sfd 13 arena filename at 0x680000
TRACE: Process 18524 usinit succeded for arena filename @ 0x680000

second process:
TRACE: Process 18525 creating new arena filename:locktype 0 maxusers 8
TRACE: Process 18525 Initializing R4000 UP LOCKS
TRACE: Process 18525 header size 1128 malloc arena size 64408
TRACE: arena @ 0x680000 gets semaphore device 0xbc0007 sfd 4

How can a process bind to an existing arena <filename>? Is it wrong to
use therefore usinit(<filename>) or do I forget something?

Thanks for any help.

--
Thomas Fiebig

Dept. Communication & Cooperation
Fraunhofer Institute
for Computer Graphics
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
ph: +49 (6151) 155-202
fx: +49 (6151) 155-559
ml: fiebig@igd.fhg.de

--
Articles to bigrigg+parallel@cs.cmu.edu (Admin: bigrigg@cs.cmu.edu)
Archive: http://www.hensa.ac.uk/parallel/internet/usenet/comp.parallel

