comp.lang.ada
 help / color / mirror / Atom feed
From: heatwole@his.com (Kevin D. Heatwole)
Subject: Re: Unbounded strings (Was: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation))
Date: 1996/11/26
Date: 1996-11-26T00:00:00+00:00	[thread overview]
Message-ID: <heatwole-ya023180002611960850350001@news.his.com> (raw)
In-Reply-To: E1FnJC.HI4@world.std.com


In article <E1FnJC.HI4@world.std.com>, bobduff@world.std.com (Robert A
Duff) wrote:

>In article <heatwole-ya023180002511960851580001@news.his.com>,
>Kevin D. Heatwole <heatwole@his.com> wrote:
>>Is it really that much harder to provide an efficient ref-counted tasking safe
>>implementation of unbounded strings than it is to provide an efficient tasking
>>safe allocator?
>
>Two points:
>
>You can make "new" efficient by having per-task pools of memory.
>Allocate each task 4K (say) and use that for "new".  And if it runs out,
>allocate some more from a global pool.  Or steal some from another task.
>This will reduce the probability of lock contention.

I suspect that even this approach would have some difficulties involving
pool-specific (or global) locks.  While task A may allocate the storage
out of its per-task pool of memory, task B may be the task that deallocates
the memory later.  If you have two threads mucking about with the same
pool of memory, you will need to implement some form of serialization.

Of course, as you point out, garbage collection techniques might help to
make the usual case efficient but this has its drawbacks (and still might
not reduce/eliminate the need for locking).

Also, note that getting the identity of the currently executing task may be
inefficient as well.  On our target, AIX for the PowerPC, getting the identity
of the current thread involves an AIX call to pthread_self.  Since there is
no thread-specific memory, this call is implemented as a search of a thread
id table using the current stack pointer with appropriate locking (boy, is this 
slow!).  We have chosen to reserve a register to point to thread-specific 
memory to alleviate this problem, but this makes C calling Ada slower 
because it needs to call pthread_self to setup this register.

>OK, here's a third point:  All this talk about inefficient locks is
>based on the assumption that each Ada task is mapped to a single OS
>thread.  If you're willing to give up the benefits of that (on, say,
>Windows 95), then it's not hard to do very efficient locking.

Why is this true?  Is it because on most OSes, OS calls are inherently
expensive?
I would think that if the OS wanted to make this efficient and it was a
priority for the users, the lock calls could be just as efficient (whether done
by the OS or done by the Ada runtime).  Anyway, I suspect that now that
many OSes are becoming multi-threaded and with the more common use of
multiple processors (even in the PC world), that the OSes will become more
friendly and efficient for us Ada compiler implementors.  The OSes are finally
catching up with Ada!

Kevin Heatwole
OC Systems, Inc.





  reply	other threads:[~1996-11-26  0:00 UTC|newest]

Thread overview: 252+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-08  0:00 Once again, Ada absent from DoD SBIR solicitation Gregory Aharonian
1996-10-08  0:00 ` Gandalf
1996-10-09  0:00 ` Bill Nielsen
1996-10-09  0:00   ` Stanley R. Allen
1996-10-09  0:00     ` C++ Standardization (was: Once again, Ada absent from DoD SBIR solicitation) David Shochat
1996-10-10  0:00       ` Robert Dewar
1996-10-10  0:00         ` David Shochat
1996-10-20  0:00           ` Richard Riehle
1996-10-20  0:00             ` nasser
1996-10-21  0:00               ` Shayne Flint
1996-10-21  0:00                 ` Robert A Duff
1996-10-21  0:00                   ` Robert Dewar
1996-10-22  0:00                   ` Shayne Flint
1996-10-22  0:00                     ` Robert A Duff
1996-10-22  0:00                   ` Ken Garlington
1996-10-22  0:00               ` Rush Kester
1996-10-11  0:00         ` Ed Falis
1996-10-11  0:00           ` Robert Dewar
1996-10-12  0:00             ` Kevin D. Heatwole
1996-10-12  0:00               ` Robert Dewar
1996-10-13  0:00                 ` Larry Kilgallen
1996-10-13  0:00             ` Ed Falis
1996-10-11  0:00       ` Dave Wood
1996-10-11  0:00         ` Dave Wood
1996-10-17  0:00         ` Garbage Collection in Ada Thomas Kendelbacher
1996-10-10  0:00     ` Once again, Ada absent from DoD SBIR solicitation Mitch Gart
1996-10-10  0:00       ` Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Brian Rogoff
1996-10-10  0:00         ` Dave
1996-10-11  0:00           ` Robert Dewar
1996-10-12  0:00             ` davedave
1996-10-12  0:00               ` Robert Dewar
1996-10-13  0:00               ` Larry Kilgallen
1996-10-11  0:00           ` Stephen Leake
1996-10-11  0:00             ` Dave
1996-10-11  0:00               ` Robert Dewar
1996-10-12  0:00                 ` Dave
1996-10-12  0:00                   ` Robert Dewar
1996-10-14  0:00                   ` Keith Thompson
1996-10-11  0:00           ` Tucker Taft
1996-10-14  0:00             ` Brian Rogoff
1996-10-15  0:00               ` Mitch Gart
1996-10-15  0:00                 ` Larry Kilgallen
1996-10-15  0:00                   ` Mark A Biggar
1996-10-16  0:00                 ` Brian Rogoff
1996-10-28  0:00                 ` Kenneth Almquist
1996-10-29  0:00                   ` Invoking parental methods (was: Java vs Ada 95) Larry Kilgallen
1996-10-31  0:00                     ` Kenneth Almquist
1996-10-31  0:00                       ` Larry Kilgallen
1996-11-05  0:00                         ` Mitch Gart
1996-11-05  0:00                           ` Larry Kilgallen
1996-11-09  0:00                             ` Joel VanLaven
1996-11-05  0:00                           ` Tucker Taft
1996-11-05  0:00                             ` Larry Kilgallen
1996-11-06  0:00                               ` Robert A Duff
1996-11-06  0:00                                 ` Larry Kilgallen
1996-11-06  0:00                             ` Robert I. Eachus
1996-11-07  0:00                               ` David Wheeler
1996-11-06  0:00                             ` Mitch Gart
1996-11-08  0:00                             ` Jon S Anthony
1996-11-08  0:00                             ` Robert I. Eachus
1996-10-15  0:00               ` Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Mike Stark
1996-10-15  0:00                 ` Robert Dewar
1996-10-16  0:00                   ` Mike Stark
1996-10-17  0:00                     ` Robert A Duff
1996-10-17  0:00                 ` Why no Propagates? Matthew Heaney
1996-10-18  0:00                   ` Robert Dewar
1996-10-18  0:00                   ` Norman H. Cohen
1996-10-18  0:00                     ` Robert Dewar
1996-10-18  0:00                   ` Robert A Duff
1996-10-15  0:00               ` Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Robert A Duff
1996-10-15  0:00                 ` Robert Dewar
1996-10-15  0:00                 ` Portability of Arithmetic (was: Java vs Ada 95) Larry Kilgallen
1996-10-16  0:00                   ` Robert A Duff
1996-10-16  0:00                     ` Robert Dewar
1996-10-17  0:00                       ` Robert A Duff
1996-10-17  0:00                         ` Larry Kilgallen
1996-10-18  0:00                           ` Robert A Duff
1996-10-17  0:00                         ` Robert Dewar
1996-10-18  0:00                           ` Norman H. Cohen
1996-10-18  0:00                             ` Robert Dewar
1996-10-18  0:00                               ` Brian R. Hanson
1996-10-19  0:00                                 ` Robert Dewar
1996-10-19  0:00                                   ` Larry Kilgallen
1996-10-22  0:00                                     ` Once again, Ada absent from DoD SBIR solicitation Dale Stanbrough
1996-10-27  0:00                                       ` Robert Dewar
1996-10-21  0:00                                   ` Portability of Arithmetic (was: Java vs Ada 95) Norman H. Cohen
1996-10-21  0:00                                     ` Robert Dewar
1996-10-21  0:00                               ` Lance Kibblewhite
1996-10-21  0:00                               ` Norman H. Cohen
1996-10-21  0:00                                 ` Robert Dewar
1996-10-22  0:00                                   ` Larry Kilgallen
1996-10-23  0:00                                     ` Robert Dewar
1996-10-23  0:00                                       ` Larry Kilgallen
1996-10-23  0:00                                   ` Norman H. Cohen
1996-10-18  0:00                           ` Larry Kilgallen
1996-10-18  0:00                             ` Robert A Duff
1996-10-17  0:00                     ` Stephen Leake
1996-10-17  0:00                       ` Robert A Duff
1996-10-17  0:00                         ` Robert Dewar
1996-10-17  0:00                         ` Larry Kilgallen
1996-10-18  0:00                           ` Robert A Duff
1996-10-17  0:00                 ` Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Alan Brain
1996-10-17  0:00                   ` Robert Dewar
1996-10-17  0:00                   ` Robert A Duff
1996-10-18  0:00                   ` Keith Thompson
1996-10-20  0:00                     ` Alan Brain
1996-10-24  0:00                 ` Robert I. Eachus
1996-10-16  0:00             ` Jon S Anthony
1996-10-16  0:00             ` Brian Rogoff
1996-10-16  0:00             ` Brian Rogoff
1996-10-16  0:00               ` Robert Dewar
1996-10-17  0:00                 ` Robert A Duff
1996-10-17  0:00                   ` Robert Dewar
1996-11-22  0:00                 ` Van Snyder
1996-11-25  0:00                   ` Java vs Ada vs Inferno, floating point arithmetic Anssi Porttikivi
1996-10-18  0:00           ` Why no Propagates? Michel Gauthier
1996-10-22  0:00             ` Richard A. O'Keefe
1996-10-23  0:00           ` Michel Gauthier
1996-10-11  0:00         ` Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Mitch Gart
1996-10-11  0:00       ` Jon S Anthony
1996-10-12  0:00         ` Robert Dewar
1996-10-14  0:00           ` Brian R. Hanson
1996-10-14  0:00           ` Mitch Gart
1996-10-14  0:00         ` Keith Thompson
1996-10-15  0:00           ` Dale Stanbrough
1996-10-15  0:00             ` Brian R. Hanson
1996-10-20  0:00           ` nasser
1996-10-11  0:00       ` Jon S Anthony
1996-10-12  0:00       ` davedave
1996-10-12  0:00         ` Robert Dewar
1996-10-16  0:00           ` Jon S Anthony
1996-10-16  0:00           ` Jon S Anthony
1996-10-14  0:00       ` Jon S Anthony
1996-10-14  0:00       ` Jon S Anthony
1996-10-14  0:00       ` Jon S Anthony
1996-10-14  0:00         ` Robert Dewar
1996-10-15  0:00           ` Robert A Duff
1996-10-15  0:00             ` Larry Kilgallen
1996-10-16  0:00               ` Lars Farm
1996-10-16  0:00                 ` Robert Dewar
1996-10-17  0:00           ` Why no Free? Matthew Heaney
1996-10-18  0:00             ` Robert A Duff
1996-10-18  0:00             ` Robert Dewar
1996-10-18  0:00             ` John Herro
1996-10-19  0:00               ` John Herro
1996-10-14  0:00       ` Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Jon S Anthony
1996-10-14  0:00       ` Brian Rogoff
1996-10-15  0:00       ` Robert I. Eachus
1996-10-15  0:00       ` Brian Rogoff
1996-10-15  0:00       ` Robert I. Eachus
1996-10-15  0:00         ` Robert Dewar
1996-10-16  0:00       ` Jon S Anthony
1996-10-16  0:00       ` Jon S Anthony
1996-10-18  0:00         ` Keith Thompson
1996-10-16  0:00       ` Jon S Anthony
1996-10-17  0:00         ` Robert Dewar
1996-10-17  0:00         ` Robert Dewar
1996-10-16  0:00       ` Samuel T. Harris
1996-10-16  0:00       ` Jon S Anthony
1996-10-16  0:00       ` Jon S Anthony
1996-10-18  0:00       ` Jon S Anthony
1996-10-18  0:00       ` Jon S Anthony
1996-10-18  0:00       ` Jon S Anthony
1996-10-29  0:00       ` Robert I. Eachus
1996-10-29  0:00       ` Jon S Anthony
1996-10-29  0:00       ` Kenneth Almquist
1996-10-29  0:00         ` Robert Dewar
1996-10-31  0:00           ` Kenneth Almquist
1996-10-30  0:00       ` Stephen Leake
1996-10-31  0:00         ` Lars Farm
1996-10-31  0:00       ` Jon S Anthony
1996-10-31  0:00       ` Kenneth Almquist
1996-11-01  0:00       ` Robert I. Eachus
1996-11-01  0:00         ` Robert A Duff
     [not found]           ` <55gkch$gg6@fozzie.sun3.iaf.nl>
1996-11-03  0:00             ` Robert A Duff
1996-11-03  0:00               ` Robert Dewar
1996-11-04  0:00                 ` Larry Kilgallen
1996-11-04  0:00                   ` Robert Dewar
1996-11-05  0:00                 ` Fast locking (Was Re: Java vs Ada 95) Geert Bosch
1996-11-06  0:00                   ` Larry Kilgallen
1996-11-06  0:00                     ` Geert Bosch
1996-11-07  0:00                       ` Larry Kilgallen
1996-11-07  0:00                         ` Robert Dewar
1996-11-11  0:00                           ` Norman H. Cohen
1996-11-08  0:00                         ` Geert Bosch
1996-11-06  0:00                     ` Robert Dewar
1996-11-02  0:00         ` Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Robert Dewar
1996-11-04  0:00         ` Robert I. Eachus
1996-11-05  0:00           ` Larry Kilgallen
1996-11-14  0:00           ` Robert Dewar
1996-11-16  0:00             ` Robert A Duff
1996-11-16  0:00               ` Robert Dewar
1996-11-17  0:00                 ` Unbounded strings (Was: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation)) Robert A Duff
1996-11-18  0:00                   ` Robert Dewar
1996-11-19  0:00                     ` Joel VanLaven
1996-11-23  0:00                       ` Robert Dewar
1996-11-19  0:00                     ` Robert A Duff
1996-11-23  0:00                       ` Robert Dewar
1996-11-24  0:00                         ` Robert A Duff
1996-11-25  0:00                         ` Norman H. Cohen
1996-11-27  0:00                           ` Robert Dewar
1996-11-21  0:00                   ` Robert I. Eachus
1996-11-24  0:00                     ` Robert Dewar
1996-11-24  0:00                       ` Fergus Henderson
1996-11-24  0:00                         ` Robert Dewar
1996-11-25  0:00                       ` Kevin D. Heatwole
1996-11-25  0:00                         ` Robert A Duff
1996-11-26  0:00                           ` Kevin D. Heatwole [this message]
1996-11-26  0:00                             ` Robert A Duff
1996-11-26  0:00                               ` Larry Kilgallen
1996-11-27  0:00                               ` Robert Dewar
1996-11-27  0:00                               ` Norman H. Cohen
1996-11-29  0:00                                 ` Fergus Henderson
1996-11-29  0:00                                 ` Robert A Duff
1996-11-26  0:00                         ` Geert Bosch
1996-11-26  0:00                           ` Robert Dewar
1996-11-25  0:00                   ` Robert I. Eachus
1996-11-20  0:00                 ` Jon S Anthony
1996-11-24  0:00                   ` Robert Dewar
1996-11-16  0:00             ` Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Geert Bosch
1996-11-17  0:00               ` Robert Dewar
1996-11-17  0:00                 ` Robert A Duff
1996-11-18  0:00                   ` Robert Dewar
1996-11-19  0:00                     ` Robert A Duff
1996-11-18  0:00                 ` Geert Bosch
1996-11-22  0:00                   ` Robert Dewar
1996-11-18  0:00                 ` Norman H. Cohen
1996-11-06  0:00         ` Robert I. Eachus
1996-10-10  0:00     ` Once again, Ada absent from DoD SBIR solicitation Mike Stark
1996-10-10  0:00       ` Stanley R. Allen
1996-10-11  0:00         ` Mitch Gart
1996-10-11  0:00           ` Ken Garlington
1996-10-11  0:00           ` Robert Dewar
1996-10-14  0:00             ` Mitch Gart
1996-10-14  0:00               ` Ken Garlington
1996-10-14  0:00           ` Norman H. Cohen
1996-10-14  0:00             ` Bevin R. Brett
1996-10-11  0:00     ` Ada and the DoD HLA (was: Once again, Ada absent from DoD SBIR solicitation) John Cosby
1996-10-13  0:00     ` Java vs Ada 95 (Was " Hannes Haug
1996-11-03  0:00     ` Hannes Haug
1996-11-06  0:00     ` Fast locking (Was Re: Java vs Ada 95) Hannes Haug
1996-11-06  0:00     ` Hannes Haug
1996-10-11  0:00   ` Once again, Ada absent from DoD SBIR solicitation Matthew M. Lih
1996-10-18  0:00     ` Rush Kester
1996-10-21  0:00   ` C++ Standardization (was: Once again, Ada absent from DoD SBIR solicitation) David Emery
1996-10-10  0:00 ` Jon S Anthony
1996-10-11  0:00 ` Jon S Anthony
1996-10-22  0:00 ` Tarjei Jensen
1996-10-22  0:00   ` C++ Standardization (was: Once again, Ian Ward
1996-11-01  0:00 ` Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Jon S Anthony
  -- strict thread matches above, loose matches on Subject: below --
1996-11-25  0:00 Unbounded strings (Was: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation)) Franco Mazzanti
1996-11-25  0:00 ` Robert A Duff
replies disabled

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