comp.lang.ada
 help / color / mirror / Atom feed
* Re: GC in Ada
@ 1986-04-04  3:41 Rick Conn
  0 siblings, 0 replies; 49+ messages in thread
From: Rick Conn @ 1986-04-04  3:41 UTC (permalink / raw)


The basic goal of GC is to reclaim space that is no longer needed for
one purpose and allow said space to be used for something else.  For
an application program, this can be done by the opsys, which I believe
is the focus of your message, but it can also be done by the application
itself.  In both cases, the desired effect, viz the utilization of less
space by the application, is achieved.  This is why I feel that the GARBAGE
component is viable ... and it offers a solution now, rather than later.

	Rick
-------

^ permalink raw reply	[flat|nested] 49+ messages in thread
* Re: How come Ada isn't more popular?
@ 2007-01-24 11:06 gautier_niouzes
  2007-01-24 19:25 ` tmoran
  0 siblings, 1 reply; 49+ messages in thread
From: gautier_niouzes @ 2007-01-24 11:06 UTC (permalink / raw)


Jeffrey R. Carter:

> >      Turbo Pascal and other alternatives were already in place and
> >      much cheaper than Ada.   A few brave souls tried to compete
> >      with products such as RR Software's Janus Ada and Meridian's
> >      AdaVantage, but the full environment (e.g., integrated editors,
> >      debuggers, etc.) were not in place they were for Turbo Pascal.
> There's always the question of why, given TP's widespread popularity, C
> became more popular.

It has to do with the deep unportability of Pascal and (consequence)
the fragmentation of Pascal into incompatible dialects. At the time you
had Amiga's, Atari's, Mac's; you had MS Windows coming to replace DOS,
so a DOS-oriented, Pascal dialect had little chance against C, except
for a short time.
TP was an extremely fast compiler producing unoptimized code (except
some trivial XOR AX,AX's), but with the CPU's frequencies quickly up
around 1990, the interest was more targeted to profit from this speed
in the compiled code and less to have a couple millions more of LoC
compiled per second.
...
> Windows 95 was the 1st widely used OS with support for tasking. Ada (95)
> was the only widely available language with support for tasking at the
> time. We probably lost a good opportunity to gain more acceptance of Ada
> by not including a standard windowing library and promoting Ada as the
> best language for taking advantage of Win95's features.

Mmmh I think  it was a good idea *not* to include a standard windowing
library: then now Ada would be stuck with an outdated standard
windowing library. There was also another problem then: the lack of a
good but cheap or free compiler.
Don't be so pessimistic, Ada's quality only appear with time - and of
course with the effort of brave souls.
If you say "I'm a smart software engineer, Ada is for me and not for
you", you won't help Ada.
If you make good, visible, useful open-source software with Ada, you
will help.
______________________________________________________________
Gautier         -- http://www.mysunrise.ch/users/gdm/index.htm
Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!




^ permalink raw reply	[flat|nested] 49+ messages in thread
* GC in Ada
@ 1986-04-02 17:50 Stavros Macrakis
  0 siblings, 0 replies; 49+ messages in thread
From: Stavros Macrakis @ 1986-04-02 17:50 UTC (permalink / raw)


`Garbage collection' (GC) has been used in more than one sense in
this discussion.  Several contributors equate GC with `storage
reclamation'.  This is misleading.  The essence of GC is finding free
space by determining what access objects remain in use.

GC is a particular type of automatic storage reclamation -- reference
counting, e.g., is another.  And explicit deallocation or deallocation
of stack frames at scope exit time is simply not automatic storage
reclamation.  Neither is deallocating an entire collection at the exit
of the scope declaring the type.  All of these are useful techniques,
but they are not GC.  GC has different advantages and disadvantages
than each of these other methods.

It is not possible to write a garbage collector within Ada (unless, of
course, you have hooks into the implementation).  It is not even
possible to define a private type which reclaims its own space within
Ada.  The essential problem is that there is no way of determining the
``immediately accessible nodes'' in Knuth's ("Art") terminology, i.e.
the variables containing access values.  It would be possible to
define a limited type that used GC or ref counting if there were a
finalization operation (see Schwarz&Melliar-Smith, ``The Finalization
Operation for Abstract Types'' ICSE/5, p273).

For a discussion of issues relating to GC implementation in an
Ada-like environment, see Susan Owicki, ``Making the World Safe for
GC'' in POPL/8, p77.

The term `Garbage collection' has had a precise meaning for over
twenty years.  Here are some citations:

J.McCarthy et al, "Lisp 1.5 Programmer's Manual" (2nd ed, 1965) p105:
   garbage collector: The routine in LISP which identifies all active
   list structure by tracing it from fixed base cells and marking it,
   and then collects all unneeded cells (garbage) into a free-storage
   list so that these words can be used again.

Knuth, "Art" (1st ed, 1968), sec 2.5B p438:
   ...a policy of simply doing nothing until space runs out, then
   searching for all the areas currently in use and fashioning a
   new AVAIL list.

Aho&Ullman, "Principles of Compiler Design" (1st ed, 1977) p44:
   A garbage collection scans all records, determining which are in
   use, and making an <available space list> of those which may be
   reused.

Note that "garbage collection" has been used in many systems other than
Lisp with the same meaning: Snobol, ECL, MIT Teco (!), ....

	-s


ICSE = Intl. Conf. on Software Engineering
POPL = Principles of Programming Languages (Conf.)

^ permalink raw reply	[flat|nested] 49+ messages in thread
* Re: GC in Ada
@ 1986-04-02  3:02 Rick Conn
  0 siblings, 0 replies; 49+ messages in thread
From: Rick Conn @ 1986-04-02  3:02 UTC (permalink / raw)



	There is a simple garbage collector written in Ada in the
repository in PD:<ADA.COMPONENTS>GARBAGE*.*; data:

%4 Garbage_Collection

Author       : Doug Bryan
             : Computer Systems Lab
             : Stanford University

Machine/System Compiled/Run on :
  Data General MV/10000 running the Ada Development Environment 2.2

Keywords     : MEMORY, GARBAGE, GARBAGE COLLECTION

Abstract     :
 This is a generic garbage collector.  It simply maintains an internal
linked list of items which have been freed then reuses these items when more
are needed.

-------

^ permalink raw reply	[flat|nested] 49+ messages in thread
* GC in Ada
@ 1986-04-01 22:00 Stavros Macrakis
  0 siblings, 0 replies; 49+ messages in thread
From: Stavros Macrakis @ 1986-04-01 22:00 UTC (permalink / raw)


A few weeks ago, there was a query about garbage collection in Ada.
I've assembled a few notes on the subject.

Several Ada systems appear to have garbage collectors (GC) in
development environments (e.g. Rational, Symbolics).  As far as I have
been able to ascertain, no production Ada environment provides garbage
collection in the target computer.

The usual argument is that embedded applications shouldn't GC, because
GC is inefficient and episodic.  This is spurious for several reasons:

 1. Prototypes and early development versions may prefer to sacrifice
    efficiency for simplicity and speed of programming.

 2. Many Ada applications will in fact not be embedded.

 3. If you have GC, it is very easy to add a capability to detect and
    report undeallocated objects and dangling pointers.

 4. Embedded applications may even want GC.  Traditional episodic GC
    will do for some; others will need real-time GC algorithms.

 5. GC may not be as expensive as is thought, especially if currently
    known advanced implementation techniques are used.

 6. Given Ada's typing, scoping, and tasking, much processing can
    continue even during episodic GC.

However, implementing a GC for Ada is not entirely trivial.  Although
Ada's semantics certainly allow GC, some compiler-writers may have
chosen runtime models which make it impractical or impossible.  Not
only must pointers in memory be traceable, but transient `hazards'
must be avoided.  The conditions are even more stringent for
relocating/compacting GC, of course.

The only current compilers I know the internals of, the Intermetrics
Byron Ada compiler family, have their runtime model carefully designed
to in fact make GC practical.  However, no customer so far has
specified GC.  I'm sure Intermetrics would be happy to sell a GC
option as soon as the market demand became sufficient.

	-s

	Stavros Macrakis
	Harvard Univ. and Intermetrics, Inc.

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2007-02-15 17:14 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1986-04-04  3:41 GC in Ada Rick Conn
  -- strict thread matches above, loose matches on Subject: below --
2007-01-24 11:06 How come Ada isn't more popular? gautier_niouzes
2007-01-24 19:25 ` tmoran
2007-01-25  4:46   ` Gautier
2007-01-25  9:29     ` Markus E Leypold
2007-01-27 16:59       ` Stephen Leake
2007-01-27 20:40         ` Markus E Leypold
2007-01-29  8:56           ` Maciej Sobczak
2007-01-29 14:21             ` Markus E Leypold
2007-01-31  9:23               ` Maciej Sobczak
2007-01-31 10:24                 ` Markus E Leypold
2007-02-02  8:42                   ` Maciej Sobczak
2007-02-02 13:57                     ` Markus E Leypold
2007-02-05  9:59                       ` Maciej Sobczak
2007-02-05 13:43                         ` Markus E Leypold
2007-02-06  9:15                           ` Maciej Sobczak
2007-02-06 11:45                             ` Markus E Leypold
2007-02-06 14:16                               ` Maciej Sobczak
2007-02-06 15:44                                 ` Markus E Leypold
2007-02-07  8:55                                   ` Maciej Sobczak
2007-02-07  9:30                                     ` GC in Ada Martin Krischik
2007-02-07 11:08                                       ` Markus E Leypold
2007-02-07 11:15                                       ` Maciej Sobczak
2007-02-07 11:53                                         ` Martin Krischik
2007-02-07 12:22                                           ` Markus E Leypold
2007-02-08  7:26                                             ` Martin Krischik
2007-02-08  9:33                                               ` Markus E Leypold
2007-02-09 13:37                                                 ` Martin Krischik
2007-02-09 13:47                                                 ` Georg Bauhaus
2007-02-09 15:29                                                   ` Maciej Sobczak
2007-02-09 20:52                                                     ` Georg Bauhaus
2007-02-08  7:48                                           ` Maciej Sobczak
2007-02-08  8:20                                             ` Martin Krischik
2007-02-08  8:43                                             ` Markus E Leypold
2007-02-09 14:20                                               ` Maciej Sobczak
2007-02-09 16:23                                                 ` Markus E Leypold
2007-02-12  8:52                                                   ` Maciej Sobczak
2007-02-12 12:56                                                     ` Markus E Leypold
2007-02-08 18:24                                             ` Jeffrey R. Carter
2007-02-09  8:57                                               ` Jean-Pierre Rosen
2007-02-09 12:57                                                 ` Robert A Duff
2007-02-09 14:44                                                   ` Jean-Pierre Rosen
2007-02-10 13:38                                                     ` Robert A Duff
2007-02-12  8:47                                                       ` Jean-Pierre Rosen
2007-02-12 15:31                                                         ` Jeffrey R. Carter
2007-02-09 18:35                                                 ` Jeffrey R. Carter
2007-02-10 19:01                                                   ` Martin Krischik
2007-02-11 15:22                                                   ` Pascal Obry
2007-02-11 20:30                                                     ` Jeffrey R. Carter
2007-02-13 18:47                                                       ` Pascal Obry
2007-02-13 23:08                                                         ` Jeffrey R. Carter
2007-02-14 11:13                                                           ` Jean-Pierre Rosen
2007-02-14 16:29                                                             ` Jeffrey R. Carter
2007-02-14 19:47                                                           ` Robert A Duff
2007-02-14 11:10                                                         ` Jean-Pierre Rosen
2007-02-14 16:29                                                           ` Jeffrey R. Carter
2007-02-15  8:39                                                             ` Jean-Pierre Rosen
2007-02-15 17:14                                                               ` Jeffrey R. Carter
2007-02-08 18:38                                           ` Dmitry A. Kazakov
2007-02-09  7:58                                             ` Maciej Sobczak
2007-02-09 10:07                                             ` Martin Krischik
2007-02-09 14:10                                               ` Dmitry A. Kazakov
2007-02-07 12:19                                         ` Markus E Leypold
2007-02-08  7:54                                           ` Maciej Sobczak
2007-02-08  9:49                                             ` Markus E Leypold
1986-04-02 17:50 Stavros Macrakis
1986-04-02  3:02 Rick Conn
1986-04-01 22:00 Stavros Macrakis

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