9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: cinap_lenrek@felloff.net
To: 9fans@9fans.net
Subject: Re: [9fans] What happened on lib9p?
Date: Sun, 20 Apr 2014 17:27:53 +0200	[thread overview]
Message-ID: <381418fabd33474b4bdb5beb493d408c@felloff.net> (raw)
In-Reply-To: <fa5096324877e690c36e92a72d5c1f74@brasstown.quanstro.net>

9front adds a inferno inspired mechanism for handling
requests in parallel to the 9p service loop called
srvrelease()/srvacquire().

often explicitely breaking up your request handling into
separate processes and handing off a request to a process
seems overkill. instead, you can do a srvrelease() which will
(if neccesary) spawn a new process to handle the 9p service
loop while your calling process is now free to block.
once you finished you do a srvacquire() to serialize with
the 9p service loop again.

i used this to make usb drivers multithreaded. usb devs can
be slow to respond or sometimes even hang. as the filesystem is
bound onto /dev, a hanging usb device would hang all walks
on /dev making the system unusable with a single threaded
implementation. srvrelease()/srvacquire() made these changes
trivial todo.

--
cinap



  reply	other threads:[~2014-04-20 15:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-20  9:45 kokamoto
2014-04-20 11:31 ` erik quanstrom
2014-04-20 15:27   ` cinap_lenrek [this message]
2014-04-20 15:38     ` erik quanstrom
2014-04-21  8:19     ` kokamoto
2014-04-21 13:50       ` cinap_lenrek
2014-04-22  1:46         ` kokamoto
2014-04-22 11:37           ` Aram Hăvărneanu
2014-04-24  1:28             ` kokamoto
2014-04-24  9:14               ` Aram Hăvărneanu
2014-05-05  5:34           ` kokamoto
2014-05-05  6:06             ` Skip Tavakkolian

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=381418fabd33474b4bdb5beb493d408c@felloff.net \
    --to=cinap_lenrek@felloff.net \
    --cc=9fans@9fans.net \
    /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).