9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Sape Mullender <sape@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Question regarding interrupt handlers
Date: Wed,  9 Apr 2003 11:02:02 -0400	[thread overview]
Message-ID: <5c4f4a0d7e80dacf8a78b087ce188834@plan9.bell-labs.com> (raw)
In-Reply-To: <1049900092.4070.35.camel@utip129>

> How do interrupt handlers in Plan 9 cope with large amounts of work
> having to be done in order to handle an interrupt?
> Is there a way to split the task in two parts, one to be handled
> immediately and the other to be executed at a more convenient time?
>
> Are there standard approaches for this problem in Plan 9, similar to the
> approach of tasklets and bottom half processing in Linux?

You can create a kernel process (look at the implementation of --
and calls to -- kproc in the kernel) that deals with the bulk of the work
of the handler.  Alternatively, you can let a user process dod the bulk
of the work in the device driver.  The interrupt could be used to set
the driver in motion.  The driver would do a sleep() and the interrupt
routine a wakeup().  You can use ilock() for mutual exclusion between
driver and interrupt routine (but you're not supposed to hold an ilock
for more than a handful of instructions).

	Sape



  parent reply	other threads:[~2003-04-09 15:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-09 14:54 Martijn Punt
2003-04-09 15:00 ` Fco.J.Ballesteros
2003-04-09 15:02 ` Sape Mullender [this message]
2003-04-10  9:24 ` C H Forsyth

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=5c4f4a0d7e80dacf8a78b087ce188834@plan9.bell-labs.com \
    --to=sape@plan9.bell-labs.com \
    --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).