[Asterisk-Users] real-time priority , -p switch
Joseph
syscon at interbaun.com
Fri Aug 12 08:47:21 MST 2005
On Fri, 2005-08-12 at 08:26 +0200, Peter Svensson wrote:
> > Since Linux is not RTOS, why some folks are using this "-p" switch?
> > It has no effect on standard Linux box.
>
> Linux is not a hard realtime os with guaranteed timing. What the -p
> flag
> does is to request the realtime scheduler. This means a process wil
> no
> longer be subjected to the stanadrd unix scheduling but rather use a
> strict priority scheduling. The net result is that once a process
> using
> the realtime scheduler is ready to run the kernel wihh schedule it as
> soon
> as possible. It will only be preempted by realtime processes of the
> same
> or better priority.
>
> With the addition of the lowlatency patches the worst case latency
> for
> userspace applications is very low. The remaining difference between
> a
> hard RT os is the guarantees it can make.
>
> Peter
Thanks for the explanation, it makes sense now.
Though is the way to verify that asterisk is running with "-p" switch?
I've modified the startup script to start asterisk with "-p"; however
asterisk starts several sub-precess-ID's. Do the sup-process-ID's are
effected by the "-p" switch?
I run schedtool (12189 is asterisk PID with -p switch) and it shows:
schedtool 12189
PID 12189: PRIO 0, POLICY N: SCHED_NORMAL, NICE -15, AFFINITY 0x1
I run schedtool (27421 is asterisk PID without -p switch) and it shows:
schedtool 27421
PID 27421: PRIO 0, POLICY N: SCHED_NORMAL, NICE -15, AFFINITY 0x1
I can verify that "nice" has taken effect but PRIO shows in both cases
"0"
--
#Joseph
More information about the asterisk-users
mailing list