From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA14685; Sun, 11 Apr 2004 11:26:45 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA13946 for ; Sun, 11 Apr 2004 11:26:44 +0200 (MET DST) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i3B9Rdjq003218 for ; Sun, 11 Apr 2004 11:27:40 +0200 Received: from [192.168.1.200] (ppp116-94.lns1.syd2.internode.on.net [150.101.116.94]) by smtp3.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i3B9QavM061950; Sun, 11 Apr 2004 18:56:36 +0930 (CST) Subject: Re: [Caml-list] exene and ocaml ? From: skaller Reply-To: skaller@users.sourceforge.net To: Richard Jones Cc: skaller , caml-list In-Reply-To: <20040411090200.GA5788@redhat.com> References: <16491.38344.186267.44292@soggy.deldotd.com> <1080807590.13854.260.camel@pelican> <6C27A642-83BE-11D8-96B0-000393863F70@exomi.com> <1080828521.13854.358.camel@pelican> <16504.59825.814348.947278@soggy.deldotd.com> <1081672912.20677.340.camel@pelican> <20040411090200.GA5788@redhat.com> Content-Type: text/plain Message-Id: <1081675594.20677.378.camel@pelican> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 11 Apr 2004 19:26:35 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 sourceforge:01 2004:99 2004:99 slower:01 tlb:99 threads:01 partition:01 9660:01 glebe:01 ocaml:01 ocaml:01 sig:01 nsw:01 stacks:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Keywords: X-UID: 249 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