Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion RCU for preemptive user threads
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Joe Seigh  
View profile  
 More options Jun 2 2004, 1:50 pm
Newsgroups: comp.programming.threads
From: Joe Seigh <jseigh...@xemaps.com>
Date: Wed, 02 Jun 2004 17:50:25 GMT
Local: Wed, Jun 2 2004 1:50 pm
Subject: RCU for preemptive user threads
At this point I haven't heard anything for a while so I assume
the project is DOA.  So maybe not sooner than you think.

Some backgound.

If you have a preemptive environment where there is no way
to prevent preemption is a critical region (in preemptive kernels
you can mask interrupts), then what you have to do is only
count voluntary preemption as a quiesce point.  The problem with
this is the quiesce points can have arbitrary periodicity   In a non--
preemptive environment the periodicity was a timeslice.  This makes
it difficult if you  want to make the RCU write side garbage collection
achieve a certain performance level.  The write side waits can be
arbitrarily long due to threads being involuntarily suspended for long
periods due to low priority or threads being compute bound and doing
little or no voluntary preemption.

If you don't have a problem with this, then you could do user space
RCU by polling thread getrusage info from /proc for the voluntary
context switch counts and for the thread run state.

I had suggested last August that if you could arrange for interrupt in
in a read critical region to restart at the start of the critical region then
by definition no interrupt would be in the middle of a critical region and
you could count involuntary context switches as a quiesce point and
not have the problems that just counting voluntary context switches
has.

Basically, the mechanism for this would have been for the kernel to
make a signal pending on an involuntary context switch.  A setjmp
buffer would be set at the start of the critical region and the signal
handler would longjmp on that if it detected thread was in the critical
region.

But it turns out you don't need to do this in the kernel if you use
information from the thread /proc entries to decide if you need to
signal a thread.   If you see a thread not doing voluntary context
switching then you signal it and then you can make certain
inferences from the next involuntary context switch.  If gets a little
complicated.  You have to decide if the signal was delivered or is
still pending.  If the thread suspended at least once after the signal
then you can count it as a quiesce point that one time.

So basically, you can do this on any unix that has the right thread
info in /proc.  Solaris has it.  The only problem is that IBM has
all the RCU polling techniques patented, so there is no point in
doing it since you wouldn't know whether you could use it or not.

Joe Seigh


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google