Subj : Re: JOB: Sandbridge Technologies, White Plains, NY To : comp.programming.threads From : David Schwartz Date : Fri Jul 15 2005 02:40 pm "Joe Seigh" wrote in message news:vf2dnT5FyZFAUUrfRVn-hw@comcast.com... > I'm referring to pthread_cond_signal stuff. Linux preempts the signaler > which can slow things down considerably. I've seen up to a 3x performance > boost throwing in an extra sched_yield to "undo" the preemption on Linux. Fundamental rule: If there's any way you can allow a thread to keep running until it uses up its timeslice, do that. Only preempt a thread if that thread cannot make forward progress or you have a ready-to-run thread at a higher static priority or *much* higher dynamic priority. Do not ever preempt to create fairness! Each thread is entitled to its timeslice. DS .