gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control systemdiff --git a/skripta-os2.tex b/skripta-os2.tex
--- a/skripta-os2.tex
+++ b/skripta-os2.tex
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}
[proc/.style={circle,draw}]
-\def \n {5}
-\node[proc] (1) at (0,0) {1};
-\foreach \s in {2,...,\n}
+\def \n {3}
+\node[proc] (top) at (0,0) {0..4};
+\foreach \s in {0,...,\n}
{
- \node[proc] (\s) at (-3.5+\s,-2) {\s};
+ \node[proc] (\s) at (-1.5+\s,-2) {\s};
}
-\foreach \s in {2,...,\n} {
- \draw [->] (1) to (\s);
+\foreach \s in {0,...,\n} {
+ \draw [->] (top) to (\s);
}
\end{tikzpicture}
\end{minipage}
\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}
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}
[proc/.style={circle,draw},
-level 1/.style={sibling distance=20mm,level distance=10mm},
-level 2/.style={sibling distance=10mm,font=\scriptsize}
+level 1/.style={sibling distance=28mm,level distance=10mm},
+level 2/.style={sibling distance=14mm,font=\scriptsize},
+level 3/.style={sibling distance=6mm,font=\tiny}
]
-\node[proc] (root) {0}
-child[->] foreach \x in {1,2} {node[proc] {\x}
- child foreach \y in {1,2} {node[proc] {\x-\y}
- }};
-
+\node[proc] (root) {1-0}
+child[->] foreach \x in {0,1} {node[proc] {1-\x}
+ child foreach \y in {0,1} {node[proc] {2-\y}
+ child foreach \z in {0,1} {node[proc] {3-\z}
+ }}};
+
+\node[text width=0.9\textwidth] (desc) at (0,-4) {maxdubina=4, potrebnodece=2,
+čvorovi prikazuju vrednosti pri kreiranju};
\end{tikzpicture}
\end{minipage}