caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: Richard Jones <rich@annexia.org>
Cc: skaller <skaller@users.sourceforge.net>, caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] exene and ocaml ?
Date: 11 Apr 2004 19:26:35 +1000	[thread overview]
Message-ID: <1081675594.20677.378.camel@pelican> (raw)
In-Reply-To: <20040411090200.GA5788@redhat.com>

On Sun, 2004-04-11 at 19:02, Richard Jones wrote:
> On Sun, Apr 11, 2004 at 06:41:53PM +1000, skaller wrote:

> I did some experiments with early versions of pthrlib (see .sig) where
> I tried swapping stacks in and out during context switches using
> mmap(2). 

Would that work with common C++ implementations which
play tricks with the stack for exception handling purposes?

>   Plus it's probably a lot slower
> because you're trashing the disk cache / data cache and TLB on each
> switch.

I don't really understand why the disk cache should be trashed,
at least any more than any other system: if you need backing
store you'll be invoking the VM system any which way .. 

> If you do this you have to be careful not to share data on the stack
> between threads (not normally a problem).

Similar issue in Felix: if you gave a GC for each thread,
you can't share ordinary state data. If you use a global
GC you can, but there may be an impact on overall (and RT) 
performance.

Interesting issue: can you do both at the same time?
And how would you manage it?

Felix certainly allows a GC plus first class C++
objects which are typically using constructor/destructor
memory management for things like strings, and refcounting
for containers, so if you can partition your data then using
multiple memory management systems at once is certainly
possible, but I have no idea what models might exist
for using multiple GC together.. the Ocaml 
collector with 'world stop' incremental collection seems a good
compromise.

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-04-11  9:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-01  4:08 briand
2004-04-01  7:25 ` Ville-Pertti Keinonen
2004-04-01  8:19   ` skaller
2004-04-01  9:24     ` Ville-Pertti Keinonen
2004-04-01 14:08       ` skaller
2004-04-11  6:46         ` briand
2004-04-11  8:41           ` skaller
2004-04-11  9:02             ` Richard Jones
2004-04-11  9:26               ` skaller [this message]
2004-04-11 13:21           ` Ville-Pertti Keinonen
2004-04-01 14:34       ` skaller
2004-04-02  5:09       ` briand

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=1081675594.20677.378.camel@pelican \
    --to=skaller@users.sourceforge.net \
    --cc=caml-list@inria.fr \
    --cc=rich@annexia.org \
    /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).