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: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Interrupt "Get" Date: 1998/05/21 Message-ID: #1/1 X-Deja-AN: 355226579 References: <356368C8.6EDF@info.polymtl.ca> <%1N81.460$ja.2197141@newsread.com> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 895756200 3263 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1998-05-21T00:00:00+00:00 List-Id: <> This is misleading. In any implementation of Ada where tasks map to operating systems threads, and any reasonable operating system, the I/O call will block the task that executes it, but not other tasks. This answer is written from the narrow perspective of an Ada implkementation in which operating systems threads are not used, but these days, use of operating systems threads is the normal case, or at least is an option (e.g. in GNAT, we provide both OS threads, and user level threads, because both are useful in some contexts). Note that relying on time slicing is not appropriate. Indeed the only defined dispatching protocol in Ada 95 absolutely *forbids* time slicing on a single processor. 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.