Re: what ML language do you recommend?



On Tue, 23 Aug 2005 00:30:46 GMT, David Hopwood
<david.nospam.hopwood@xxxxxxxxxxxxxxxx> wrote:

>George Neuner wrote:
>> On 21 Aug 2005 16:46:49 -0700, Paul Rubin wrote:
>>
>>>I think the definition of realtime is just that the gc never imposes
>>>latency greater than some fixed x on any allocation. It's ok to stop
>>>all the threads as long as the duration of stoppage is less than x.
>>
>> That's a wonderful textbook definition which is mostly meaningless in
>> practice. In reality, "realtime" is defined by the constraints on an
>> application in situ.
>>
>> AFAIK, there are no commercially available GC'd systems that can even
>> achieve microsecond pause times on OTS hardware ... never mind perform
>> on hardware that is behind state of the art. That excludes a large
>> number of applications from receiving the benefits of GC.
>
>What proportion of realtime systems need microsecond pause times
>*for all threads*? In my experience [*], realtime systems generally
>need short pause times for some threads, but those threads have memory
>allocation patterns that are less dynamic and would benefit from GC
>much less than the rest of the application.

In general I agree with your assessment of division of labor. The
difficulty is that centralized GC systems halt all threads while
handling the roots, and per thread local GC systems still synchronize
for collection of the global heap. Murphy guarantees that it will
happen at the wrong time.

Whatever the system, you need the guarantee that the thread that can't
be delayed isn't - under any circumstances. As yet I haven't found
any GC system that can make such guarantees on a reasonable RT time
scale.

Remember as you read this that a lot of systems can't cost justify
using GHz processors, streaming caches and FDRAM. A useful metric for
an RTGS would be to work acceptably on the equivalent of an 80186 or a
68010.

The system developed at Bell labs that I mentioned in an earlier post
seems promising with respect to HRT time constraints, but it suffers
variable delays in reclaiming memory and so it needs an enormous heap
relative to the working set to guarantee availability.

When I first heard about it, I played with adapting it to my own toy
Scheme and to a statically typed RT scripting language I had
developed. I made it work with a single mutator but I never got it
working with multiple mutators and it never performed well enough IMO
for RT use in any case. However I was only working on it part time
and eventually I was distracted by other things.


>[*] My experience is generally with hard real-time embedded control
> systems with relatively long deadlines (milliseconds, not microseconds).
> However, I would be surprised if real-time systems that are either
> "softer" (less important to meet the deadline) or that have shorter
> deadlines are different in this particular respect.


So was mine. I did some device work but for the most part I worked on
HRT vision quality systems that had typical deadlines measured in 100s
of milliseconds - but did a sh*tload of work, just barely, in those
milliseconds. Image capture, though, had to start within 1ms for
continuous conveyor systems. Even with indexed conveyors the parts
are typically stopped and stable only for a few camera frames
(50-100ms) so there can't be any delay if you need multiple captures.

The applications handled multiple cameras simultaneously and used
pipelined threads for capture, analysis, display and logging. There
was considerable dynamic allocation used to manage variably sized
result sets along the critical paths. Some systems were deployed on
multiprocessors and all were written to run unchanged on either single
or multiple processors.

[That raises another point - multiprocessors. There aren't many
multiprocessor GCs, never mind multiprocessor RTGCs.]

This was all done in C++ and many times I wished for an RTGC. At one
point I did experiments with some version of the Boehm-Demer-Weiser
library but found it had some wierd, unpredictable delays and I wasn't
confident that I could guarantee program response under all
circumstances using it.

George
--
for email reply remove "/" from address
.



Relevant Pages

  • Re: How to use Delete in right way
    ... > in which case you should get an access violation at the time of ... If the allocation goes through CRT malloc/new/etc, ... granularity of 16 bytes hides these problems from PageHeap completely, ... unless the length of the block is multiple of 16. ...
    (microsoft.public.vc.debugger)
  • Re: how much does free free?
    ... Free does not free the same amount of memory as the size of the malloc ... free must release a multiple of 4 or 8 ... might ask this question is to find out what the system overhead ... allocated by the call to an allocation function, calloc, ...
    (comp.lang.c)
  • Re: returning multiple values vs a list
    ... > return a list and let callers use DESTRUCTURING-BIND. ... > wanted only the primary value then multiple values would be the way to ... Multiple values can be implemented without heap allocation; ...
    (comp.lang.lisp)
  • Re: what ML language do you recommend?
    ... In my experience, realtime systems generally ... need short pause times for some threads, but those threads have memory ... allocation patterns that are less dynamic and would benefit from GC ... I would be surprised if real-time systems that are either "softer" or that have shorter deadlines are different in this particular respect. ...
    (comp.lang.functional)