Can I change QNX's idle process policy?

We are using QNX 4.25.
During the transition from 4.23 to 4.25, QNX changed their idle process to
send the CPU into its HALT mode. The action of the CPU moving in and out of
HALT mode effects the power rails adversely.

I’ve added my own idle process to the system but because the QNX idle
process was spawned with the round-robin (RR) policy, the CPU will always
execute the QNX idle process.

Is it possible to change the process’s scheduling policy from RR to FIFO ?

Thanks in advance for your assistance, Bill.


begin 666 ATT00048.dat
M1TE&.#EA% 4/</______S/__F?__9O__,___`/_,___,S/_,F?_,9O_, M,__,`/^9__^9S/^9F?^99O^9,_^9`/]F__]FS/]FF?]F9O]F,_]F`/\S__\S MS/\SF?\S9O\S,_\S`/\`__\`S/\`F?\`9O\`,_\,S__\S_S,S_F<S_9LS_
M,\S_,S,_\S,S,S,F<S,9LS,,\S,,R9_\R9S,R9F<R99LR9,\R9,QF_\QF MS,QFF<QF9LQF,\QF,PS_\PSS,PSF<PS9LPS,\PS,P_\PS,PF<P9LP
M,\P)G__YG_S)G_F9G_9IG_,YG_`)G,_YG,S)G,F9G,9IG,,YG,`)F9_YF9 MS)F9F9F99IF9,YF9`)EF_YEFS)EFF9EF9IEF,YEF`)DS_YDSS)DSF9DS9IDS M,YDS`)D`_YD`S)D`F9D`9ID`,YD&;__V;_S&;F6;9F;,V;&;,_V;, MS&;,F6;,9F;,,V;,&:9_V:9S&:9F6:99F:9,V:9&9F_V9FS&9FF69F9F9F M,V9F&8S_V8SS&8SF68S9F8S,V8S&8_V8S&8F689F8,V8#/__S/_ MS#/_F3/_9C/_,S/_`#/,_S/,S#/,F3/,9C/,,S/,`#.9_S.9S#.9F3.99C.9 M,S.9`#-F_S-FS#-FF3-F9C-F,S-F`#,S_S,SS#,SF3,S9C,S,S,S`#,`_S,` MS#,`F3,`9C,`,S,```#__P#_S #_F0#_9@#_,P#_#,_P#,S #,F0#,9@#,
M,P#,"9_P"9S "9F0"99@"9,P"9!F_P!FS !FF0!F9@!F,P!F```S_PS MS SF0S9@S,PS````_P``S ``F0``9@``,P`````````````````````` M```````````````````````````````````````````````````````````` M```````````````````````````````````````````````````````````` M`````````````````````"P`````% 4$ (0P!)"!Q(L*!!``@3*ER84"## MAPL=0IPH<>+#BA8CDLAX<2-'C1]!AFSH<20C"%1?E3)D65&EQ9A4BPY4B9$
'@SAS!@0.P``
end

Previously, Bill Shadid wrote in qdn.public.qnx4:

I do have my idle process at 1 and its scheduling policy is FIFO. I think
the problem is that the QNX idle process is round-robin so QNX gives its
idle process a timeslice regardless.

What you are suggesting is not true. A lower priority process will never
run if a higher priority process is cpu bound. If however your process
blocks or it priority decays, the lower priority process will run.

BTW: if a FIFO and a RR process run alone at the same priority, the
results should be the same as two RR processes.



Mitchell Schoenbrun --------- maschoen@pobox.com

How about running your idle process at priority 1 so that the standard one
never runs at all.

Bill Shadid wrote:

We are using QNX 4.25.
During the transition from 4.23 to 4.25, QNX changed their idle process to
send the CPU into its HALT mode. The action of the CPU moving in and out of
HALT mode effects the power rails adversely.

I’ve added my own idle process to the system but because the QNX idle
process was spawned with the round-robin (RR) policy, the CPU will always
execute the QNX idle process.

Is it possible to change the process’s scheduling policy from RR to FIFO ?

Thanks in advance for your assistance, Bill.

Name: ATT00048.dat
ATT00048.dat Type: unspecified type (application/octet-stream)
Encoding: x-uuencode

You could try to put your idle process 1 level above the QNX idle. Also,
make sure that it doesn’t priority decay.


Bill Caroselli - Sattel Global Networks
1-818-709-6201 ext 122



“Bill Shadid” <bshadid@neptec.com> wrote in message
news:9bknk9$eh5$1@inn.qnx.com

We are using QNX 4.25.
During the transition from 4.23 to 4.25, QNX changed their idle process to
send the CPU into its HALT mode. The action of the CPU moving in and out
of
HALT mode effects the power rails adversely.

I’ve added my own idle process to the system but because the QNX idle
process was spawned with the round-robin (RR) policy, the CPU will always
execute the QNX idle process.

Is it possible to change the process’s scheduling policy from RR to FIFO ?

Thanks in advance for your assistance, Bill.

I do have my idle process at 1 and its scheduling policy is FIFO. I think
the problem is that the QNX idle process is round-robin so QNX gives its
idle process a timeslice regardless.

I don’t believe I’m right either but the sac utility indicates that the QNX
idle process is still getting CPU time. My idle process is a “while (1) {}”
loop so it never blocks. The ps utility indicates that the QNX idle process
is “r” and my idle process is “f” type scheduling. It doesn’t make sense to
me.

Is your idle process at 1 getting any cycles at all? I suspect not, possibly
because the compiler has optimized away your code.

Bill Shadid wrote:

I don’t believe I’m right either but the sac utility indicates that the QNX
idle process is still getting CPU time. My idle process is a “while (1) {}”
loop so it never blocks. The ps utility indicates that the QNX idle process
is “r” and my idle process is “f” type scheduling. It doesn’t make sense to
me.

If the FIFO is CPU bound it should never yield to a process of the same
priority.


Bill Caroselli - Sattel Global Networks
1-818-709-6201 ext 122



“Mitchell Schoenbrun” <maschoen@pobox.com> wrote in message
news:Voyager.010418062738.23784A@node1…

BTW: if a FIFO and a RR process run alone at the same priority, the
results should be the same as two RR processes.

I’ve seen watcom optimize whole functions out of existance. But I don’t
think it can optimize an infinate loop out of existance. What would it
execute after the infinate loop?

\

Bill Caroselli - Sattel Global Networks
1-818-709-6201 ext 122



“Dean Douthat” <ddouthat@faac.com> wrote in message
news:3ADE007F.D2FCF5@faac.com

Is your idle process at 1 getting any cycles at all? I suspect not,
possibly
because the compiler has optimized away your code.

I think I remember someone from QSSL mentionning
Proc32 as an option to alter the behavior of idle.
Check the doc. I looked at the doc but couldn’t find it :wink:

“Bill Shadid” <bshadid@neptec.com> wrote in message
news:9bknk9$eh5$1@inn.qnx.com

We are using QNX 4.25.
During the transition from 4.23 to 4.25, QNX changed their idle process to
send the CPU into its HALT mode. The action of the CPU moving in and out
of
HALT mode effects the power rails adversely.

I’ve added my own idle process to the system but because the QNX idle
process was spawned with the round-robin (RR) policy, the CPU will always
execute the QNX idle process.

Is it possible to change the process’s scheduling policy from RR to FIFO ?

Thanks in advance for your assistance, Bill.

That can’t be.

Post your code if possible or post the output of sin.

“Bill Shadid” <bshadid@neptec.com> wrote in message
news:9bkuge$iql$1@inn.qnx.com

I don’t believe I’m right either but the sac utility indicates that the
QNX
idle process is still getting CPU time. My idle process is a “while (1)
{}”
loop so it never blocks. The ps utility indicates that the QNX idle
process
is “r” and my idle process is “f” type scheduling. It doesn’t make sense
to
me.

Yes, both my idle and the QNX idle process appear to be getting equal time,
see the attached sac.txt file. The sin.txt file indicates that QNX idle is
“0r” and my idle is “1f”. I’ve also attached my idle program.




begin 666 sac.txt
M(0A````````````````````(0`````````````````````````````````` M`````````````````````````#(,@``````````````````````````````
M```````````````````````````````````````````````````R#(````` M```````````````````````````````````````````````````````````` M````````````````(0A(0`````````````````` M`````````````````````````````````````````#(`,@`````````````` M```````````````````````````````````````````````````````````` M```````A`"$A````````````````````````````
M````````````````````````````````,@R```````````````````````` K````````````````````````````````````````````````````````````
end

begin 666 sin.txt
M4TE$(" @4$E$(%!23T=204T@(" @(" @(" @(" @(" @(%!222!35$%412 @
M($),2R @($-/1$4@("!$051!#0H@+2T@(" @+2T@36EC<F]K97)N96P@(" @
M(" @(" @(" @+2TM(“TM+2TM(” @+2TM(" Q,CDW-B @(" @(# -“B @,” @
M(" @,2 O8F]O="]S>7,O4’)O8S,R(" @(" @(" S,&8@4D5!1%D@(" M+2T@
M(" Q,C)K(" S,3$W:PT*(" P(" @(" R("]B;V]T+W-Y<R]3;&EB,S(@(" @
M(" @(#$P<B @4D5#5B @(" @," @(" U,VL@(" T,#DV#0H@(# @(" @(#0@
M+V)I;B]&<WES(" @(" @(" @(" @(" @,3!R("!214-6(" @(" P(" @(#<W
M:R @,C8S,VL-“B @,” @(" @-2 O8FEN+T9S>7,N96ED92 @(" @(" @(" R
M,G(@(%)%0U8@(" @(# @(" @-C%K(" @,3$T:PT*(" P(" @(" X(&ED;&4@
M(" @(" @(" @(" @(" @(" @(" P<B!214%$62 @(“TM+2 @(” @(# @(" @
M(" P#0H@(# @(" @,3<@+R\Q,B]B:6XO1&5V,S(@(" @(" @(" @,C1F("!2
M14-6(" @(" P(" @(#,R:R @(" Y.&L-“B @,” @(" R," O+S$R+V)I;B]$
M978S,BYA;G-I(" @(" R,’(@(%)%0U8@(" @(# @(" @-#!K(" @(#8Y:PT*
M(" P(" @(#(R("\O,3(O8FEN+T1E=C,R+G!A<B @(" @(" Y;R @4D5#5B @
M(" @," @(#@Q.3(@(" @,3)K#0H@(# @(" @,C,@+R\Q,B]B:6XO4&EP92 @
M(" @(" @(" @,C)R("!214-6(" @(" P(" @(#$V:R @(" R-&L-“B @,” @
M(" R-B O+S$R+V)I;B]$978S,BYS97(@(" @(" R,’(@(%)%0U8@(" @(# @
M(" @,39K(" @(#(T:PT*(" P(" @(#(W("\O,3(O8FEN+T1E=C,R+G-E<B @
M(" @(#(P<B @4D5#5B @(" @," @(" Q-FL@(" @,C1K#0H@(# @(" @,S @
M+R\Q,B]B:6XO1&5V,S(N<‘1Y(" @(" @,C!R("!214-6(" @(" P(" @(#$R
M:R @(" U-VL-“B @,” @(" S,2 O+S$R+V)I;B]$978S,BYP=‘D@(" @(" R
M,’(@(%)%0U8@(" @(# @(" @,3)K(" @(#,R:PT*(" P(" @(#,T("\O,3(O
M8FEN+VYA;65L;V,@(" @(" @(#(P;R @4D5#5B @(" @," @(#8Q-#0@(" @
M,C!K#0H@(# @(" @,S4@+R\Q,B]B:6XO;F%M96QO8R @(" @(" @,C!O(%)%
M4$Q9(" @(" P(" @-C$T-" @(" Q-FL-“B @,” @(" S-B O+S$R+V)I;B]T
M:6YI=" @(" @(" @(" Q,&@(%=!250@(" @+3$@(" @,39K(" @(#(X:PT*
M(" P(" @(#,W("\O,3(O8FEN+TUQ=65U92 @(" @(" @(#(R;R @4D5#5B @
M(" @," @(" R,&L@(#$V,C9K#0H@(# @(" @,S@@+R\Q,B]U<W(O8FEN+VEN
M=#$P(" @(" @,39R("!214-6(" @(" P(" @(#8U:R @(" T.6L-“B @,” @
M(" T,B O+S$R+V-S=G,O<WES+W9M96EF(" @(" R-F@(%)%0U8@(" @(# @
M(" @,C1K(" @(#$R:PT*(" P(" @(#4P("\O,3(O8W-V<R]S>7,O9&ES<&UA
M;B @(#(Q;R!215!,62 @(" @," @(" R.&L@(" @,C!K#0H@(# @(" @-3(@
M+R\Q,B\J+V)I;B]0:&]T;VX@(" @(" @,3)R("!214-6(" @(" P(" @(#4S
M:R @(" V.6L-“B @,2 @(” U-B O+S$R+V)I;B]L;V=I;B @(" @(" @(" Q
M,&@4D503%D@(" @,3<@(" @,C1K(" @(#(P:PT*(" P(" @(#4X("\O,3(O
M8FEN+TEN<‘5T(" @(" @(" @(#$T;R @4D5#5B @(" @," @(" S,FL@(" @
M,CAK#0H@(# @(" @-C$@+R\Q,B]C<W9S+W-Y<R]E>&5C8W-V<R @,CEO("!2
M14-6(" @(" P(" @(#,R:R @(" T-6L-“B @,” @(" V-B O+S$R+RHO8FEN
M+W!H9F]N=’!F<B @(" Q,G(@(%)%0U8@(" @(# @(" Q,#)K(" @,S8T:PT*
M(" P(" @(#8X("\O,3(O8FEN+TEN<‘5T(" @(" @(" @(#$T;R @4D5#5B @
M(" @," @(" S,FL@(" @,CAK#0H@(# @(" @-CD@+R\Q,B\J+V)I;B]P=&5R
M;2 @(" @(" @,3!O("!214-6(" @(" P(" @(#(X:R @(#$Q,&L-“B @,” @
M(" X,2 O+S$R+V-S=G,O<WES+VED;" @(" @(" R,F8@(%)%0U8@(" @(# @
M(" @-S-K(" @(#,V:PT*(" P(" @(#@V("\O,3(O8W-V<R]S>7,O:61L=W)I
M=&4@(#$U9B!215!,62 @(" @," @(" S,FL@(" @.3!K#0H@(# @(" @.3,@
M+R\Q,B]C<W9S+W-Y<R]T<F%C:VEN9R @,C-F("!214-6(" @(" P(" @(#(P
M:R @(" R.&L-“B @,” @(" Y-B O+S$R+RHO8VER<G5S8FEO<RYM<R @(" Q
M,&@(%)%0U8@(" @(# @(" @,S)K(" @(#,R:PT*(" P(" @,3 P("\O,3(O
M8W-V<R]S>7,O=’)A8VMI;F<@(#(S9B @4D5#5B @(" @," @(" R,&L@(" @
M,CAK#0H@(# @(" Q,#4@+R\Q,B]C<W9S+W-Y<R]P:&]T;W-O;" @,C5F("!2
M14-6(" @(" P(" @(#,R:R @(" W,VL-“B @,” @(#$Q,2 O+S$R+V-S=G,O
M<WES+W!H;W1O<V]L(" R-68@(%)%0U8@(" @(# @(" @,S)K(" @(#<S:PT*
M(" P(" @,3$W("\O,3(O8W-V<R]S>7,O:69C9’)V(" @(#(S9B @4D5#5B @
M(" @," @(" T.6L@(" @,CAK#0H@(# @(" Q,C(@+R\Q,B]C<W9S+W-Y<R]R
M969C86P@(" @,C5F("!214-6(" @(" P(" @(#,V:R @(" R-&L-“B @,” @
M(#$R.2 O+S$R+V-S=G,O<WES+V1E<75E=64@(" R-68@(%)%0U8@(" @(# @
M(" @-3=K(" @(#,R:PT*(" P(" @,3,V("\O,3(O8W-V<R]S>7,O9W)A<&AI
M8W,@(#$S9B @4D5#5B @(" @," @(" V-6L@(" @-#!K#0H@(# @(" Q-#$@
M+R\Q,B]C<W9S+W-Y<R]C86UC=&P@(" @,C)F("!214-6(" @(" P(" @(#0U
M:R @(" R-&L-“B @,” @(#$T.2 O+S$R+V-S=G,O<WES+W=I;FUA;B @(" R
M-V8@(%)%0U8@(" @(# @(" @-#5K(" @(#8Q:PT*(" P(" @,34U("\O,3(O
M8W-V<R]S>7,O8VUD97AE8R @(#$U9B @4D5#5B @(" @," @(#$V,VL@(" S
M-C1K#0H@(# @(" Q-C @+R\Q,B]C<W9S+W-Y<R]V:61M86X@(" @,C)F("!2
M14-6(" @(" P(" @(#(P:R @(" R,&L-“B @,” @(#$W,R O+S$R+V-S=G,O
M<WES+VEM9W!R;V,@(" R,68@(%)%0U8@(" @(# @(" @,3!K(" @(#$V:PT*
M(" P(" @,3<X("\O,3(O8W-V<R]S>7,O:6UG<’)O8R @(#(Q9B @4D5#5B @
M(" @," @(" Q,&L@(" @,39K#0H@(# @(" Q.#,@+R\Q,B]C<W9S+W-Y<R]I
M9&QE(" @(" @(#%F(%)%0419(" @+2TM(" @-# Y-B @(" Q,FL-“B @,” @
M(#$Y-B O+S$R+V)I;B]K<V@@(" @(" @(" @(" Q,&@4D503%D@(" @,3<@
M(" @-#=K(" @(#,V:PT*(" P(" @,3DW("\O,3(OB]S>7,O4&<N;G1S8V1R
M=B @(#$R<B!215!,62 @(" U,B @(#$S,6L@(" Q-S)K#0H@(#(@(" R,#$@
M+R\Q,B\J+V)I;B]P=VT@(" @(" @(" @,3!O("!214-6(" @(" P(" @,3 V
M:R @(" X,6L-“B @,” @(#(Q,R O+S$R+V-S=G,O<WES+W5S97)I9B @(" Q
M-&8@(%)%0U8@(" @(# @(" U-#AK(" @.3(Y:PT
(" P(" @,C$X("\O,3(O
M8W-V<R]S>7,O<V-R=6(@(" @(" Y9B!214%$62 @(“TM+2 @(” Q-FL@(" @
M,3)K#0H@(#(@(" R,S,@+R\Q,B\J+V)I;B]P=&5R;2 @(" @(" @,3!O("!2
M14-6(" @(" P(" @(#(X:R @(#$Q,&L-“B @,R @(#(S-B O+S$R+V)I;B]K
M<V@@(” @(" @(" @(" Q,&@(%=!250@(" @+3$@(" @-#=K(" @(#,V:PT*
M(" S(" @,C,W("\O,3(O8FEN+W-I;B @(" @(" @(" @(#$P;R!215!,62 @
4(" @,2 @(" T-6L@(" @-S-K#0H
end

begin 666 idle.c
M+RH-"@T4WES=&5M.B @(" @(" @(" @("!#4U93#0H-“D9I;&5N86UE.B @
M(” @(" @(" @:61L92YC#0H-“E!R;V-E9’5R92!.86UE.B @(” @;6%I;@T

M#0I2979I<VEO;B!,979E;#H@("!05D-3(%)E=B Q+C @,3 M2F%N+3 P(%=3
M(#_.B!);FET:6%L(‘9E<G-I;VXN#0H-"@T26YP=70@07)G=6UE;G1S.B @
M("!4>7!E(" @(" @("!.86UE(" @(" @(" @(" @(" @(" @("!$97-C<FEP
M=&EO;@T
(" @(" @(" @(" @(" @(" @(" M+2TM(" @(" @(" M+2TM(" @
M(" @(" @(" @(" @(" @(" M+2TM+2TM+2TM+0T*(" @(" @(" @(" @(" @
M(" @("!N;VYE#0H-“B @(” @(" @(" @(" @(" @(" @;F]N90T*#0I2971U
M<FX@07)G=6UE;G1S.B @(%1Y<&4@(" @(" @($YA;64@(" @(" @(" @(" @
M(" @(" @($1E<V-R:7!T:6]N#0H@(" @(" @(" @(" @(" @(" @(“TM+2T@
M(” @(" @(“TM+2T@(” @(" @(" @(" @(" @(" @(“TM+2TM+2TM+2TM#0H@
M(” @(" @(" @(" @(" @(" @($YO;F4-"@T26YT97)R=7!T<R]3:6=N86PZ
M("!.86UE(" @(" @(" @(" @(" @(" @("!$97-C<FEP=&EO;@T
(" @(" @
M(" @(" @(" @(" @(" M+2TM(" @(" @(" @(" @(" @(" @(" M+2TM+2TM
M+2TM+0T*(" @(" @(" @(" @(" @(" @("!.;VYE#0H-“D1%4T-225!424].
M.B @(”!4:&ES(&ES(‘1H92!M86EN;&EN92!P<F]C961U<F4@9F]R(‘1H92!)
M9&QE(’!R;V-E<W,N#0H@(" @(" @(" @(" @(" @5&AE(’!U<G!O<V4@;V8@
M=&AI<R!T87-K(&ES(‘1O(’!R979E;G0@=&AE($-052!F<F]M(&5X96-U=&EN
M9R!T:&4@#0H@(" @(" @(" @(" @(" @44Y8(&ED;&4@<’)O8V5S<R!B96-A
M=7-E(%%.6"!E>&5C=71E<R!A($A!3%0@:6YS=’)U8W1I;VXN($ET(&ES#0H@
M(" @(" @(" @(" @(" @=&AO=6=H="!T:&%T(‘1H92!A8W1I;VX@;V8@=&AE
M($-052!G;VEN9R!I;B!A;F0@;W5T(&]F($A!3%0@#0H@(" @(" @(" @(" @
M(" @&QO=R!P;W=E<B!M;V1E2!I<R!C875S:6YG(&YO:7-E(’-P:6ME<R!O
M;B!T:&4@<&]W97(@<F%I;’,@86YD#0H@(" @(" @(" @(" @(" @=&AI<R!A
M9&1E9"!N;VES92!I<R!D:7-R=7!T:6YG('1H92!"<F]O:W1R964@;VX@=&AE
M(%9/0RX-"@T*#0I-151(3T0Z(" @(" @(" @4W1R86EG:'1F;W)W87)D#0H-
M"D%34U5-4%1)3TY3.B @("!.;VYE#0H-“DQI;6ET871I;VYS.B @(”!.;VYE
M#0H-“E1E<W0@0V]N<VED97)A=&EO;G,Z(” @($YO;F4-"@T**B-"@T*+RH@
M24Y#3%5$12!&24Q%($1%0TQ!4D%424].4R J+PT*#0H-"B\J($585$523D%,
M(%!23T-%1%5212!2149%4D5.0T53("HO#0H-"B\J($Q/0T%,(%!23T-%1%52
M12!2149%4D5.0T53("HO#0H-"B\J($Q/0T%,($-/3E-404Y4($1%0TQ!4D%4
M24].4R J+PT*#0HOB!,3T-!3"!605))04),12!$051!($1%1DE.251)3TY3
M("HO#0H-"B\J($U!24X@4%)/0T5$55)%("HO#0H-“G9O:60@;6%I;B@@=F]I
A9” I#0I[#0H-"B @=VAI;&4H,2D-“B @>WT-”@T
?0T*
`
end

Ok, this was getting just too silly. I compiled your code on my system.
Ran it at prio 1, and sure enough sac showed idle getting CPU time. I
can only conclude that this is some sort of an error in sac, since “sin
-Pidle ti” shows CPU use for the system idle remaining constant, and the
CPU use for your idle continuoulsy increasing.

Bottom line your idle works as you feel it should.

-----Original Message-----
From: Bill Shadid [mailto:bshadid@neptec.com]
Posted At: Thursday, April 19, 2001 7:34 AM
Posted To: qnx4
Conversation: Can I change QNX’s idle process policy?
Subject: Re: Can I change QNX’s idle process policy?


Yes, both my idle and the QNX idle process appear to be getting equal
time,
see the attached sac.txt file. The sin.txt file indicates that QNX idle
is
“0r” and my idle is “1f”. I’ve also attached my idle program.

Bill Shadid <bshadid@neptec.com> wrote:

Yes, both my idle and the QNX idle process appear to be getting equal time,
see the attached sac.txt file. The sin.txt file indicates that QNX idle is
“0r” and my idle is “1f”. I’ve also attached my idle program.

I don’t know what’s going on with your system – but I just wrote
the following program:

void main()
{
while (1);
}

Called it my_idle.c, compiled it:

cc -g2 my_idle.c -o my_idle

Ran it:

on -p1f ./my_idle &

Then, in my sac output:

100 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
90 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
80 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
60 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
50 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30

Processor Activity by Priority Node: 88 Inertia: 1

Well… the inverse-video spaces don’t reproduce very well, but you
should be able to see that the column for priority 1 is the one
that is completely used – with absolutely no CPU time being given
to idle.

I have no idea what might be happening on your system – but what
you describe should be impossible – the behaviour should be as I’ve
just tested & shown above.

-David

QNX Training Services
dagibbs@qnx.com

On Thu, 19 Apr 2001 10:33:34 -0400, “Bill Shadid” <bshadid@neptec.com>
wrote:

Yes, both my idle and the QNX idle process appear to be getting equal time,
see the attached sac.txt file. The sin.txt file indicates that QNX idle is
“0r” and my idle is “1f”. I’ve also attached my idle program.

I could not make sense of the sac file, but all the rest looks ok.
I compile ( cc -oidle -O idle.c) your program but could not reproduce
your problem.

What if you raise the priority to 5?

What if you disassemble the code (wdisasm) to see if nothing went
wrong with the compilation process.

What if you run sysmon instead of sac (you can get sysmon from QDN)

  • Mario

Dave Gibbs,

I repeated your sequence, i.e. used your code, your compile cmd and your
invokation cmd. I used sac to output the attachment. Nothing has changed,
the QNX idle process is still getting cpu time. To view the sac file, type
“sac < sac2.txt”.

Perhaps my 4.25 release of QNX does not give same results as your setup.



begin 666 sac2.txt
M,@R```````````````````````````````````````````````````````` M`````````````````````````!D&0,@`````` M```````````````````````````````````````````````````R`#(````` M```````````````````````````````````````````````````````````` M````````````````,@`R```````````````````````````````````````` M`````````````````````````````````````````#(`,@`````````````` M```````````````````````````````````````````````````````````` M```````9`!D#(`````````````````````````
M````````````````````````````````,@R```````````````````````` M`````````````````````````````````````````````````````````#(
M,@``````````````````````````````````````````````````````````
M```````````````````````A"$``````````````````````"$````````` D````````````````````````````````````````````````
end

Bill Shadid <bshadid@neptec.com> wrote:

Dave Gibbs,

I repeated your sequence, i.e. used your code, your compile cmd and your
invokation cmd. I used sac to output the attachment. Nothing has changed,
the QNX idle process is still getting cpu time. To view the sac file, type
“sac < sac2.txt”.

Perhaps my 4.25 release of QNX does not give same results as your setup.

I see your stuff, I don’t know what’s happening.

I tested this against a couple of different versions of 4.25 – I still
can’t see what you’re seeing.

Can you post a “sin ver” for Proc32 and, also, a “sin args” for Proc32,
please?

Also, “which -lf sac” in case there is a difference one in use, and the
command line parameters you gave sac when running it.
(Not likely a different sac – it hasn’t change in many years, but
worth checking.)

-David

QNX Training Services
dagibbs@qnx.com

Looks like “sac” is broken. Using “sac”, I get 50% cpu on prio 0 and 50% cpu on
prio 1, even though “sin ti” (correctly) shows my idle getting 100% cpu:

[3@ttyp3] date ; sin ti | grep idle
Thu Apr 19 18:29:59 EDT 2001
0 8 idle 0r — – --:-- 14.669 0.011 0.000 0.000
0 60 //3/usr/parse/bin/idle 1r Apr 18 15:35 94829 1.540 0.000 0.000
[3@ttyp3] date ; sin ti | grep idle
Thu Apr 19 18:30:00 EDT 2001
0 8 idle 0r — – --:-- 14.669 0.011 0.000 0.000
0 60 //3/usr/parse/bin/idle 1r Apr 18 15:35 94831 1.540 0.000 0.000
[3@ttyp3] date ; sin ti | grep idle
Thu Apr 19 18:30:02 EDT 2001
0 8 idle 0r — – --:-- 14.669 0.011 0.000 0.000
0 60 //3/usr/parse/bin/idle 1r Apr 18 15:35 94832 1.540 0.000 0.000

Why did I write my own “idle”? Not for the reasons of CPU temperature, but because
the OS only stores “2^32 milliseconds” worth of CPU time (49.7 days), which means
that after that time “sysmon” starts showing anomolous results… :slight_smile:

-RK

David Gibbs (dagibbs@qnx.com) wrote:
: Bill Shadid <bshadid@neptec.com> wrote:
: > Dave Gibbs,

: > I repeated your sequence, i.e. used your code, your compile cmd and your
: > invokation cmd. I used sac to output the attachment. Nothing has changed,
: > the QNX idle process is still getting cpu time. To view the sac file, type
: > “sac < sac2.txt”.

: > Perhaps my 4.25 release of QNX does not give same results as your setup.

: I see your stuff, I don’t know what’s happening.

: I tested this against a couple of different versions of 4.25 – I still
: can’t see what you’re seeing.

: Can you post a “sin ver” for Proc32 and, also, a “sin args” for Proc32,
: please?

: Also, “which -lf sac” in case there is a difference one in use, and the
: command line parameters you gave sac when running it.
: (Not likely a different sac – it hasn’t change in many years, but
: worth checking.)

: -David
: –
: QNX Training Services
: dagibbs@qnx.com

Robert Krten, PARSE Software Devices; email my initials at parse dot com
Consulting, Systems Architecture / Design, Drivers, Training, QNX 4 & Neutrino
Check out our new QNX 4 and Neutrino (QRTP) books at http://www.parse.com/
Wanted PDP-8/9/10/11/12 Systems/documentation/spare parts! Will trade books!

Previously, Bill Caroselli wrote in qdn.public.qnx4:

If the FIFO is CPU bound it should never yield to a process of the same
priority.

It will yield to a process running RR at the same priority. At least
that is what is supposed to happen. It will not yield to another FIFO.

\

Mitchell Schoenbrun --------- maschoen@pobox.com

Mitchell Schoenbrun (maschoen@pobox.com) wrote:
: Previously, Bill Caroselli wrote in qdn.public.qnx4:
: > If the FIFO is CPU bound it should never yield to a process of the same
: > priority.

: It will yield to a process running RR at the same priority. At least
: that is what is supposed to happen. It will not yield to another FIFO.

Nope; what Bill said; with a tiny semantic clarification:
If the FIFO is CPU bound it will never be preempted by another process of
the same priority.
(It’s certainly welcome to call Yield() and voluntarily give up CPU to another
process at the same priority, but it’s not obligated).
Period.

The definition of FIFO is “runs until it voluntarily gives up CPU; or a higher
priority process becomes ready”. RR is identical except that it has a max one timeslice
period IF another process is ready at the same prio.

Cheers,
-RK

\

Robert Krten, PARSE Software Devices; email my initials at parse dot com
Consulting, Systems Architecture / Design, Drivers, Training, QNX 4 & Neutrino
Check out our new QNX 4 and Neutrino (QRTP) books at http://www.parse.com/
Wanted PDP-8/9/10/11/12 Systems/documentation/spare parts! Will trade books!