[Asterisk-Dev] spike / asterisk hang? <- On a 360MHz CPU - no, 440 :)

alex at pilosoft.com alex at pilosoft.com
Fri Jul 15 13:29:04 MST 2005


On Fri, 15 Jul 2005, Matt Hess wrote:

> So I understand clearly here.. a context switch is a way to optimize the
> use of a cpu.. yes? If so then my thinking follows this path:
No. Context switch is how CPU manages to do multiple things 
"simultaneously".
> 
> A context switch basically locks or releases the cpu for use.. (I hope
> I'm right there) is what I am seeing nothing more than several hundred
> grab/releases of the cpu in a matter of milliseconds? If so then, isn't
> there a way of prioritizing the cpu usage in asterisk so that is does
> not interfere with the more important dsp processing that is happening?  
> I would prefer a second of call signaling delay over a second of lost
> audio..
Like someone else pointed out, you are applying asterisk incorrectly. 
Asterisk depends on fast CPU. Behavior of asterisk when it is starved for 
CPU is simply undefined. Sure, it'd be nice to have some prioritization, 
but it is a complex thing to tackle. For now, the answer is "make sure 
asterisk is never ever CPU-starved".

-alex




More information about the asterisk-dev mailing list