Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>
Cc: caml-list@yquem.inria.fr
Subject: minithread (was OCaml on Sony PS3)
Date: Mon, 03 Dec 2007 21:16:58 +0100	[thread overview]
Message-ID: <4754643A.6020503@univ-savoie.fr> (raw)
In-Reply-To: <14121946.post@talk.nabble.com>


[-- Attachment #1.1: Type: text/plain, Size: 2298 bytes --]


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

-- 
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 
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------


[-- Attachment #1.2: Christophe_Raffalli.vcf --]
[-- Type: text/x-vcard, Size: 310 bytes --]

begin:vcard
fn:Christophe Raffalli
n:Raffalli;Christophe
org:LAMA (UMR 5127)
email;internet:christophe.raffalli@univ-savoie.fr
title;quoted-printable:Ma=C3=AEtre de conf=C3=A9rences
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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

  reply	other threads:[~2007-12-03 20:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-06  6:20 More registers in modern day CPUs Tom
2007-09-06  7:17 ` [Caml-list] " skaller
2007-09-06  9:07 ` Richard Jones
2007-09-06 14:55 ` Chris King
2007-09-06 15:17   ` Brian Hurt
2007-09-06 15:54     ` Harrison, John R
2007-09-06 17:10       ` David MENTRE
2007-09-06 18:27         ` Harrison, John R
2007-09-06 18:28         ` Christophe Raffalli
2007-09-06 18:48           ` Brian Hurt
2007-09-06 18:48           ` Pal-Kristian Engstad
2007-11-20 15:32             ` [Caml-list] OCalm on Sony PS3 (was Re: More registers in modern day CPUs) Mike Hogan
2007-11-21 17:20               ` Richard Jones
2007-11-21 19:05                 ` [Caml-list] OCaml " Mike Hogan
2007-11-23  6:44                 ` Mike Hogan
2007-12-02 10:14               ` [Caml-list] OCalm " Xavier Leroy
2007-12-02 16:22                 ` Mike Hogan
2007-12-02 22:19                   ` Konrad Meyer
2007-12-03  0:09                     ` [Caml-list] OCaml " Mike Hogan
2007-12-03 20:16                       ` Christophe Raffalli [this message]
2007-12-04 14:25                         ` [Caml-list] minithread (was OCaml on Sony PS3) David MENTRE
2007-12-04 14:37                         ` Basile STARYNKEVITCH
2007-12-04 16:25                           ` Mattias Engdegård
2007-12-04 17:33                         ` Gerd Stolpmann
2007-12-04 18:00                         ` Mike Hogan
2007-12-04  2:29                 ` [Caml-list] OCalm on Sony PS3 (was Re: More registers in modern day CPUs) Gordon Henriksen
2007-09-06 20:48   ` [Caml-list] More registers in modern day CPUs Richard Jones
     [not found]   ` <20070906204524.GB10798@furbychan.cocan.org>
2007-09-06 20:59     ` Chris King

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=4754643A.6020503@univ-savoie.fr \
    --to=christophe.raffalli@univ-savoie.fr \
    --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