From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9e46e8a19dc8e224 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Asynchronous IO Date: 1996/06/15 Message-ID: #1/1 X-Deja-AN: 160462950 references: organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-06-15T00:00:00+00:00 List-Id: 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).