From: "Steve Simon" <steve@quintile.net>
To: 9fans@cse.psu.edu
Subject: [9fans] locking
Date: Wed, 18 Apr 2007 13:24:29 +0100 [thread overview]
Message-ID: <93f386afe6d3798ebd79035d9675a65d@quintile.net> (raw)
Hi,
I have a problem on an OS, its not plan9 but similar,
so I thought I would ask here.
Say you have a synthetic file which you use to query
the state of a subsystem, a plan9 example might /net/dns,
my example is reading a port in an fpga.
I want to run this multithreaded, but the requests
and replies are not atomic on the same file descriptor.
Thus I need to have each thread request on its own file
descriptor, or, have a Qlock in the requesting program
to interlock requests and replies.
Now the fun.
Some requests can take a long time (hours) so the Qlock
is inpractiable, though adding a open per thread is also
a pain.
When I get problems like this I usually think "how would I
do this on plan9", and the only answer I can come up with is
to have a single ioproc doing the device access and a load of
threads in another proc making requests.
Anyone think of a technique I have missed?
-Steve
next reply other threads:[~2007-04-18 12:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-18 12:24 Steve Simon [this message]
2007-04-18 16:35 ` Russ Cox
2007-04-18 23:10 ` Steve Simon
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=93f386afe6d3798ebd79035d9675a65d@quintile.net \
--to=steve@quintile.net \
--cc=9fans@cse.psu.edu \
/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).