From: "Ioannis E. Venetis" <iev@hpclab.ceid.upatras.gr>
Subject: Re: How to create kernel-level threads in Tru64 5.1?
Date: Fri, 14 Feb 2003 17:55:33 +0200 [thread overview]
Message-ID: <b2j3on$hes$1@ulysses.noc.ntua.gr> (raw)
In-Reply-To: Ep82a.863$F_.611@news.cpqcorp.net
Hello,
> The Mach interfaces have all, officially, always been completely
unsupported
> on Tru64 UNIX, (in user mode), and are undocumented. You can find books on
> Mach, and many papers on the web, and you CAN figure out how to use and
> manipulate Mach threads. Much of which you might discover will actually
> work on Tru64 UNIX... but don't bother asking anyone for help or trying to
> report any problems. ;-)
Well, I managed to create some kernel-threads using the Mach interface :-)
The code I mentioned in my original post and some digging in the system
include files helped very much.
> Furthermore, if you're planning to use (or to support applications that
use)
> libc, librt, or other libraries (bundled or otherwise) that support
> threads, beware that these are all based on carefully designed integration
> between libc and libpthread, and it won't work with any other thread
> library unless you can figure out (entirely on your own) how to duplicate
> that support. Even if you do manage, you'll have a much harder time trying
> to build an environment that could support both POSIX threads and your
> package within the same process, which means you're excluding most
existing
> threaded code.
At least some applications from the OpenMP NAS benchmark suite are running
correctly. We have a compiler that creates code that uses our thread library
and
the CG and MG applications are terminating successfully and also get
speed-up.
I haven't tried other applications yet. The ps command (using the -m switch)
also
confirms that there are more than one threads running. Our library uses
several
functions from libc (printf, malloc, mmap, open, close, ...) and there seems
to be
no problem. Or do you mean that there might be a problem if we try to create
an
environment that supports both POSIX and our threads package? Anyway, this
is not something that we are trying to do.
> This all was of course also a problem faced by other groups that have done
> "non-POSIX" thread support -- including Ada, Java, Perl, etc. Generally,
> the solution has been to build their thread support on top of POSIX
> threads.
>
> (This was really the original inspiration of POSIX threads, which is based
> directly on Digital's "CMA" package, which began as a generalization of
the
> task and synchronization part of the VAX Ada runtime library intended
> primarily to allow various threaded runtime libraries to coexist within a
> process.)
>
> Like Ada and Java, you should be doing your "layer" in terms of standard
and
> supported POSIX synchronization. That's not really "3-level scheduling";
> there ought to be no need for you to try to do your own "scheduling" at
> all.
According to the model that our thread library implements, it is necessary
to schedule
the user-level threads in an explicit way on the kernel-threads.
Specifically, user-level
threads do not start executing as soon as they are created, they are
scheduled to run
when they dependancies from other threads have been satisfied. This is
totally different
from POSIX threads. Moreover, this library supports multi-level parallelism
and
several policies of scheduling different levels can be implemented, for
example execute
first all inner-level threads and then all outer-level threads. So, using
POSIX
threads as execution vehicles would require a 3-level scheduling scheme.
Thank you for your comments,
Ioannis E. Venetis
next prev parent reply other threads:[~2003-02-14 15:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-07 18:57 How to create kernel-level threads in Tru64 5.1? Ioannis E. Venetis
2003-02-07 22:32 ` Joe Chung
2003-02-08 13:40 ` Ioannis E. Venetis
2003-02-11 15:09 ` David Butenhof
2003-02-14 15:55 ` Ioannis E. Venetis [this message]
2003-02-10 14:17 ` Andrew Duane USG
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox