From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=1.0 required=3.0 tests=BAYES_20,FROM_ADDR_WS autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 6 Aug 91 20:12:37 GMT From: mcsun!corton!chorus!nocturne.chorus.fr!jloup@uunet.uu.net (Jean-Loup Gai lly) Subject: Re: Ada and Unix--Blocked Tasks Message-ID: <11571@chorus.fr> List-Id: Drew Johnson (drew@verdix.com) writes: > What is really needed is a solid, complete thread implementation. I > understand that Mach has or will have this, and some Unix vendors are > slowly migrating toward this. Both Mach and Chorus have had a solid and complete thread implementation for several years. > However, in order to implement non-blocking IO in Unix, your > process must either catch and handle SIGIO, or it must poll the descriptor. > Polling can be very expensive from an execution standpoint, and can possibly > result in data loss, depending on the IO device driver involved. Polling is not that expensive. If a task cannot perform the IO operation immediately, the Ada runtime gives control to another ready task, so that the cpu is not wasted. The IO is retried only later. Various strategies are possible: retry after a small fixed amount of time or check also at synchronization points. > IMHO, the best solution to this situation is the standardization of package > POSIX_IO. I believe that this package provides all the necessary > functionality to perform non-blocking IO, and would then be very portable. The user then has to care about non-blocking IO. For many applications it sufficient to let the Ada runtime handle this transparently. Jean-loup Gailly jloup@chorus.fr