comp.lang.ada
 help / color / mirror / Atom feed
From: cosc19z5@Bayou.UH.EDU (Spasmo)
Subject: Re: Concurrency in Gnat 3.05?
Date: 1996/07/24
Date: 1996-07-24T00:00:00+00:00	[thread overview]
Message-ID: <4t4l4s$m18@masala.cc.uh.edu> (raw)
In-Reply-To: 4sr724$4k8@felix.seas.gwu.edu


Michael Feldman (mfeldman@seas.gwu.edu) wrote:
: 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.

Well I've more or less got a grip on things and am implementing
my own scheduling as folks suggested which is actually a blessing
in disguise IMHO, but I'd love to see your Two_Cooperating_Tasks
program indeed.  I've got a subdirectory chock full of your stuff
so I'll look for it imemdiately.


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

While I do understand multitasking I'm as guilty as they get for
misusing that term in the most gruesome of ways.


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

At this point I know :).  I just saw tasks and immediately a synapse
fired and said "pre-emptive multi-tasking".  I suppose the reason
I assumed time slicing was because I had assumed that tasking was
similar to the fork() system call in UNIX C.  My mistake indeed!



: 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.

Well "truly" is another gruesome error on my behalf.  Why I even
said "truly" I will never know, especially since I should know
better.


: 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." :-)

Perfect!  Hey maybe next time I'll just send you a poorly worded
post and you can write it up for me :)


: Mike Feldman

--
Spasmo
"Here's a present just for you
When you open it, you'll be through"
	"Letter Bomb" by the Circle Jerks





      parent reply	other threads:[~1996-07-24  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? Robert Dunn
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-19  0:00   ` Spasmo
1996-07-18  0:00     ` Robert Dewar
1996-07-20  0:00       ` Michael Feldman
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-22  0:00   ` Jon S Anthony
1996-07-24  0:00   ` Jon S Anthony
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 ` Jerry van Dijk
1996-07-20  0:00   ` Robert Dewar
1996-07-20  0:00   ` Robert Dewar
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 ` Kevin J. Weise
1996-07-20  0:00 ` Michael Feldman
1996-07-20  0:00   ` Robert Dewar
1996-07-21  0:00   ` Jerry van Dijk
1996-07-24  0:00   ` Spasmo [this message]
replies disabled

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