caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jonathan Bryant <jtbryant@valdosta.edu>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Faking concurrency using Unix forks and pipes
Date: Wed, 30 May 2007 16:05:11 -0400	[thread overview]
Message-ID: <139AB75C-8B84-4E2A-AD75-09A7124D88FD@valdosta.edu> (raw)
In-Reply-To: <20070531055756.2e328baa.mle+ocaml@mega-nerd.com>

>
>>  I do have worries about the efficiency of this though:
>> when marshaling a closure across a socket to another process, it
>> must marshal all the necessary state as well.  I would imagine this
>> has the potential to get slow if there was much state to marshal
>> (i.e., a closure marshaled referencing a large data structure).
>
> This is a potential problem. This is like so many language features
> that if misused, can lead to huge performance degradations. Knowing
> about the problem beforehand allows programmers to avoid it.

Just throwing out an idea, so someone who is more familiar with the  
GC/runtime correct me if this can't be done, but what about a smaller  
separate heap in shared memory that is reserved for concurrent data?   
Maybe you could declare a type

stype 'a tree =
| Node of 'a * 'a tree * 'a tree
| Leaf of 'a

that is always allocated in the shared heap, and have a separate GC  
thread that manages that heap.  Could that GC be concurrent without  
affecting the performance of non-concurrent data?

--Jonathan


  reply	other threads:[~2007-05-30 20:06 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5F7D2956-2B0A-465A-8AC2-06D7EDC457F9@valdosta.edu>
2007-05-30 19:44 ` Fwd: " Jonathan Bryant
2007-05-30 19:57   ` Erik de Castro Lopo
2007-05-30 20:05     ` Jonathan Bryant [this message]
2007-05-30 22:08       ` Jon Harrop
2007-05-30  3:42 Jon Harrop
2007-05-30  4:10 ` [Caml-list] " Erik de Castro Lopo
2007-05-30  4:12 ` Jonathan Bryant
2007-05-30  9:45   ` Benedikt Grundmann
2007-05-30  7:02 ` Oliver Bandel
2007-05-30  7:31   ` Jon Harrop
2007-05-30 16:22     ` David Teller
2007-05-30  7:34   ` Loup Vaillant
2007-05-30  8:02     ` Jon Harrop
2007-05-30  8:13       ` Erik de Castro Lopo
2007-05-30  8:30         ` Loup Vaillant
2007-05-30  8:32           ` Loup Vaillant
2007-05-30  8:50             ` Jon Harrop
2007-05-30 12:13               ` Richard Jones
2007-05-30  8:54         ` Jon Harrop
2007-05-30  9:56           ` Mattias Engdegård
2007-05-30 12:15           ` Richard Jones
2007-05-30 17:46           ` Pablo Polvorin
2007-05-30 19:14           ` Erik de Castro Lopo
2007-05-30  7:13 ` Florian Hars
2007-05-30 11:31   ` Gerd Stolpmann
2007-05-30  8:40 ` Luc Maranget
2007-05-30  9:10   ` Erik de Castro Lopo
2007-05-30  9:25     ` Erik de Castro Lopo
2007-05-30  9:25       ` Jon Harrop
2007-05-30  9:41         ` Joel Reymont
2007-05-30 16:05         ` David Teller
2007-05-30  9:21   ` Joel Reymont
2007-05-30 16:10   ` David Teller
2007-05-30  9:52 ` Thomas Fischbacher
2007-05-30 12:03 ` Richard Jones
2007-05-30 16:03 ` Granicz Adam
2007-05-30 22:09   ` Jon Harrop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=139AB75C-8B84-4E2A-AD75-09A7124D88FD@valdosta.edu \
    --to=jtbryant@valdosta.edu \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).