Whoa, kernel programming questions. I haven't spent much time hacking threads in the kernel source, so I'm not the right expert. My understanding is that even the 2.6 kernel does not support genuine real-time scheduling yet. Real time scheduling allows a single thread to grip onto a CPU and not be interrupted, ever. So the answer to your second question is NO if you're trying to grip a CPU permanently. Of course, since you have the source, anything is in theory possible -- it might be too much effort to justify, though.
To synchronise two kernel threads, just use any synchronisation technique, like a semaphore and/or signal. A crude solution if one of your threads is time-dependant and you have multiple CPUs is to use a spinlock to keep one thread busy until circumstances change. That solution is bad for user-level performance, though.
Dig Deeper on Linux management and configuration
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.