[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linux sound (and threads)



Michael Day wrote:

> > The thing is preemptive schedulers have the knack of interrupting a
> > thread right in an heavily optimized long operation counting on things
> > like processor cache and pipelining. You don't want to interrupt things
> > like software texturing or matrix transformations, because that kind of
> > stuff, even when given the same amount of CPU time, perform a lot worse
> > when interrupted.
> 
> This is true. However unless you are running on a Micros~1 operating
> system, you will be sharing the cpu with many other threads and processes
> anyway, so surely it does no harm to add one more? If your texture mapper
> is interrupted by fetchmail the effect is the same, unless you want to
> deprioritise every other task before you play your game...

I already assume that when you run on a Microsoft OS, all bets are off.
:-)

But as for being interrupted by fetchmail, those are minimal. A system
with a single user doing a single thing (like me when I play Quadra or
Doom) rarely has more than one process in the runnable state. Most of
them, like sendmails and httpds and so one are sleeping, either
explicitly or blocked on I/O (accept(), select()).

Having another process garanteed to spin all the time at full tick is
another ball game.

-- 
Pierre Phaneuf
Ludus Design, http://ludusdesign.com/
"First they ignore you. Then they laugh at you.
Then they fight you. Then you win." -- Gandhi