comp.lang.ada
 help / color / mirror / Atom feed
From: Mats Weber <Mats.Weber@elca-matrix.ch>
Subject: Tasking/blocking system calls (was: Ada --> C Translation)
Date: 1998/10/16
Date: 1998-10-16T00:00:00+00:00	[thread overview]
Message-ID: <3627A0E3.FD167DAC@elca-matrix.ch> (raw)
In-Reply-To: 702jg1$gst$1@prime.imagin.net

Samuel Mize wrote:

> By golly, he's right.  we should pick one way and stick to it.  If
> somebody needs a different one later, he can make up his own darn
> language.

You can't pick one way for all purposes. Some systems need tasking that is
faster or different from kernel threads, while other systems need tasks to be
implemented as kernel threads. See e.g. the GNAT documentation for reasons to
choose between tasking runtimes.

> Seriously, I/O blocking is only ambiguous for the predefined I/O
> packages, which are convenience packages.  Ada was originally defined
> for embedded systems.  If I'm building a real-time simulator, or an
> embedded radio system, or a crypto module, I really don't care whether
> Text_IO blocks the process or not.  I'm never going to use it anyway,
> I'm going to be watching I/O ports with machine-specific code.

... which could also block the whole process. The reason why Text_IO blocked
the whole process in non-kernel-threads tasking implemenetations does not come
from Text_IO itself, but from the underlying machine-specific code used to
implement Text_IO.

> Also, if I recall correctly, this WAS defined for Ada 83, by
> implication at least[1].  In Ada 95 the situation was improved by
> making it LESS defined.  This lets vendors offer more options,
> and makes it cheaper to put Ada on new targets.
> [...]
> [1] A lower-priority tasks's processing -- even a system call --
> should not block a higher-priority task that becomes ready.  Some
> implementations failed to get that right, and it wasn't tested by
> the validation suite, so some compilers that blocked on I/O got
> into the community.  Which is why you heard the question at all.

OK, it was defined, but that is not something you can reasonably enforce on
any system without kernel threads. Implementing this on e.g. SunOS
(pre-Solaris), AIX 3.x or VMS 5.x, would either require the OS to be modified,
or some very unreasonble implementation of tasking, or making all potentially
blocking system calls go through an extra layer.




  reply	other threads:[~1998-10-16  0:00 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-20  0:00 Win CE target William A Whitaker
1998-09-20  0:00 ` Tucker Taft
1998-09-21  0:00   ` dennison
1998-09-21  0:00     ` dewarr
1998-09-28  0:00       ` Ada --> C Translation, was: " Stefan Helfert
1998-09-29  0:00         ` Robert A Duff
1998-10-10  0:00           ` Dr Amirez
1998-10-11  0:00             ` Dale Stanbrough
1998-10-10  0:00               ` Dr Amirez
1998-10-11  0:00                 ` Dale Stanbrough
1998-10-11  0:00                   ` Dr Amirez
1998-10-12  0:00                     ` Larry Kilgallen
1998-10-13  0:00                       ` dennison
1998-10-12  0:00                     ` Niklas Holsti
1998-10-12  0:00                 ` dennison
1998-10-12  0:00                   ` Larry Kilgallen
1998-10-14  0:00                   ` dewarr
1998-10-14  0:00                     ` Andi Kleen
1998-10-12  0:00                 ` PC
1998-10-12  0:00                   ` Operating System in Ada (was Ada --> C Translation) Larry Kilgallen
1998-10-12  0:00                     ` Chris Morgan
1998-10-13  0:00                       ` Dale Stanbrough
1998-10-13  0:00                       ` Larry Kilgallen
1998-10-14  0:00                       ` dewarr
1998-10-12  0:00                     ` Tom Moran
1998-10-12  0:00                       ` Brian Rogoff
1998-10-13  0:00                         ` dennison
1998-10-13  0:00                           ` Brian Rogoff
1998-10-13  0:00                       ` Tucker Taft
1998-10-12  0:00                     ` dennison
1998-10-21  0:00                     ` Van Snyder
1998-10-22  0:00                       ` Tom Moran
1998-10-13  0:00             ` Ada --> C Translation, was: Win CE target Robert I. Eachus
1998-10-14  0:00               ` Samuel Mize
1998-10-16  0:00                 ` Mats Weber [this message]
1998-09-29  0:00         ` Tucker Taft
1998-09-30  0:00           ` dewarr
1998-09-20  0:00 ` dewarr
1998-09-20  0:00 ` dewarr
1998-09-23  0:00 ` falis
replies disabled

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