X-Git-Url: http://svarog.pmf.uns.ac.rs/gitweb/?p=os2skripta.git;a=blobdiff_plain;f=skripta-os2.tex;h=48ce00bad10e288a786601477096264a2f042318;hp=4298297d510fdd93fc7e343e1a126a517924f15f;hb=0e8e29487850f177c24117f8bc6cfb74edab92b9;hpb=828b77a9a1f7c40699d5b8219a90d34ce5fa36b5 diff --git a/skripta-os2.tex b/skripta-os2.tex index 4298297..48ce00b 100644 --- a/skripta-os2.tex +++ b/skripta-os2.tex @@ -650,15 +650,16 @@ END; \begin{minipage}{0.6\textwidth} \begin{codeblock} -i := 1; -j := 0; -WHILE (i < n) AND (j < m) DO +dubina := 1; +brdece := 0; +WHILE (dubina < maxdubina) AND + (brdece < potrebnodece) DO pid := fork(); IF pid # 0 THEN - INC(j); + INC(brdece); ELSE - INC(i); - j:=0; + INC(dubina); + brdece := 0; END; END; \end{codeblock}