RE: MPI and Threads

Boris V Protopopov (boris@ERC.MsState.EDU)
Mon, 17 Mar 1997 11:42:43 -0600

Hi, Bill,

in my understanding, it is determined by the kernel architecture
whether system calls are pre-emptable and has nothing to do with
threads package on the system (in a sense that if the kernel is
pre-emptable, threads can be "truly" pre-emptable too). Most probably,
in its attempt not to restrict itself to truly pre-emptable kernels, POSIX
was not very strict concerning requiring specific scheduling options.

If you take look at POSIX threads again, you'll see that it defines three
possible scheduling schemes (among them, are the schemes corresponding
to pre-emptable and non-pre-emptable);
I think, you are right, POSIX does not require implementation of all these
scheduling schemes, but just like in MPI, it is assumed that "high-quality"
"general-purpose" implementations :-) have both pre-emptable and
non-pre-emptable threads.

The easiest thing to do is, just like Mark suggested previously, to restrict MPI
to dealing with preemptive threads only. Another thing to do is to add MPI
inquiry functions to get the info about scheduling options on a specific platform.
Other options may be feasible; we can discuss them.

On the other hand, I would like to draw your attention to the difference between
a standard and its implementations. The former is a static thing, the latter are
moving targets that are supposedly increasing their quality and putting into practice
all "good intentions" implied in the standard. (The problem here is just like with MPI-2
- it tries to be too general :-)). I think, it is quite reasonable to expect
that POSIX implementations will evolve over time and increase their quality.
As far as I know, there are no other portable thread standards.

I would like to emphasize again that POSIX standardized the expected
functionality, not only the API, and the functionality is what matters while building
MPI-2 standard on top of other standards.
I think, you will agree that POSIX provides at least minimal basis for portability.

If there are other, technical or not, concerns, I'd be happy to discuss them.

Thanks, Boris Protopopov.
=============================================================
From: William Gropp[SMTP:gropp@mcs.anl.gov]
Sent: Monday, March 17, 1997 7:41 AM
To: Boris V Protopopov
Cc: 'mpi-external@mcs.anl.gov'
Subject: Re: MPI and Threads

There's one problem with this elevation of POSIX threads as the one true
threads implementation. Last time several of us checked, POSIX was exceeding
careful to step around the issues of so-called kernel and user threads (are
threads pre-emptable even when executing system calls). For many of the
planned uses of threads, kernel threads are required, yet a fully POSIX
compliant implementation need not provide them. This is an important
TECHNICAL concern about the choice of POSIX threads as somehow blessed by the
MPI Forum.

There are also important non-technical issues, but before we consider adopting
pthreads, we should be very clear about what we are adopting. This is a major
reason that I'm against selecting a particular threads API, particularly one
that does not specify whether system calls are pre-emptable.

Bill