Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #24583

Re: Are Computer able to think?

From Bernd Paysan <bernd.paysan@gmx.de>
Newsgroups comp.lang.forth
Subject Re: Are Computer able to think?
Date 2013-07-19 01:08 +0200
Organization 1&1 Internet AG
Message-ID <ks9si3$8rl$1@online.de> (permalink)
References (14 earlier) <6dc92917-11d0-4990-bd26-a592ad620540@googlegroups.com> <fKednX9mNstAg3XMnZ2dnUVZ_jydnZ2d@supernews.com> <51e847cb$0$15878$e4fe514c@news2.news.xs4all.nl> <ks9nmr$41a$2@online.de> <uKKdnfijg8Bm83XMnZ2dnUVZ_iydnZ2d@supernews.com>

Show all headers | View raw


Andrew Haley wrote:
> Not really.  Even with reference counting, dynamic memory allocation
> is problematic in hard real-time systems because of fragmentation.
> Garbage collection tracks object liveness and can run concurrently
> with the real-time system.  It doesn't have to have a stop-the-world
> compaction phase any more than reference counting does.

Even concurrent GCs need to stop the system e.g. for a stack scan.  But at 
least not for that long.  Sub-ms is reachable; but if that is good enough 
depends on the hardness of the real-time.  The concurrent GCs I know need 
additional operations for pointer stores like marking the touched object as 
"gray" (needs to be re-scanned), which means you need to change ! or have a 
special pointer variant of !.

The question of "concurrent" GCs is also "how concurrent".  bigForth has a 
concurrent memory compactor to avoid the fragmentation problem (not a full 
GC, it just moves objects with dangling pointers around to allow for a 
simple constant time allocation strategy).  Each move of an object from the 
start to the end of the compator bubble has to be an atomic operation - 
which is quite easy in the traditional Forth multitasker bigForth uses.  And 
that's true for GCs that do defragmentation one way or another - they have 
to move objects, which needs to be atomic.  Conservative GCs don't move 
objects, so they suffer from fragmentation.  The advantage of conservative 
GCs is that the program itself runs fastest, and the GC itself is a batch 
operation which also is pretty fast - but it stops the entire program, which 
is often not practicable.

I prefer to have my hard real-time code not to do allocation an deallocation 
at all, which is of course the "Forth" solution to the problem: Redefine 
your problem until it goes away.  That way, you can have your GC in the non-
realtime part of the program, and the real-time code gets pre-allocated 
memory with fixed locations.  You have to keep the real-time code simple, 
anyways.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Are Computer able to think? visualforth@rocketmail.com - 2013-07-12 06:18 -0700
  Re: Are Computer able to think? Alex McDonald <blog@rivadpm.com> - 2013-07-12 07:42 -0700
  Re: Are Computer able to think? Jason Damisch <jasondamisch@yahoo.com> - 2013-07-12 12:33 -0700
    Re: Are Computer able to think? Jason Damisch <jasondamisch@yahoo.com> - 2013-07-12 12:46 -0700
      Re: Are Computer able to think? Brad Eckert <hwfwguy@gmail.com> - 2013-07-12 14:28 -0700
        Re: Are Computer able to think? Jason Damisch <jasondamisch@yahoo.com> - 2013-07-12 14:50 -0700
          Re: Are Computer able to think? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-07-18 11:36 +0000
            Re: Are Computer able to think? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-18 07:31 -0500
              Re: Are Computer able to think? Bernd Paysan <bernd.paysan@gmx.de> - 2013-07-18 23:41 +0200
  Re: Are Computer able to think? Bernd Paysan <bernd.paysan@gmx.de> - 2013-07-13 02:52 +0200
    Re: Are Computer able to think? hughaguilar96@yahoo.com - 2013-07-12 20:06 -0700
      Re: Are Computer able to think? Bernd Paysan <bernd.paysan@gmx.de> - 2013-07-13 14:34 +0200
        Re: Are Computer able to think? hughaguilar96@yahoo.com - 2013-07-13 19:54 -0700
          Re: Are Computer able to think? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-07-14 11:32 +0000
            Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-14 11:46 -0700
          Re: Are Computer able to think? hughaguilar96@yahoo.com - 2013-07-14 21:57 -0700
    Re: Are Computer able to think? hughaguilar96@yahoo.com - 2013-07-12 20:44 -0700
      Re: Are Computer able to think? Bernd Paysan <bernd.paysan@gmx.de> - 2013-07-13 14:37 +0200
  Re: Are Computer able to think? hughaguilar96@yahoo.com - 2013-07-12 20:08 -0700
  Re: Are Computer able to think? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-13 01:44 -0500
    Re: Are Computer able to think? Hans Bezemer <the.beez.speaks@gmail.com> - 2013-07-13 22:25 +0200
  Re: Are Computer able to think? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-13 06:15 -0400
    Re: Are Computer able to think? visualforth@rocketmail.com - 2013-07-13 11:31 -0700
      Re: Are Computer able to think? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-13 19:31 -0400
        Re: Are Computer able to think? visualforth@rocketmail.com - 2013-07-13 18:17 -0700
          Re: Are Computer able to think? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-14 16:11 -0400
            Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-14 14:21 -0700
              Re: Are Computer able to think? visualforth@rocketmail.com - 2013-07-14 15:03 -0700
                Re: Are Computer able to think? hughaguilar96@yahoo.com - 2013-07-14 21:51 -0700
                Re: Are Computer able to think? visualforth@rocketmail.com - 2013-07-15 00:09 -0700
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-15 02:39 -0700
                Re: Are Computer able to think? visualforth@rocketmail.com - 2013-07-17 04:21 -0700
                Re: Are Computer able to think? "Elizabeth D. Rather" <erather@forth.com> - 2013-07-17 07:31 -1000
                Re: Are Computer able to think? visualforth@rocketmail.com - 2013-07-17 12:06 -0700
                Re: Are Computer able to think? hughaguilar96@yahoo.com - 2013-07-17 23:53 -0700
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-18 22:23 -0700
                Re: Are Computer able to think? visualforth@rocketmail.com - 2013-07-19 00:48 -0700
              Re: Are Computer able to think? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-14 18:22 -0400
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-14 15:44 -0700
                Re: Are Computer able to think? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-15 21:00 -0400
                Re: Are Computer able to think? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-16 03:43 -0500
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-16 23:24 -0700
                Re: Are Computer able to think? The Beez <the.beez.speaks@gmail.com> - 2013-07-16 07:24 -0700
                Re: Are Computer able to think? Hans Bezemer <the.beez.speaks@gmail.com> - 2013-07-16 23:41 +0200
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-16 19:16 -0700
                Re: Are Computer able to think? AKK <akk@nospam.org> - 2013-07-17 08:04 +0200
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-16 23:27 -0700
                Re: Are Computer able to think? "Elizabeth D. Rather" <erather@forth.com> - 2013-07-16 20:48 -1000
                Re: Are Computer able to think? Hans Bezemer <the.beez.speaks@gmail.com> - 2013-07-17 11:51 +0200
                Re: Are Computer able to think? Alex McDonald <blog@rivadpm.com> - 2013-07-17 04:49 -0700
                Re: Are Computer able to think? The Beez <the.beez.speaks@gmail.com> - 2013-07-18 07:15 -0700
                Re: Are Computer able to think? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-18 11:59 -0500
                Re: Are Computer able to think? Hans Bezemer <the.beez.speaks@gmail.com> - 2013-07-18 21:56 +0200
                Re: Are Computer able to think? Bernd Paysan <bernd.paysan@gmx.de> - 2013-07-18 23:45 +0200
                Re: Are Computer able to think? Alex McDonald <blog@rivadpm.com> - 2013-07-18 15:16 -0700
                Re: Are Computer able to think? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-18 17:40 -0500
                Re: Are Computer able to think? Bernd Paysan <bernd.paysan@gmx.de> - 2013-07-19 01:08 +0200
                Re: Are Computer able to think? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-19 02:48 -0500
                Re: Are Computer able to think? Mark Wills <markrobertwills@yahoo.co.uk> - 2013-07-19 01:18 -0700
                Re: Are Computer able to think? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-19 03:35 -0500
                Re: Are Computer able to think? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-07-22 09:50 +0000
                Re: Are Computer able to think? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-18 17:32 -0500
                Re: Are Computer able to think? Hans Bezemer <the.beez.speaks@gmail.com> - 2013-07-19 19:28 +0200
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-19 10:51 -0700
                Re: Are Computer able to think? Hans Bezemer <the.beez.speaks@gmail.com> - 2013-07-20 00:34 +0200
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-19 23:08 -0700
                Re: Are Computer able to think? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-20 05:49 -0500
                Re: Are Computer able to think? Jason Damisch <jasondamisch@yahoo.com> - 2013-07-20 06:21 -0700
                Re: Are Computer able to think? Brad Eckert <hwfwguy@gmail.com> - 2013-07-20 14:02 -0700
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-20 17:02 -0700
                Re: Are Computer able to think? visualforth@rocketmail.com - 2013-07-21 10:02 -0700
                Re: Are Computer able to think? Jason Damisch <jasondamisch@yahoo.com> - 2013-07-21 10:07 -0700
                Re: Are Computer able to think? Hannu Vuolasaho <hannu.vuolasaho@nospam.tut.fi.invalid> - 2013-07-21 19:23 +0000
                Re: Are Computer able to think? Lars Brinkhoff <lars.spam@nocrew.org> - 2013-07-20 10:07 +0200
                Re: Are Computer able to think? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-19 18:16 -0500
                Re: Are Computer able to think? Alex McDonald <blog@rivadpm.com> - 2013-07-18 15:09 -0700
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-17 10:46 -0700
                Re: Are Computer able to think? Hans Bezemer <the.beez.speaks@gmail.com> - 2013-07-18 00:40 +0200
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-17 21:34 -0700
                Re: Are Computer able to think? hughaguilar96@yahoo.com - 2013-07-17 23:55 -0700
                Re: Are Computer able to think? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-18 13:03 -0500
                Re: Are Computer able to think? Hans Bezemer <the.beez.speaks@gmail.com> - 2013-07-18 22:00 +0200
                Re: Are Computer able to think? The Beez <the.beez.speaks@gmail.com> - 2013-07-18 07:21 -0700
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-18 11:02 -0700
                Re: Are Computer able to think? Hans Bezemer <the.beez.speaks@gmail.com> - 2013-07-18 22:02 +0200
                Re: Are Computer able to think? Paul Rubin <no.email@nospam.invalid> - 2013-07-18 21:43 -0700
                Re: Are Computer able to think? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-17 03:29 -0500
              Re: Are Computer able to think? hughaguilar96@yahoo.com - 2013-07-14 21:44 -0700
                Re: Are Computer able to think? Bernd Paysan <bernd.paysan@gmx.de> - 2013-07-15 16:45 +0200
                Re: Are Computer able to think? hughaguilar96@yahoo.com - 2013-07-15 20:32 -0700
  Re: Are Computer able to think? mentifex@myuw.net - 2013-07-14 11:52 -0700
  Re: Are Computer able to think? Mark Wills <markrobertwills@yahoo.co.uk> - 2013-07-17 05:24 -0700
  Re: Are Computer able to think? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-07-18 11:15 +0000
    Re: Are Computer able to think? Brad Eckert <hwfwguy@gmail.com> - 2013-07-18 11:33 -0700
  Re: Are Computer able to think? jim@rainbarrel.com - 2013-07-24 20:09 -0700
    Re: Are Computer able to think? m.a.m.hendrix@tue.nl - 2013-07-25 00:15 -0700
    Re: Are Computer able to think? Brad Eckert <hwfwguy@gmail.com> - 2013-07-25 08:38 -0700

csiph-web