SPB Git

Repository Public MIT Research preview

MA02-F08-chemin-critique-avant-apres.tex 2.2 KB 28 lines latex

1% MA02-F08 — Chemin critique avant et après parallélisation : on scinde E, puis H, en deux moitiés parallèles.2% Idée : paralléliser une tâche critique ne raccourcit le total que jusqu'à la chaîne suivante. Scinder E fait3% gagner UNE minute (33 → 32), parce que la chaîne par F attendait une minute derrière ; le chemin critique s'est4% DÉPLACÉ. Et le travail total augmente (51 → 52 → 53 min) : chaque moitié paie une consigne et une relecture.5% Données : trois exécutions réelles du moteur avec trois agents (MA02-donnees.tex). Minutes de l'exemple.6\input{MA02-donnees.tex}%7\begin{tikzpicture}[x=1mm, y=1mm]8  \path (0,0) rectangle (142,56);9  \def\ech{3.2}% mm par minute10  \def\xo{33}%11  \newcommand{\MBvariante}[6]{% y du haut, titre, travail, durée (nombre), durée (texte), barres12    \node[atlas note, anchor=north west, align=left, text=maTexte] at (0,#1+2.4) {\textbf{#2}\\ travail : #3 min\\ fin : \textbf{#5 min}};13    \foreach \i/\k/\deb/\fin/\crit in #6 {14      \ifnum\crit=1 \def\st{ma tache critique}\else\def\st{ma tache}\fi15      \node[\st, anchor=west, minimum width=(\fin-\deb)*\ech mm-.5mm, minimum height=3.7mm, inner xsep=0pt, inner ysep=0pt,16        font=\AtlasSizeTiny\bfseries] at (\xo+\deb*\ech+.25,#1+4.4-4.4*\k) {\i};}17    \draw[maValide, line width=1.2pt] (\xo+#4*\ech,#1-11.2) -- ++(0,13.6);}18  \MBvariante{52.4}{Avant}{\MBExAvantTseq}{33}{\MBExAvantCrit}{\MBExAvantBarres}19  \MBvariante{37.6}{E scindée}{\MBExETseq}{32}{\MBExECrit}{\MBExEBarres}20  \MBvariante{22.8}{E et H scindées}{\MBExEHTseq}{28.5}{\MBExEHCrit}{\MBExEHBarres}21  \draw[maNeutre, line width=.4pt] (0,40) -- (142,40) (0,25.2) -- (142,25.2);22  \draw[maNeutre, line width=.8pt, -{Stealth[length=4pt,width=3.6pt]}] (\xo,8.6) -- ++(108,0);23  \foreach \t in {0,5,10,15,20,25,30}{\draw[maNeutre, line width=.6pt] (\xo+\t*\ech,8.6) -- ++(0,-1.1) node[atlas note, anchor=north, inner sep=1pt] {\t};}24  \node[atlas note, anchor=north east, inner sep=1pt] at (142,7.4) {min};25  \node[atlas tag=maRisque, anchor=south west] at (0,0) {CONTOUR CORAIL = CHEMIN CRITIQUE};26  \node[atlas note, anchor=south east, text=maTexte] at (142,.2) {trois agents ; chaque moitié coûte \MBExSurcout\ min de plus que la demi-tâche};27\end{tikzpicture}28
Files main
Menu

Theme