From: Jonathan T Bryant <jtbryant@valdosta.edu>
To: caml-list@inria.fr
Subject: Threads vs. Fork
Date: Sat, 11 Jun 2005 13:09:54 -0400 (EDT) [thread overview]
Message-ID: <132925.1118509794764.JavaMail.jtbryant@valdosta.edu> (raw)
The reason I asked about the threads is because I need the shared
memeory, but I also need to use multiple processors. Essentially, I'm
writing a mini-database. There's a shared data structure (a tree of
some description) and a bunch of workers that perform lookups. Every
time there's an update to the tree, all of the workers need to be
blocked until the update is completed (pretty standard stuff). I can
do this with fork if I can have shared memory, or I can do this with
threads if I can use multiple processors. Apparenly, neither option
exists in OCaml. Any suggestions on how to resolve this? Does
somebody have an extended Unix API that includes things like shared
memory (shmget(), shmat(), etc...)
--Jonathan
next reply other threads:[~2005-06-11 17:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-11 17:09 Jonathan T Bryant [this message]
2005-06-11 21:09 ` [Caml-list] " Eric Cooper
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=132925.1118509794764.JavaMail.jtbryant@valdosta.edu \
--to=jtbryant@valdosta.edu \
--cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).