comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Concurrency in Gnat 3.05?
Date: 1996/07/18
Date: 1996-07-18T00:00:00+00:00	[thread overview]
Message-ID: <dewar.837693866@schonberg> (raw)
In-Reply-To: 4sjqte$3mu@masala.cc.uh.edu


Spasmo said

Ok, before I get on with my main question, I've got another.  Is
there any place where I can find some detailed GNAT specific docs?
I know my questions are simple newbie ones that could be answered
given some detailed GNAT docs, however all the docs I have seem
to be about installation, or DJGPP, so I end up wasting bandwidth
asking newbie questions because I can't seem to find the answers
anywhere.  Well on to my next newbie question :)

  The current documentation is gnatinfo.txt, which I assume you have read
  since it is included in all GNAT releases. If not, you have completely
  missed the primary available documentation!

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?

  Of course it is not truly concurrent, there is no such thing as true
  concurrency on a monoprocessor! The processor can only do one thing
  at a time! What you are asking is whether it time slices among equal
  priority tasks, and the answer is that it does not, and that Ada 95
  dispatching semantics does not permit time slicing in its default:
  The following is from RM annex D.

4   Task dispatching is the process by which one ready task is selected for
execution on a processor.  This selection is done at certain points during
the execution of a task called task dispatching points.  A task reaches a
task dispatching point whenever it becomes blocked, and whenever it becomes
ready.  In addition, the completion of an accept_statement (see 9.5.2), and
task termination are task dispatching points for the executing task.  Other
task dispatching points are defined throughout this Annex.

  Time slicing is available when GNAT runs over some operating systems where
  tasks are mapped to threads, and the threads provide time slicing (whether
  this conforms to annex D is an interesting question .. it certainly does
  not conform to the spirit of annex D, but you can argue that you are
  simulating the effect of a multi-processor.

  In any case, the bottom line is that tasks do NOT time slice on DOS, and
  any Ada program that depends on time slicing is not portable, and is
  depending on implementation specific alternative scheduling policies.





  parent reply	other threads:[~1996-07-18  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 [this message]
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
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