comp.lang.ada
 help / color / mirror / Atom feed
From: Geert Bosch <geert@gonzo.sun3.iaf.nl>
Subject: Re: Tasking performance between Ada83 and Ada95
Date: 1997/06/22
Date: 1997-06-22T00:00:00+00:00	[thread overview]
Message-ID: <5oir0v$mgu$1@gonzo.sun3.iaf.nl> (raw)
In-Reply-To: dewar.866376446@merv


Robert Dewar <dewar@merv.cs.nyu.edu> wrote:

   However, these days, more and more work is done on multi-processors,
   and then of course you have no choice if you want to distribute
   tasks across processors other than to use the system level
   threads. Furthermore, the efficiency hit from operating these
   threads on separate processors may indeed be significant.

IMO the best solution would be to start X system level threads and
implement a user-level threads package on top of it. Of course
there will be a little extra need for locking, but on platforms
suitable for multi-processing there exist CPU-instructions that
make the implementation of fast locks possible.

The interesting thing of course is that you can vary the number of
system threads to customize the task model to the application. When
N is the number of processors interesting values of X are:
  * 1 to limit the program to use 1 processor and no system context-switching
  * N, to achieve full multi-processing on a multi-processor
  * M, where M > N to simulate a multi-processor with M processors on
    a system with N processors (N = 1 for a uni-processor). 

This scheme could combine the advantages of user-level threads
(fast context switches, fast priority changes and correct Ada
semantics) with those of system-level threads (non-blocking
system-calls and multi-processing).

Regards,
   Geert




  parent reply	other threads:[~1997-06-22  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-06  0:00 Tasking performance between Ada83 and Ada95 Mike Rose
1997-06-07  0:00 ` Robert Dewar
1997-06-08  0:00   ` Edmond Walsh
1997-06-09  0:00     ` Robert Dewar
1997-06-15  0:00       ` Edmond Walsh
1997-06-15  0:00         ` Robert Dewar
1997-06-15  0:00           ` Tom Moran
1997-06-16  0:00           ` Robert A Duff
1997-06-17  0:00             ` Robert Dewar
1997-06-22  0:00           ` Geert Bosch [this message]
1997-06-23  0:00             ` Robert Dewar
1997-06-23  0:00             ` Larry Kilgallen
1997-06-25  0:00               ` Fergus Henderson
1997-06-25  0:00                 ` Larry Kilgallen
1997-06-07  0:00 ` jim hopper
1997-06-07  0:00 ` Robert A Duff
1997-06-08  0:00   ` Robert Dewar
1997-06-10  0:00     ` PascMartin
1997-06-10  0:00       ` Robert Dewar
1997-06-10  0:00     ` Jon S Anthony
replies disabled

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