From: ohk@edeber.nta.no (Ole-Hjalmar Kristensen FOU.TD/DELAB)
Subject: Re: Asynchronous IO
Date: 1996/06/17
Date: 1996-06-17T00:00:00+00:00 [thread overview]
Message-ID: <OHK.96Jun17101505@edeber.nta.no> (raw)
In-Reply-To: dewar.834847212@schonberg
In article <dewar.834847212@schonberg> dewar@cs.nyu.edu (Robert Dewar) writes:
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).
Yes, I also came to this conclusion some time after having posted my
question. I can only say I havn't programmed on systems like DOS fo a
LONG time...
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).
I suppose the most reasonable way to make a program using overlapped
IO portable then, would be to define a package to do it, and change
its implementation depending on what kind of system you are running
on.
Ole-Hj, Kristensen
next prev parent reply other threads:[~1996-06-17 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
1996-06-17 0:00 ` Ole-Hjalmar Kristensen FOU.TD/DELAB [this message]
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