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.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 10 Aug 91 04:59:28 GMT From: eachus@mitre-bedford.arpa (Robert I. Eachus) Subject: Re: Ada and Unix--Blocked Tasks Message-ID: List-Id: Since Mike Feldman asked, and since I was involved in the early years, I'll tell you what I expected at the time. On systems which supported sharing of memory between tasks and with relatively low-cost OS task or process switching, everyone expected Ada tasking to be mapped to OS tasking, even if entry call parameters had to be copied. For example, the DPS6 Ada compiler put the parent tasks environment (and the global heap) in the child's address space. This meant that a parameter, such as a record normally passed by reference, needed to be copied to the global heap if the call was from child to parent. On tasking hostile OS's such as OS/370 and the then current version of VMS, Ada programs were expected to run inside a single OS process. Things like MS-DOS (I won't call it an OS then...still might not now.) had no concept of tasking, so it would all have to be done in the Ada run-time and the "interesting" question was how close you could come to doing non-blocking keyboard I/O right. Unix was the interesting case. On some versions it was almost possible to do it "right," on others clearly impossible. What I expected, but never saw, was for vendors to have a single process which contained all the user written tasks, and hide additional processes in the vendor supplied IO package bodies. For example, a run-time could do its own local buffering and only call (or create) another process when there was a probability of a long wait. If done right, the run-time would figure out when it needed to create another child process and otherwise pass data to a process on the free list and wake it up. Has anyone ever done this? On current versions of Unix it should work quite well, and give you the illusion of one process per task without the process switching overhead. -- Robert I. Eachus with STANDARD_DISCLAIMER; use STANDARD_DISCLAIMER; function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...