From: Hugo Ferreira <hmf@inescporto.pt>
To: Goswin von Brederlow <goswin-v-b@web.de>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Shared data space: How to manage Ancient keys?
Date: Fri, 19 Mar 2010 11:07:09 +0000 [thread overview]
Message-ID: <4BA35ADD.3050702@inescporto.pt> (raw)
In-Reply-To: <87hboc4o2q.fsf@frosties.localdomain>
Goswin von Brederlow wrote:
> Hugo Ferreira <hmf@inescporto.pt> writes:
>
snip...
>
> How about a simple solution. Only one thread handles indexes.
>
> You said you have worker processes. Add one controling process on top of
> it that spawns all the worker processes and keeps a communication line
> open with them, e.g. a pipe. Each worker would then tell the controller
> to remove an index or request an unused index to store a result. Its
> probably a good idea to request unused indexes in bunches, say 100 at a
> time to cut down on latenzy.
>
To be honest I have already considered (but not discarded) this option
(which may provide other advantages). This however has several issues:
1) I still need to deal with problem of managing indexes (identifying
and reusing slots).
2) Each worker has to scan all sequences that have been generated but
not consumed. So I will also need to generate and send a list of
available indexes. This may be a very long list.
3) Interaction between the controller and workers need to exchange
several types of messages:
a) Request for a sequence to process
b) Request for a list of sequences to scan
c) Request an index to use
d) Acknowledge a used index (maybe)
e) Request an index to free
f) Acknowledge a freed index (maybe)
This implies a complicated protocol with state (worker aware).
Advantages:
1) The workers scan the sequences asynchronously. Scans may have
various processes access data in read only. Insertion/deletion
requires locking for read/writes. Use of a controller will
facilitate this.
2) The controller may avoid having the same sequences scanned
by two or more workers.
Needless to say these problems are more than I bargained for. 8-(
Thanks,
Hugo.
> MfG
> Goswin
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
prev parent reply other threads:[~2010-03-19 11:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 18:32 Hugo Ferreira
2010-03-19 10:12 ` [Caml-list] " Goswin von Brederlow
2010-03-19 11:07 ` Hugo Ferreira [this message]
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=4BA35ADD.3050702@inescporto.pt \
--to=hmf@inescporto.pt \
--cc=caml-list@yquem.inria.fr \
--cc=goswin-v-b@web.de \
/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