comp.lang.ada
 help / color / mirror / Atom feed
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: Concurrency in Gnat 3.05?
Date: 1996/07/20
Date: 1996-07-20T00:00:00+00:00	[thread overview]
Message-ID: <4sr724$4k8@felix.seas.gwu.edu> (raw)
In-Reply-To: 4sjqte$3mu@masala.cc.uh.edu


In article <4sjqte$3mu@masala.cc.uh.edu>, Spasmo <cosc19z5@Bayou.UH.EDU> wrote:
>Hey all.
>
>Is Gnat 3.05 (for DOS) truly concurrent when executing tasks?  I'm
>asking because I've written some tasking code (finally got it
>to link) and when I ran the code, the tasks didn't run
>concurrently at all.  I'm running in a Win95 DOS box.  One task
>runs to completion before the other task starts up.  I've also
>tried some sample code including Feldman's Twotasks program
>and they exhibit the same behavior.  Is there a way to get
>tasks to run concurrently, or would I have to look for a
>GNAT that's native to something like WinNT/95 that can
>handle multi-tasking?

Hmmm - since you have access to my Two_Tasks program, you oughta try
Two_Cooperating_Tasks in the same distribution (or book) in which
DELAY is used to cause the tasks to cooperatively swap control.

The term "multitasking" seems to be one of the least well understood
by the most people, especially in the Ada context.

_Preemptive_ multitasking is NOT required in the Ada 95 core language,
nor is time-slicing. 

Further, "truly" concurrent is possible only if you have
multiple processors. A typical single processor can execute only one 
instruction at a time (maybe with some I/O overlap), so "true" concurrency
is simply not possible. _All_ concurrency on a single processor is
"logical" (sometimes called pseudo-) concurrency.

Your question then can be re-phrased as,

"Will the OS, or the runtime system, manage my logical concurrency
automatically, or is it up to me to write cooperative tasks?" In Ada, 
the answer is "sometimes." :-)

Mike Feldman




  parent reply	other threads:[~1996-07-20  0:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4sjqte$3mu@masala.cc.uh.edu>
1996-07-18  0:00 ` Concurrency in Gnat 3.05? Kevin J. Weise
1996-07-18  0:00 ` Samuel Tardieu
1996-07-20  0:00   ` Robert Dewar
1996-07-20  0:00     ` Michael Feldman
1996-07-18  0:00 ` Jerry van Dijk
1996-07-20  0:00   ` Robert Dewar
1996-07-20  0:00   ` Robert Dewar
1996-07-18  0:00 ` Robert Dewar
1996-07-19  0:00   ` Spasmo
1996-07-19  0:00     ` Tucker Taft
1996-07-18  0:00 ` Robert Dunn
1996-07-19  0:00   ` Spasmo
1996-07-18  0:00     ` Robert Dewar
1996-07-20  0:00       ` Michael Feldman
1996-07-19  0:00   ` Jon S Anthony
1996-07-19  0:00     ` Robert Dewar
1996-07-20  0:00     ` Michael Feldman
1996-07-24  0:00     ` Jon S Anthony
1996-07-22  0:00   ` Jon S Anthony
1996-07-22  0:00   ` Jon S Anthony
1996-07-24  0:00     ` Michael Feldman
1996-07-22  0:00   ` Jon S Anthony
1996-07-24  0:00   ` Jon S Anthony
1996-07-20  0:00 ` Michael Feldman [this message]
1996-07-20  0:00   ` Robert Dewar
1996-07-21  0:00   ` Jerry van Dijk
1996-07-24  0:00   ` Spasmo
replies disabled

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