Two questions about scheduling and threading.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Brian McGrew
Date: Thursday, May 8, 2008 - 8:15 am

We're using the 2.6.16.16 kernel in an almost real time, multi processor and
multi threaded environment.

When I start my system for the first time, I start one thread for each
processor/core in the machine (is this the correct thing to do)?  These
threads set a busy flag, go to work and then go to sleep.  I put everything
to sleep as opposed to killing the threads because it saves me on average of
about 400ms each time around.

My problem is, and, it is very reproducable, that if CPU0 is at 100%, none
of my threads see the wakeup!  It doesn't matter what the other CPU's are
doing, if they're all at 0 or 100%, but if CPU0 is 100, I'm toast.  Is there
anyway around this?

Also, I know that we're supposed to sit back and let the scheduler do all
the work for us; but, in the 2.6.16.16 kernel, is there a way to assign a
specific thread and/or process to a designated processor???  I really need
to be able to do this because even with the preemptive scheduling, I'm still
real-time and it's not quite real-time enough!

Thanks!

-brian

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Two questions about scheduling and threading., Brian McGrew, (Thu May 8, 8:15 am)
RE: Two questions about scheduling and threading., David Schwartz, (Thu May 8, 12:44 pm)