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,6a6947f0ba40d152 X-Google-Attributes: gid103376,public From: mfb@mbunix.mitre.org (Michael F Brenner) Subject: Re: Interrupt "Get" Date: 1998/05/22 Message-ID: <6k3uub$2du@top.mitre.org>#1/1 X-Deja-AN: 355550551 References: <356368C8.6EDF@info.polymtl.ca> <%1N81.460$ja.2197141@newsread.com> Organization: None Newsgroups: comp.lang.ada Date: 1998-05-22T00:00:00+00:00 List-Id: Robert > Once again, if you are using an obsolete > operating system like DOS that > does not provide any kind of operating system threads support, > yes, indeed I/O (and anything else) will block all tasks and > there is no easy way around this problem, although > it is easy enough > to special case keyboard I/O (the > Alsys compilers for DOS did this, I wrote the code that was needed :-) > However, this was not done in the old ACT version of DOS, > which is no longer supported. It is possible that > the volunteer version of DOS that someone or > other is working on may have had this feature added. I certainly agree: it is easy enough to special case certain devices. As a matter of fact, the lack of special casing five particular devices (keyboard, TCP, disk, mouse, and Rs232) is what has led many people to believe that Ada tasking does not work at all, in any operating system. Who hasn't tried a tiny task with a text_io get in it and been disappointed in the results? It would be more fair to conclude that the Ada runtime libraries were poor. But people seldom express the problem this way. In general, the runtime source codes have not been made available (gnat, of course, excepted) at a reasonable cost. Therefore, it was easy to assume tasking itself was causing the blocking. We should be aware of this false belief, that the bug is in the tasking. Awareness could help better explain the problem to those experiencing the blocking. As my DOS computer backs up a drive, I am watching two drives working in parallel with overlapped, non-blocking track I/O using direct control of the disk device driver, and at the same time responding to keystrokes. AA The DOS system is a combination of three levels: the shell calls (interrupt 21), the BIOS, and the BDOS. There is no contradiction in an Ada runtime library using techniques under an operating system's Shell level (or under the VMS record manager, or whatever is blocking). Similarly, there is no contradiction in going OVER the operating system and adding virtual memory and/or threads (as most DOS Ada compilers do). In my opinion, a runtime library that implements text_io or stream_io in a manner that blocks in a task could use some improvement. Mike