* OCamlMakefile
@ 2000-02-28 12:06 Remi VANICAT
2000-02-28 23:15 ` OCamlMakefile Pierre Weis
2000-02-29 15:49 ` GC + thread Christophe Raffalli
0 siblings, 2 replies; 6+ messages in thread
From: Remi VANICAT @ 2000-02-28 12:06 UTC (permalink / raw)
To: caml-list
Français :
Bonjour,
j'ai ramener chez moi le Makefile_caml.tpl disponible a l'INRIA, et je
me suis aperçut d'un problème : Il n'y a pas de licence seulement un
"Distributed only by permission". Dans quel mesure j'ai le droit de le
modifier et de le redistribuer? merci d'avance.
English :
I have found the Makefile_caml.tpl on the INRIA server, but there is no
license for it, which one apply?
Thanks
--
Rémi Vanicat
vanicat@labri.u-bordeaux.fr
http://dept-info.labri.u-bordeaux.fr/~vanicat
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: OCamlMakefile
2000-02-28 12:06 OCamlMakefile Remi VANICAT
@ 2000-02-28 23:15 ` Pierre Weis
2000-02-29 15:49 ` GC + thread Christophe Raffalli
1 sibling, 0 replies; 6+ messages in thread
From: Pierre Weis @ 2000-02-28 23:15 UTC (permalink / raw)
To: Remi VANICAT; +Cc: caml-list
> Français :
>
> Bonjour,
>
> j'ai ramener chez moi le Makefile_caml.tpl disponible a l'INRIA, et je
> me suis aperçut d'un problème : Il n'y a pas de licence seulement un
> "Distributed only by permission". Dans quel mesure j'ai le droit de le
> modifier et de le redistribuer? merci d'avance.
C'est la licence INRIA: totalement libre à condition de laisser la
notice. Vous avez même le droit de vendre ce fichier à qui voudra vous
l'acheter.
> English :
> I have found the Makefile_caml.tpl on the INRIA server, but there is no
> license for it, which one apply?
The INRIA licence: you're free to do what you want with this file as
soon as the copyright notice is not removed. You can even sell the
file if you can...
--
Pierre Weis
INRIA, Projet Cristal, http://pauillac.inria.fr/~weis
^ permalink raw reply [flat|nested] 6+ messages in thread
* GC + thread
2000-02-28 12:06 OCamlMakefile Remi VANICAT
2000-02-28 23:15 ` OCamlMakefile Pierre Weis
@ 2000-02-29 15:49 ` Christophe Raffalli
2000-03-02 2:24 ` Max Skaller
1 sibling, 1 reply; 6+ messages in thread
From: Christophe Raffalli @ 2000-02-29 15:49 UTC (permalink / raw)
Cc: caml-list
The following extension for Ocaml GC seems to me simple and necessary (I
really do need it):
It considers only channels dans thread and I will describe it for a mark
and swip GC.
rule 1: a channel can be marked by the GC in two ways: read or write.
rule 2: a channel that is accssible by the GC in the usual way is both
marked read and write
(usual means in a way no covered by rule 3).
rule 3: if a closure if blocked while trying to read from channel R_1,
..., R_n
or to write from channel W_1,
..., W_n
- the channels R_1,..,R_n are marked as read
- the channels W_1,..,W_n are marked as write
- the closure will be examined by the GC if and only if
one the channel R_i is marked write or one the channel W_i is
marked read
if the condition is not immidiately true, the examination of
the closure is
postponed.
- if no channel R_i are marked write and no channel W_i are
marked
read at the end of the mark pass, the closure and the
corresponding thread
can be safely destroyed (the thread will never wake up).\x13
So clearly this require only a modification of the GC of blocked thread
and needs to keep to extra bits for channels (this is not a big cost).
I would be good to also introduce mono-directional channel (the function
create return a pair with an in_channel and an out_channel). In this
case the GC ca be optimized to collect more threads in a trivial way
(when the GC reaches the in part of a channel it is only marked read and
if the GC reaches the out part of a channel it is only marked write).
This extension is also necessary (it is easy to have realistic examples
where the GC would collect much more thread with this extension).
What do you think of that ?
--
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex
tél: (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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GC + thread
2000-02-29 15:49 ` GC + thread Christophe Raffalli
@ 2000-03-02 2:24 ` Max Skaller
2000-03-02 9:31 ` Christophe Raffalli
0 siblings, 1 reply; 6+ messages in thread
From: Max Skaller @ 2000-03-02 2:24 UTC (permalink / raw)
To: Christophe Raffalli; +Cc: caml-list
Christophe Raffalli wrote:
> This extension is also necessary (it is easy to have realistic examples
> where the GC would collect much more thread with this extension).
>
> What do you think of that ?
Why is this necessary? In particular, because in/out channels have
reduced functionality, I have opted to use Unix.file_descr instead:
these are converted to/from in/out channels if necessary.
It seems to me this particular problem is part of a more general
one concerning resource acquisition and threads?
--
John (Max) Skaller at OTT [Open Telecommications Ltd]
mailto:maxs@in.ot.com.au -- at work
mailto:skaller@maxtal.com.au -- at home
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GC + thread
2000-03-02 2:24 ` Max Skaller
@ 2000-03-02 9:31 ` Christophe Raffalli
[not found] ` <38BFEBFB.50487A27@maxtal.com.au>
0 siblings, 1 reply; 6+ messages in thread
From: Christophe Raffalli @ 2000-03-02 9:31 UTC (permalink / raw)
To: Max Skaller; +Cc: caml-list
Max Skaller wrote:
>
> Christophe Raffalli wrote:
> > This extension is also necessary (it is easy to have realistic examples
> > where the GC would collect much more thread with this extension).
> >
> > What do you think of that ?
>
> Why is this necessary? In particular, because in/out channels have
> reduced functionality, I have opted to use Unix.file_descr instead:
> these are converted to/from in/out channels if necessary.
in/out channels are not necessary. As you create the pair, there is no
extra functionnality.
The point is just to help a GC extended to collect potentialy dead
thread:
If a thread T is blocked while trying to read from channel A and there
is an active thread with a pointer on A, you can not collect the thread
T.
If a thread T is blocked while trying to read from channel A and there
is only active thread with a pointer on the in part of A, you can
collect the thread T : no thread will ever be able to write on channel A
and T will never wakeup.
This situation arises in practice every time you have thread which will
only write (or read) on a given channel. Then it is better to let the GC
know this.
As the actual version of Ocaml can not collect threads, it is clear that
in/out channel are useless ...
But there are a lot of thread applications (like a virtual machine for
any process calculus like the pi-calculus) which really needs a GC
collecting thread in the way I described in my previous mail.
--
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex
tél: (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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2000-03-06 13:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-28 12:06 OCamlMakefile Remi VANICAT
2000-02-28 23:15 ` OCamlMakefile Pierre Weis
2000-02-29 15:49 ` GC + thread Christophe Raffalli
2000-03-02 2:24 ` Max Skaller
2000-03-02 9:31 ` Christophe Raffalli
[not found] ` <38BFEBFB.50487A27@maxtal.com.au>
2000-03-03 18:16 ` Christophe Raffalli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox