From kragen@dnaco.net Thu Sep 10 16:57:01 1998
Date: Thu, 10 Sep 1998 16:56:58 -0400 (EDT)
From: Kragen <kragen@dnaco.net>
To: "Bradley M. Kuhn" <bkuhn@ebb.org>
cc: clug-user@clug.org
Subject: Re: life depending on code
In-Reply-To: <19980910151558.E12424@ebb.org>
Message-ID: <Pine.SUN.3.96.980910164313.16247m-100000@picard.dnaco.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Keywords:
X-UID: 1811
Status: O
X-Status: 

On Thu, 10 Sep 1998, Bradley M. Kuhn wrote:
> Thus spoke Kragen:
> > On Thu, 10 Sep 1998, Bradley M. Kuhn wrote:
> > > This brings up a inconsistent speed problem.  I don't want my life critical
> > > application to stop and print "Garbage Collecting...................done"
> > > while I wait 6 seconds.  :(
> > 
> > . . ., garbage collection doesn't necessarily
> > have to stop the world.
> 
> Oh, yeah.  Sorry, I forgot.  You tell me so much stuff I don't know, some of
> it doesn't stick. :)
> 
> Anyway, do the newer garbage collectors *guarantee* that they won't "stop the
> world".

Yes, there are some that have soft real-time guarantees (no pauses over
so many milliseconds).  But even ordinary incremental garbage
collectors don't pause the way simple stop-the-world ones do.

I think hard-real-time guarantees (no pauses over so many microseconds)
generally require special garbage-collecting hardware.

> > > > I think C with garbage collection and bounded pointers is theoretically as
> > > > safe as any other language.
> > > 
> > > I don't know...
> > 
> > What other "safety" do you want?
> 
> The problem that concerns me is that the language allows people to bypass
> the mechanisms you have set up---in fact such stuff is easy in C.

Well, with garbage collection, that's true, but who cares?  Nobody's
going to deliberately hide their pointers if they know it's going to
sporadically make their program crash, even under normal
circumstances.  And nobody's going to deliberately keep their pointers
around to keep the garbage collector from deleting what they point to
so as to cause a memory leak.

With bounded pointers, it may not be true, but I suspect it will be, if
only for backward compatibility -- if it weren't true, you wouldn't be
able to call or be called by C code that wasn't built with bounded
pointers.  But you might have to call C code not built with bounded
pointers to "unbound" your pointers.  But why would you want to?  It
wouldn't save you any execution time, unless you actually did work in
the "unbounded" code.

Kragen

-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
I don't do .INI, .BAT, .DLL or .SYS files. I don't assign apps to files. I 
don't configure peripherals or networks before using them. I have a computer 
to do all that. I have a Macintosh, not a hobby. -- Fritz Anderson


