develooper Front page | perl.perl6.internals | Postings from August 2001

Re: Opcode Dispatch

Thread Previous | Thread Next
Uri Guttman
August 6, 2001 15:05
Re: Opcode Dispatch
Message ID:
>>>>> "BCW" == Bryan C Warnock <> writes:

  BCW> I was doing some thinking on the event loop (and how to tie it in
  BCW> later), and ran into a question.  Given the current priority
  BCW> idea, how far does a priority stretch?  (Horrible description, so
  BCW> let me give an example.  Say SIGALRM has been determined to be
  BCW> priority 4 and you are processing regular code (prioirity 0).
  BCW> Perl receives the signal and generates an event of prioirty 4.
  BCW> Perl then switches to that priority level to process the event.
  BCW> If the event has a callback (to regular Perl code), does the
  BCW> callback's code (beyond the actual dispatch) run at PRI 4, or 0?
  BCW> At what point do you revert to the lower priority and allow other
  BCW> events to be handled?)

callbacks are run at the priority level of the triggering event. they
can be preempted by a higher level event/callback but not by a lower
one. i don't see any reason to allow lowering the current priority level
in the event loop. that would only make sense in a real kernel where a
driver is doing a long running operation that may want to be interrupted
by a lower priority device.


Uri Guttman  ---------  ----------
SYStems ARCHitecture and Stem Development ------
Search or Offer Perl Jobs  --------------------------

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About