comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: mapping of tasking to the OS
Date: 1996/12/07
Date: 1996-12-07T00:00:00+00:00	[thread overview]
Message-ID: <dewar.850018640@merv> (raw)
In-Reply-To: 1996Dec6.091214.1@eisner


In article <32A7D1E0.3682@sni.de>, Michiel Perdeck <perdeck.via@sni.de> writes:
> I am gathering ammunition to propagate the use of Ada in my company
> (CMG plc) and I have the following question:

> How does the Ada tasking map to a particular operating system? Are there
> standard ways for this mapping in e.g. Unix (with and without
> lightweight processes), OS/2, Win95, NT, etc.? And what about some of
> the well-know C/Unix constructs like fork/exec, does that have an
> equivalent in Ada? I know that some of my collegues (specifically the
> Unix affictionado's) will want to be certain how specific multi-tasking
> constructs are mapped onto the OS! (And don't tell me that one can of
> course use OS calls in Ada.)


This will vary from compiler to compiler. Generally with GNAT, we map to
operating systems threads where they are available, e.g. on Solaris, to the
underlying Solaris threads. The GNAT runtime tasking (which Larry refers to
as having been written by Ada bigots :-) is in fact as much informed by
the Posix Threads draft 10 standard (i.e. tjhe final Pthreads) as by Ada,
and interfaces pretty directly to Pthreads. There is an abstraction loayer
that also allows interfacing to to variations on this (earlier implementations
of Pthreads, such as DCE threads, and also to OS/2 threads and NT threads).

On some operating systems, e.g. SunOS v4, there is no operating systems
level threads support, and in that case, we use a separate threads package.

We also optionally use this separate threads packages in cases where the
programmer specifies that exact Annex D semantics are required (the Ada
real time annex) and the underlying operating system (e.g. Solaris)
provides subtly incorrect scheduling semantics. [Solaris is almost correct
if you run in super user mode with the real time priorities, but not quite].

Of course, most tasking applications do not use the Dispatching_Policy
pragma, and so the underlying Solaris threads work just fine (and are
the default implementation in the absence of a specific use of this
pragma to specify annex D semantics).






      reply	other threads:[~1996-12-07  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-06  0:00 mapping of tasking to the OS Michiel Perdeck
1996-12-06  0:00 ` Larry Kilgallen
1996-12-07  0:00   ` Robert Dewar [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox