comp.lang.ada
 help / color / mirror / Atom feed
From: mfb@mbunix.mitre.org (Michael F Brenner)
Subject: Re: Interrupt "Get"
Date: 1998/05/22
Date: 1998-05-22T00:00:00+00:00	[thread overview]
Message-ID: <6k3uub$2du@top.mitre.org> (raw)
In-Reply-To: dewar.895755957@merv


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




  reply	other threads:[~1998-05-22  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-20  0:00 Interrupt "Get" John Slavich
1998-05-21  0:00 ` Robert Dewar
1998-05-21  0:00   ` Robert Dewar
1998-05-21  0:00   ` John Slavich
     [not found] ` <%1N81.460$ja.2197141@newsread.com>
1998-05-21  0:00   ` Robert Dewar
1998-05-22  0:00     ` Michael F Brenner [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-05-28  0:00 Joseph Altea
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox