From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,MISSING_HEADERS autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id A15C7BC69 for ; Mon, 3 Dec 2007 21:17:05 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAEvzU0fUGyokimdsb2JhbACBW41wAQEBCAIIEREH X-IronPort-AV: E=Sophos;i="4.23,244,1194217200"; d="asc'?vcf'?scan'208";a="19939946" Received: from smtp6-g19.free.fr ([212.27.42.36]) by mail4-smtp-sop.national.inria.fr with ESMTP; 03 Dec 2007 21:17:04 +0100 Received: from smtp6-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp6-g19.free.fr (Postfix) with ESMTP id 82C565FD3D for ; Mon, 3 Dec 2007 21:17:03 +0100 (CET) Received: from Tocksi.local (lns-bzn-57-82-249-13-125.adsl.proxad.net [82.249.13.125]) by smtp6-g19.free.fr (Postfix) with ESMTP id 3A26D5FE79 for ; Mon, 3 Dec 2007 21:17:03 +0100 (CET) Message-ID: <4754643A.6020503@univ-savoie.fr> Date: Mon, 03 Dec 2007 21:16:58 +0100 From: Christophe Raffalli User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 Cc: caml-list@yquem.inria.fr Subject: minithread (was OCaml on Sony PS3) References: <875c7e070709060755r1d0d099ds30a25ea78d0fd85a@mail.gmail.com> <46E01A27.1070207@janestcapital.com> <509223F0BF55E74FA1247D17207E7A0C01D75893@orsmsx419.amr.corp.intel.com> <87r6lb90tw.fsf@linux-france.org> <46E046DF.5010103@univ-savoie.fr> <46E04B85.1020004@naughtydog.com> <13858952.post@talk.nabble.com> <47528593.9060106@inria.fr> <14116972.post@talk.nabble.com> <200712021419.01821.konrad@tylerc.org> <14121946.post@talk.nabble.com> In-Reply-To: <14121946.post@talk.nabble.com> X-Enigmail-Version: 0.95.3 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD51ED61BE25C6312905D48B9" X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 ocaml:01 ocaml:01 powerpc:01 caching:01 mutation:01 model:01 cheers:01 chablais:01 73376:01 univ-savoie:01 X-Attachments: cset="utf-8" name="Christophe_Raffalli.vcf" name="Christophe_Raffalli.vcf" type="application/pgp-signature" name="signature.asc" name="signature.asc" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD51ED61BE25C6312905D48B9 Content-Type: multipart/mixed; boundary="------------090104060106060803010409" This is a multi-part message in MIME format. --------------090104060106060803010409 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I propose the following idea for OCaml on Cell PowerPC or multicore machine (this is just an idea, there ay be a lot of thing I did not see ... in other word there is probably a lot of work to do, but may be not too much): - Create two functions and one data type to start "mini-thread": type 'a result_channel launch : int -> ('a -> 'b) -> 'a -> 'b result_channel. get_result : 'b result_channel list -> 'b option (or many similar functions to wait with or without blocking the result for one or more mini-thread). Now the point is this: each mini-thread has its own minor-heap whose size is given as the first argument with the following restrictions: 1) the minor heap is used as a cache : access to the major heap copy the data in the minor heap. One need to mix the copying minor GC with standard caching algorithm. 2) to ease the task 1), mutation of data in the heaps of the main thread by a mini-thread is illegal (raises an exception in the main thread ? Static check ?). This includes the arguments of the mini-thread. 3) a mini-thread can not start another mini-thread (raises an exception in the main thread ? Static check) 4) 2-3) imply that a mini-thread can not access data of other mini-threads and that the only way for the main thread to get values from a mini-thread is via their 'b result_channel. Thus, if you have a main thread M and many mini-threads T1 ... TN runnnig, Ti can only acces its own data and the data of M (read only). And, M can not acces the data of T1 ... TN. If you launch one minithread per SPU or CORE with a minor heap of the correct size and you fine tune you application to produce not too much cache misses, then, I think this simple model could be usefull ???? Cheers, Christophe --=20 Christophe Raffalli Universite de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tel: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution=20 can check this signature. The public key is stored on www.keyserver.net --------------------------------------------- --------------090104060106060803010409 Content-Type: text/x-vcard; charset=utf-8; name="Christophe_Raffalli.vcf" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Christophe_Raffalli.vcf" begin:vcard fn:Christophe Raffalli n:Raffalli;Christophe org:LAMA (UMR 5127) email;internet:christophe.raffalli@univ-savoie.fr title;quoted-printable:Ma=3DC3=3DAEtre de conf=3DC3=3DA9rences tel;work:+33 4 79 75 81 03 note:http://www.lama.univ-savoie.fr/~raffalli x-mozilla-html:TRUE version:2.1 end:vcard --------------090104060106060803010409-- --------------enigD51ED61BE25C6312905D48B9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHVGQ+i9jr/RgYAS4RAmjQAKC2BDsFa28bQe6A2OLniH5aj+4+dQCeIrZP pCaH9OBJA3SOEwjFQQy+4N0= =nTGZ -----END PGP SIGNATURE----- --------------enigD51ED61BE25C6312905D48B9--