comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Asynchronous IO
Date: 1996/06/15
Date: 1996-06-15T00:00:00+00:00	[thread overview]
Message-ID: <dewar.834847212@schonberg> (raw)
In-Reply-To: OHK.96Jun14131501@edeber.nta.no


Kristensen said

"For obvious resons, it is desirable to be able to do output of data to
different devices in parallel. Does the Ada95 standard define what
happens if two tasks try to do IO to two different files at the same
time? I have tried to find out by reading both the RM and the
Rationale, but is none the wiser."

For obvious reasons, it is impossible to find the answer in the RM, since
it depends on the implementation. On a system like DOS, which does not
provide multi-threaded I/O, of course any I/O operation is likely to block
other tasks (sometimes a kludge for keyboard I/O can be arranged, using
polling).

On systems that do provide multi-threaded I/O, you still have to find
out if your implementation takes advantage of this. Take a system like
Solaris, one could do the Ada tasking within one Solaris thread, which
would in fact likely be the most efficient approach for the Ada tasking
itself. However, you would then not get overlapped I/O. One of the reasons
that most people want tasks to map to threads in a system like Solaris,
is precisely to get overlapped I/O, though you then have to check that
the system provides thread-safe I/O (it is amazing in modern Unix systems
with threads how much is NOT thread safe, for instance, malloc is not
thread safe in Solaris).





  reply	other threads:[~1996-06-15  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-14  0:00 Asynchronous IO Ole-Hjalmar Kristensen FOU.TD/DELAB
1996-06-15  0:00 ` Robert Dewar [this message]
1996-06-17  0:00   ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1996-06-17  0:00 ` Nasser Abbasi
1996-06-17  0:00 ` Nasser Abbasi
1996-06-18  0:00   ` Jon S Anthony
replies disabled

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