comp.lang.ada
 help / color / mirror / Atom feed
* Re: Ada replacements for DOS I/O
@ 1994-10-29 22:01 tmoran
  0 siblings, 0 replies; 19+ messages in thread
From: tmoran @ 1994-10-29 22:01 UTC (permalink / raw)


About a year ago the local SigAda presentation by someone from
Sun or Silicon Graphics (I forget which) was about a compiler
that let you specify which tasks should be separate OS threads,
and thus not block other threads when they do IO, and which tasks
should be Ada run-time multitasked within a single OS thread,
and thus do task switching much faster.  Thus letting you
'pays your money and takes your choice'.



^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: Ada replacements for DOS I/O
@ 1994-11-03  3:15 tmoran
  1994-11-03 23:05 ` Robert Dewar
  0 siblings, 1 reply; 19+ messages in thread
From: tmoran @ 1994-11-03  3:15 UTC (permalink / raw)


>... built their I/O packages around a "two process" model.  The main
>program and all user defined tasks run in a single process, but you
>have a package that mediates all I/O events and hands them to a second
>process which does the waiting and event handling.
As I recall from writing a DOS RAM disk driver many years ago, DOS
device drivers are structured with two calls, one to start (or queue)
the operation, and one to get the result.  So the single tasking must
come from broken implementation somewhere, not broken device driver
interface design.
('All your problems will be solved by Windows xx, from the company
that brought you MSDOS!') O.O



^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: Ada replacements for DOS I/O
@ 1994-10-31 19:31 tmoran
  0 siblings, 0 replies; 19+ messages in thread
From: tmoran @ 1994-10-31 19:31 UTC (permalink / raw)


>The most logical step is of course to write the IO functions we need
There are two problems: traditional hard disk IO in DOS is done via
CPU instructions, not DMA, so it's not convenient to interrupt in
the middle - and you couldn't get much IO/CPU overlap anyway.
The more general problem is that MSDOS is not re-entrant.
So the effect is as if there is a single (DOS) task that does
any and all DOS activity.  Any task wanting a DOS action must
wait for rendezvous with that single DOS task.
  The first problem is lessened under DOS by doing disk IO with
large block sizes, full track reading, disk caching, etc.
For the second problem, you'll have to write your own multi-tasking
DOS.  A non-trivial undertaking.  (OTOH, IBM and Microsoft have
already done that and sell the results as OS/2 and Windows NT. ;)
  Is your problem that you would like useful CPU cycles overlapped
with disk IO, or that (presumably due to interrupts) high priority
tasks can suddenly become unblocked while a low priority task is
running inside non-preemptible DOS?



^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: Ada replacements for DOS I/O
@ 1994-10-31 12:46 cwarwick
  0 siblings, 0 replies; 19+ messages in thread
From: cwarwick @ 1994-10-31 12:46 UTC (permalink / raw)


On 27 Oct 1994 19:04:50 -0400, 
Robert Dewar  <dewar@cs.nyu.edu> wrote:

>The failure to do concurrent I/O is certainly not a bug (nothing in the
>Ada standard requires, or even implies, that I/O done from one task is
>concurrent with the execution of other tasks).

No, but it does require a higher priority task take precedence over a 
lower. With the Alsys DOS product all task processing regardless of 
priority ceases. I think the nature of Ada tasking is such that I/O be at 
least interruptable when a higher priority task becomes ready to run.

>If you need concurrent I/O, put an operating system on your PC (many
>choices including OS/2, NT, Solaris, SCO Unix, Linux, BSD386, Lynx,
>Nextstep), and then shop for a compiler that definitely supports the
>concurrency that you need.

The most logical step is of course to write the IO functions we need in 
Ada (or find someone who already has, hence the start of this thread) and 
then the bug goes away, regardless of operating system...

>You burned yourself on this one by making a totally unwarranted assumption!

I don't think its unwarrwanted. Alsys provided use with all the OS tools we 
needed to implement this project, which included interrupt handling, 
multiple tasking, and IO to nonstandard cards. I don't think given all this 
it was unreasonable to assume they had thought about the interaction 
between tasks and DOS.
 --
 Lorne Elliot in a Conan the Barabarian suit, or
 "Beware the fool, for only the fool may speak the truth"

 Chris Warwick
 cwarwick@fox.nstn.ns.ca
 warwick@anchor.hfx.prior.ca



^ permalink raw reply	[flat|nested] 19+ messages in thread
* Ada replacements for DOS I/O
@ 1994-10-27 11:25 Elgar the Idiot aka Chris Warwick
  1994-10-27 23:04 ` Robert Dewar
  1994-10-28 12:17 ` Ted Dennison
  0 siblings, 2 replies; 19+ messages in thread
From: Elgar the Idiot aka Chris Warwick @ 1994-10-27 11:25 UTC (permalink / raw)


We just got burned on a project using Alsys Ada. Seems we had assumed that 
a multi-tasking Ada program would perform I/O is parallel with other 
processing. The system service call actucally halts all processing in the 
program until the system service is complete...

I don't mean to burn Alsys, since the bug(?) also exists in the Verdix 
compiler we are using. The difference is the Verdix is for Unix so we just 
sidestepped the problem by not using Ada tasks...

Does anyone know of any replacements for the DOS I/O (specifically the Disk 
I/O operations) compatable with Alsys Ada?
 --
 Lorne Elliot in a Conan the Barabarian suit, or
 "Beware the fool, for only the fool may speak the truth"

 Chris Warwick
 cwarwick@fox.nstn.ns.ca
 warwick@anchor.hfx.prior.ca



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~1994-11-06 21:03 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-10-29 22:01 Ada replacements for DOS I/O tmoran
  -- strict thread matches above, loose matches on Subject: below --
1994-11-03  3:15 tmoran
1994-11-03 23:05 ` Robert Dewar
1994-10-31 19:31 tmoran
1994-10-31 12:46 cwarwick
1994-10-27 11:25 Elgar the Idiot aka Chris Warwick
1994-10-27 23:04 ` Robert Dewar
1994-10-31 15:08   ` Mark Bayern
1994-11-03 11:23     ` Robert Dewar
1994-11-04  8:17       ` Samuel Tardieu
1994-11-06 21:03         ` Robert Dewar
1994-10-28 12:17 ` Ted Dennison
1994-10-31 13:21   ` Robert Dewar
1994-11-03  9:24     ` Robert I. Eachus
1994-11-05  5:37       ` Robert Dewar
1994-11-01 14:42   ` David Emery
1994-11-02 14:40     ` David Weller
1994-11-02 15:20   ` Robert I. Eachus
1994-11-03 13:01     ` Bevin R. Brett

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