comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Say it isn't so! (Formerly: Ada replacements for DOS I/O)
Date: 30 Oct 1994 10:31:28 -0500
Date: 1994-10-30T10:31:28-05:00	[thread overview]
Message-ID: <390e8g$f0m@gnat.cs.nyu.edu> (raw)
In-Reply-To: 2EB14997@SMTPGATE2.STRATCOM.AF.MIL

THe important thing to realize is that the Ada language has nothing to
say about whether I/O operations allow other tasks to proceed, nor could
it, since this is a highly operating systems dependent feature. In some
operating systems (e.g. DOS) it is close to impossible to do overlapping.
In a Unix without threads, it is also difficult. 

In a Unix with threads, you cannot assume that Ada tasks are mapped to
different threads. If they are, then almost certainly I/O is overlapped.

THe bottom line here is that you need to ask specific questions about
your implementation before making assumptions that are unwarranted. If
you require overlap, then make sure that your implementation supports it.

Calling it appalling or a bug, or whatever is really besides the point. THere
are many implementation dependent features in Ada (or in C or Fortran for
that matter), and one of the jobs of any programmer in any language is to
make sure that the compiler you are using supports the features that you
required.

Note that even in DOS, there are *some* cases where overlap can be achieved.
FOr example, it is definitely possible and desirable (though not required!)
to allow overlap of tasks with keyboard I/O, but disk I/O is pretty much
a lost cause.

Going back to the threads issue, it is very important for you to know
whether you need your Ada tasks mapped to threads, and if so, to insist
on this mapping. Typically mapping Ada tasks to threads introduces a lot
of extra overhead (light weight threads in most Unices aren't!) so a vendor
may assume that high performance on tasking is more important than this
mapping, and that decision may be right, it all depends on expectations
and planned usage.

In GNAT, we base our tasking implementation on posix threads. On a system,
like SunOS, which has no threads, we simulate the threads. This means that
we expect to take advantage of multiple threads if the operating system
provides them, and the implementation of GNAT tasking on the SGI does map
to separate threads.




  reply	other threads:[~1994-10-30 15:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-28 18:59 Say it isn't so! (Formerly: Ada replacements for DOS I/O) Bennett, Chip (KTR) ~U
1994-10-30 15:31 ` Robert Dewar [this message]
1994-10-31 10:36 ` Rudy Zijlstra
1994-11-05  3:04 ` R. William Beckwith
  -- strict thread matches above, loose matches on Subject: below --
1994-10-31 12:51 cwarwick
1994-10-31 14:45 CONDIC
replies disabled

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