\begin{figure}[htb]
\centering
- \includegraphics[width=10cm]{img/struct_sys}
+% \includegraphics[width=10cm]{img/struct_sys}
+ \begin{tikzpicture}
+ \filldraw[fill=black!20] (0,0) rectangle (7.5,1);
+ \draw (3.75,0.5) node {System Call Interface};
+ \filldraw[fill=black!35] (0,1) rectangle (7.5,4);
+ \draw (3.75,2.5) node {\huge{kernel}};
+ \filldraw[fill=black!20] (0,4) rectangle (2.5,5);
+ \draw (1.25,4.5) node {scheduler};
+ \filldraw[fill=black!20] (2.5,4) rectangle (5,5);
+ \draw (3.75,4.5) node {VM};
+ \filldraw[fill=black!20] (5,4) rectangle (7.5,5);
+ \draw (6.25,4.5) node {driver};
+
+ \draw (1.25,7) node(cpu) [ellipse,draw] {CPU};
+ \draw (3.75,7) node(mem) [ellipse,draw] {memoria};
+ \draw (6.25,7) node(disk) [ellipse,draw] {disco};
+
+ \draw[<->] (cpu) -- (1.25,5);
+ \draw[<->] (mem) -- (3.75,5);
+ \draw[<->] (disk) -- (6.25,5);
+
+ \draw (7.5,0) node [anchor=base west] {kernel space};
+ \draw (7.5,-1) node [anchor=west] {user space};
+
+ \draw (-1,-0.5) -- (8.5, -0.5);
+
+ \draw (0,-2) rectangle (7.5,-1);
+ \draw (3.75, -1.5) node {GNU C Library};
+ \draw[->] (1.25,-1) -- (1.25,0);
+ \draw[->] (3.75,-1) -- (3.75,0);
+ \draw[->] (6.25,-1) -- (6.25,0);
+
+ \draw (1.25,-3) node(proc1) [rectangle,draw] {processo};
+ \draw (3.75,-3) node(proc2) [rectangle,draw] {processo};
+ \draw (6.25,-3) node(proc3) [rectangle,draw] {processo};
+
+ \draw[->] (1.25,-2) -- (proc1);
+ \draw[->] (3.75,-2) -- (proc2);
+ \draw[->] (6.25,-2) -- (proc3);
+ \end{tikzpicture}
\caption{Schema di massima della struttura di interazione fra processi,
kernel e dispositivi in Linux.}
\label{fig:intro_sys_struct}
\begin{figure}[htb]
\centering
- \includegraphics[width=9cm]{img/proc_beginend}
+% \includegraphics[width=9cm]{img/proc_beginend}
+ \begin{tikzpicture}[>=stealth]
+ \filldraw[fill=black!35] (-0.3,0) rectangle (12,1);
+ \draw(5.5,0.5) node {\large{kernel}};
+
+ \filldraw[fill=black!15] (1.5,2) rectangle (4,3);
+ \draw (2.75,2.5) node {\texttt{ld-linux.so}};
+ \draw [->] (2.75,1) -- (2.75,2);
+ \draw (2.75,1.5) node [anchor=west]{\texttt{exec}};
+
+ \filldraw[fill=black!15,rounded corners] (1.5,4) rectangle (4,5);
+ \draw (2.75,4.5) node {\texttt{main}};
+
+ \draw [<->, dashed] (2.75,3) -- (2.75,4);
+ \draw [->] (1.5,4.5) -- (0.3,4.5) -- (0.3,1);
+ \draw (0.9,4.5) node [anchor=south] {\texttt{\_exit}};
+
+ \filldraw[fill=black!15,rounded corners] (1.5,6) rectangle (4,7);
+ \draw (2.75,6.5) node {\texttt{funzione}};
+
+ \draw [<->, dashed] (2.75,5) -- (2.75,6);
+ \draw [->] (1.5,6.5) -- (0.05,6.5) -- (0.05,1);
+ \draw (0.9,6.5) node [anchor=south] {\texttt{\_exit}};
+
+ \draw (6.75,4.5) node (exit) [rectangle,fill=black!15,minimum width=2.5cm,minimum height=1cm,rounded corners, draw]{\texttt{exit}};
+
+ \draw[->] (4,6.5) -- node[anchor=south west]{\texttt{exit}} (exit);
+ \draw[->] (4,4.5) -- node[anchor=south]{\texttt{exit}} (exit);
+ \draw[->] (exit) -- node[anchor=east]{\texttt{\_exit}}(6.75,1);
+
+ \draw (10,4.5) node (exithandler1) [rectangle,fill=black!15,rounded corners, draw]{exit handler};
+ \draw (10,5.5) node (exithandler2) [rectangle,fill=black!15,rounded corners, draw]{exit handler};
+ \draw (10,3.5) node (stream) [rectangle,fill=black!15,rounded corners, draw]{chiusura stream};
+
+ \draw[<->, dashed] (exithandler1) -- (exit);
+ \draw[<->, dashed] (exithandler2) -- (exit);
+ \draw[<->, dashed] (stream) -- (exit);
+ \end{tikzpicture}
\caption{Schema dell'avvio e della conclusione di un programma.}
\label{fig:proc_prog_start_stop}
\end{figure}