Newsgroups: comp.parallel.pvm
From: subraman@cs.iastate.edu (Krishnan Subramaniam)
Subject: Re: Signals and Threads and PVM (long and somewhat rambling)
Organization: Iowa State University, Ames, Iowa
Date: 16 Feb 95 21:51:49 GMT
Message-ID: <subraman.792971509@shazam.cs.iastate.edu>

Hi ,
	That was a very comprehensive "state of signals + threads in PVM" report by Bob.
Helped calrify some of the problems I have been facing too. Seems like everyone's
Holy Grail today is to find a solution to the "Can we have a threaded libPVM" question !!!
I'm one of the dreamers too. I've been trying to implement a not so Active message layer
in PVM. 
	My idea is to have a thread doing a blocked recv, and another thread doing some 
"useful" work. The problem with all this is that the buffering mechanisms in PVM are pretty
complex. I tried blocking signals around the LIST___ macros and also around the mem alloc
/realloc/free etc. Still I have problems of segment violations always in the byteupk or
midtobuf calls - cant figure out why. Worse yet this occurs only occasionally so cant
even trap it reliably - sweet way to go for a master's thesis!!!
	I think a reasonable approach would involve some massive redesign and recoding of the
libpvm part atleast. That way we could avoid having so much of global state. Also it might be
easier if the send/recv parts are distinct and not multiplexed as it is now. Because we are
using threads anyway.
	The part about libc functions not being "thread safe", we could work around that
because we use only read,write,mem functions heavily in libPVM (we can do away with
the libPVMERR messages). And the read,write functions are "restartable" on most machines
and the mem functions can be wrapped with a signal blocker - or we could allocate BIG blocks
first and then recycle this memory for sometime then free it and get another BIG block -
(still dreaming!). All this would work IF we stick to this single communication thread
policy - else it all falls to pieces. But in most cases people can (I think) live with
one main communication thread and the rest as work threads. 

	So what does the world think of this ? Does anybody else have any experiences to
share?

thanks,

krishnan.
	
--
Krishnan R Subramaniam
Voice Mail : 515 - 296 4209.
Email	   : subraman@cs.iastate.edu   
HTML  	   : http://www.public.iastate.edu/~rsk/

