1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
5 <html xmlns="http://www.w3.org/1999/xhtml" >
7 <title>Systèmes d'exploitation (2/2)</title>
9 <meta http-equiv="Content-Type"
10 content="text/html; charset=utf-8" />
11 <meta name="copyright"
12 content="Copyright © 2013 Kim Nguyễn" />
15 <script src="../jquery-1.9.1.min.js" type="text/javascript" ></script>
16 <!-- Load the library -->
17 <script src="../simpleWebSlides.js" type="text/javascript" ></script>
19 <link rel="stylesheet" href="../simpleWebSlides.css" type="text/css" media="all" />
20 <!-- Load a custom Theme, the class-element marks this style-sheet
21 a "theme" that can be swtiched dynamicaly -->
22 <link class="sws-theme" rel="stylesheet" title="U-Psud style" href="../themes/uPsud.css" type="text/css" />
24 <!-- Customize some templates and initialize -->
26 <script type="text/javascript">
27 SWS.Config['sws-slide-change'] = SWS.Effects.slideChangeFadeOutIn;
28 SWS.Config['sws-object-deactivate'] = SWS.Effects.objectDeactivateFadeOut;
29 SWS.Config['sws-object-activate'] = SWS.Effects.objectActivateFadeIn;
31 //Ensures that we load SWS at the very end, after MathJax has
34 $(window).load(SWS.Presentation.init);
38 -webkit-transform: scale(1.8) translateX(40%);
39 transform: scale(1.8) translateX(40%);
44 <a href="prog_internet_01.xhtml" class="sws-previous" />
45 <div class="sws-slide sws-cover sws-option-nofooter">
46 <h1>Programmation Internet</h1>
48 <a href="mailto:kn@lri.fr">kn@lri.fr</a><br/>
49 <a href="http://www.lri.fr/~kn/">http://www.lri.fr/~kn</a>
52 <div class="sws-slide" >
55 <li> Systèmes d'exploitation
57 <li>1.1 Principes des systèmes
58 d'exploitation ✔</li>
59 <li>1.2 Système de gestion de fichiers ✔</li>
60 <li class="hl">1.3 Système de gestion de processus</li>
66 <div class="sws-slide">
67 <h1> Définitions </h1>
70 <td style="width:6.5em;">Programme</td> <td>séquences d'instructions effectuant
71 une tâche sur un ordinateur</td>
74 <td>Exécutable</td> <td>fichier binaire contenant des
75 instructions machines interprétables par le
79 <td><i>Thread</i> </td>
80 <td>plus petite unité de traitement (≡
81 séquence d'instructions) pouvant être ordonnancée par
87 <td> instance d'un programme (≡ « un
88 programme en cours d'exécution »). Un processus est constitué
89 de un ou plusieurs <i>threads</i>.</td>
94 <div class="sws-slide">
95 <h1> Exemple: programme </h1>
96 <p>Dans un fichier « <code> counter.c </code> »
97 (<span style="color:red;">attention c'est du pseudo
99 <div style="float:left;clear:both;vertical-align:top;width:45%;display:inline-block;border-right: 1pt solid #494948;">
100 <code > int count = 0;
102 void <span style="color:green;">display()</span> {
105 printf("%i\n", count);
108 void <span style="color:red;">listen()</span> {
114 </div> <div style="vertical-align:top;display:inline-block;width:45%;">
115 <code> void <span style="color:blue;">main ()</span> {
116 run_function(display);
117 run_function(listen);
118 while (getc () != '\n') { };
124 <div class="sws-slide">
125 <h1> Exemple: programme </h1>
128 gcc -o counter.exe counter.c
130 Le <em>fichier</em> « <code>counter.exe</code> » est un
131 exécutable (fichier binaire contenant du code machine)<br/>
133 ./counter.exe <span style="margin-left:2em;font-size:smaller;color:red;"> ← il faut la permission +x sur le fichier</span>
136 Le contenu de l'exécutable est copié en mémoire et le processeur
137 commence à exécuter la première instruction du programme.
140 <div class="sws-slide">
141 <h1> Exemple: <i>threads</i> </h1>
143 <li class="sws-pause" ><span style="color:white;background:blue">main</span> </li>
144 <li class="sws-pause" ><span style="color:blue;">attente d'un évènement clavier
145 →</span><span style="color:red;">←changement de <i>thread</i></span>
147 <li class="sws-pause" ><span style="color:white;background:red">listen</span> </li>
148 <li class="sws-pause" ><span style="color:red;">attente de connexion →</span><span style="color:green;">←changement de <i>thread</i></span>
150 <li class="sws-pause" ><span style="color:white;background:green">display</span> (<span style="color:green;">affiche
151 0 à l'écran)</span> </li>
152 <li class="sws-pause" ><span style="color:green;">attente pendant 3s →</span> (les
153 3 <i>threads</i> attendent un évènement externe)<br/>
154 <span class="sws-pause" >nouvelle connexion sur le port 80</span> <span style="color:red;">←
155 réveil du <i>thread</i> <code style="color:red;">listen</code></span>
157 <li class="sws-pause" ><span style="color:white;background:red">listen</span>
158 (<span style="color:red;">incrémente <code style="color:red">count</code></span>)<br/>
159 <span style="color:red;">attente de connexion →</span><br/>
160 <span>… fin des 3s</span><br/>
161 <span style="color:green;">←
162 réveil du <i>thread</i> <code style="color:green;">display</code></span>
164 <li class="sws-pause" ><span style="color:white;background:green">display</span> (<span style="color:green;">affiche
165 1 à l'écran)</span> </li>
167 <p class="sws-pause" >Les <i>threads</i> partagent leur mémoire (variables communes)</p>
169 <div class="sws-slide">
170 <h1>Exemple: processus</h1>
171 <p>(différence: les processus
172 <em>ne partagent pas leur espace mémoire</em>)</p>
174 <li>Exécution de <code><span style="color:blue;">coun</span><span style="color:red;">ter</span><span style="color:green;">.exe</span></code> pendant 50㎲
177 de <code><span style="color:orange;">firefox.exe</span></code>
179 <li > Exécution du processus qui dessine le bureau pendant 50
183 <p>C'est le <em>gestionnaire de processus</em> qui décide quel
184 programme a la main et pour combien de temps (priorité aux
185 tâches critiques par exemple)<br/>
186 Le système d'exploitation stocke pour chaque processus un
187 ensemble d'informations, le PCB (<i>Process Control Block</i>).
190 <div class="sws-slide">
191 <h1>Proccess Control Block</h1>
192 <p>Le PCB contient:</p>
194 <li>l'<em>identificateur du processus</em> (pid)</li>
195 <li>l'<em>l'état</em> du processus (en attente, en exécution,
197 <li>le compteur d'instructions (<i>i.e.</i> où on en est dans
199 <li>le <em>contexte courant</em>(état des registres, …)</li>
200 <li>position dans <em>la file d'attente de priorité
202 <li>informations mémoire (zones allouées, zones accessibles,
203 zones partagées)</li>
204 <li>listes des fichiers ouverts (en lecture, en écriture),
205 liste des connexions ouvertes, … <br/> … </li>
208 <div class="sws-slide">
209 <h1>Opérations sur les processus</h1>
211 <li><em>création</em> et <em>destruction</em> de
213 <li><em>suspension</em> et <em>reprise</em></li>
214 <li><em>duplication</em> (<i>fork</i>)</li>
215 <li>modification de la <em>priorité</em></li>
216 <li>modification des <em>permissions </em></li>
219 <div class="sws-slide">
220 <h1>États d'un processus</h1>
221 <p>Un processus change d'état au cours de son exécution</p>
223 <tr><td style="width:6em;">Nouveau</td> <td>le processus est en cours de création</td></tr>
224 <tr><td>Exécution</td> <td>le processus s'exécute</td></tr>
225 <tr><td>En attente</td> <td>le processus attend un évènement
226 particulier (saisie au clavier, écriture sur le disque,
228 <tr><td>Prêt</td> <td>le processus est prêt à reprendre son
229 exécution et attend que l'OS lui rende la main</td></tr>
230 <tr><td>terminé</td> <td>le processus a fini son exécution</td></tr>
233 <div class="sws-slide">
234 <h1>États d'un processus</h1>
235 <p>L'OS détermine et modifie l'état d'un processus:</p>
237 <li>En fonction d'évènements internes au processus:
238 <ul><li>lecture d'un fichier (si le contenu n'est pas
239 disponible, le processus passe de « prêt » à « en attente
241 <li>le processus attends volontairement pendant x
246 En fonction d'évènements externes au processus:
247 <ul><li>un fichier devient disponible</li>
248 <li>un <i>timer</i> arrive à 0</li>
249 <li>le matériel déclenche une <em>interruption</em></li>
254 <div class="sws-slide">
255 <h1>États d'un processus</h1>
257 xmlns:svg="http://www.w3.org/2000/svg"
258 xmlns="http://www.w3.org/2000/svg"
262 viewBox="0 0 350 208"
272 style="overflow:visible">
274 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
275 transform="scale(-0.6,-0.6)"
277 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
281 transform="translate(-43.8,-16.162183)"
284 transform="translate(2.8953552e-6,-2.2416992e-6)"
291 style="font-size:12.5px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
294 id="tspan2987">Nouveau</tspan></text>
300 style="font-size:12.5px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
303 id="tspan2991">Prêt</tspan></text>
309 style="font-size:12.5px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
312 id="tspan2995">En exécution</tspan></text>
318 style="font-size:12.5px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
321 id="tspan2999">En attente</tspan></text>
330 style="fill:none;stroke:#ffff05;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
339 style="fill:none;stroke:#009eff;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
348 style="fill:none;stroke:#5aff0b;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
357 style="fill:none;stroke:#ff7b00;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
359 d="m 70,42.362183 c 0,35 20,55 55,55"
361 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
363 d="m 150,82.362183 c 30,-30 120,-30 145,0"
365 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
367 d="m 295,112.36218 c -30,30 -121.15954,29.51126 -146.15954,-0.48874"
369 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
371 d="m 305,112.36218 c 0,35 -10,70 -45,70"
373 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
375 d="m 185,182.36218 c -35.00001,0 -45,-35 -45,-70"
377 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
383 style="font-size:12.5px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
386 id="tspan2999-3">Terminé</tspan></text>
395 style="fill:none;stroke:#ff0000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
397 d="m 315,112.36218 c 13.42024,11.32439 24.04764,43.74151 35,85"
399 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
401 d="m 225,197.36218 c 15,15 60,15 95,15"
403 style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:2, 1;stroke-dashoffset:0;marker-end:url(#Arrow2Mend)" />
405 d="m 135,112.36218 c 5,85 20,100 185,105"
407 style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:2, 1;stroke-dashoffset:0;marker-end:url(#Arrow2Mend)" />
413 style="font-size:9px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
416 id="tspan4823">mise en route</tspan><tspan
419 id="tspan4825">par l'ordonnanceur</tspan></text>
425 style="font-size:9px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
428 id="tspan4823-1">interruption</tspan><tspan
431 id="tspan4825-7">par l'ordonnanceur</tspan></text>
437 style="font-size:9px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
440 id="tspan4825-74">attente E/S</tspan><tspan
443 id="tspan4864">interruption</tspan></text>
449 style="font-size:9px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
452 id="tspan4864-7">fin E/S</tspan><tspan
455 id="tspan4892">int. traitée</tspan><tspan
458 id="tspan4894">…</tspan></text>
464 style="font-size:9px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
467 id="tspan4864-1">terminaison</tspan><tspan
470 id="tspan4909">normale</tspan></text>
476 style="font-size:9px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
479 id="tspan4864-75">terminaison</tspan><tspan
482 id="tspan4935">anormale</tspan></text>
487 <div class="sws-slide">
488 <h1>La commande <code><em>ps</em></code></h1>
489 <p>Permet d'avoir des informations sur les processus en cours
490 d'exécution (voir « <code>man ps</code> » pour les
492 <code>$ ps -o user,pid,state,cmd x
495 kim 27030 Z [chrome] <defunct>
496 kim 27072 S /opt/google/chrome/chrome --type=renderer
499 kim 29858 S emacs cours.xhtml
500 kim 29869 R ps -o user,pid,state,cmd x
505 <div class="sws-slide">
506 <h1>États des processus (sous Linux)</h1>
508 <tr> <td>R</td> <td> <i>Running</i> (en cours d'exécution)</td> </tr>
509 <tr> <td>S</td> <td> <i>Interruptible sleep</i> (en attente,
510 interruptible) </td> </tr>
511 <tr> <td>D</td> <td> <i>Uninterruptible sleep</i> (en attente,
512 non-interruptible) </td> </tr>
513 <tr> <td>T</td> <td> <i>Stopped</i> (interrompu)</td></tr>
514 <tr> <td>Z</td> <td> <i>Zombie</i> (terminé mais toujours
515 listé par le système)</td> </tr>
519 <div class="sws-slide">
521 <p>L'OS peut envoyer des <em>signaux</em> à un processus. Sur réception
522 d'un signal, un processus peut interrompre son comportement normal
523 et exécuter son <em>gestionnaire de signal</em>. Quelques signaux:
525 <table class="simple">
526 <tr><th>Nom</th> <th>Code</th> <th>Description</th> </tr>
527 <tr><td>HUP</td> <td>1</td> <td>demande au processus de
528 s'interrompre</td></tr>
529 <tr><td>INT</td> <td>2</td> <td>demande au processus de se
531 <tr><td>ABRT</td> <td>2</td> <td>interrompt le processus et produit
532 un <i>dump</i></td></tr>
533 <tr><td>KILL</td> <td>9</td> <td>interrompt le processus immédiatement
535 <tr><td>SEGV</td> <td>11</td> <td>signale au processus une erreur mémoire
537 <tr><td>STOP</td> <td>24</td> <td>suspend l'exécution du processus
539 <tr><td>CONT</td> <td>28</td> <td>reprend l'exécution d'un processus suspendu
543 <div class="sws-slide">
544 <h1>Processus et terminal</h1>
545 <p >Un processus est lié au <em>terminal</em> dans lequel il est
546 lancé. Si on exécute un programme dans un terminal et que le
547 processus ne rend pas la main, le terminal est bloqué
553 On peut envoyer au processus le signal <em>STOP</em> en
554 tapant <code>ctrl-Z</code> dans le terminal:
562 Le processus est suspendu, la fenêtre est gelée (ne répond plus).
565 <div class="sws-slide">
566 <h1>Processus et terminal</h1>
567 <p> <span>On peut reprendre l'exécution du programme de deux
569 <code> $ fg </code><br/>
570 Reprend l'exécution du processus et le remet en avant plan (terminal
572 <span class="sws-pause"><code> $ bg </code><br/>
573 Reprend l'exécution du processus et le remet en arrière plan (terminal
575 <span class="sws-pause">On peut lancer un programme
576 directement en arrière plan en faisant:<br/>
577 <code> $ gedit & </code><br/></span>
578 <span class="sws-pause">On peut envoyer un signal à un
579 processus avec la commande « <code>kill [-signal] pid</code> »<br/>
580 <code> $ kill -9 2345 </code></span>
583 <div class="sws-slide">
584 <h1>Processus et entrées/sorties</h1>
585 <p>Le terminal et le processus sont liés par trois fichiers
588 <li> L'entrée standard (<code><em>stdin</em></code>), reliée
590 <li> La sortie standard (<code><em>stdout</em></code>), reliée
592 <li> La sortie d'erreur (<code><em>stderr</em></code>), reliée
595 <p>Dans le <i>shell</i>, on peut utiliser les
596 opérateurs <code><em><</em></code>, <code><em>></em></code>
597 et <code><em>2></em></code> pour récupérer le contenu
598 de <code><em>stdin</em></code>, <code><em>stdout</em></code>
599 et <code><em>stderr</em></code>:<br/>
602 $ ls -l > liste_fichiers.txt
603 $ ls -l * 2> erreurs.txt
607 <div class="sws-slide">
608 <h1>Processus et entrées/sorties</h1>
609 <p>Dans le <i>shell</i>, l'opérateur <em>|</em> permet
610 d'enchaîner la sortie d'un programme avec l'entrée d'un
612 <code> $ <span style="color:green;">ls -l *.txt</span> | <span style="color:blue">sort -n -r -k 5</span> | <span style="color:orange">head -n 1</span></code>
615 <li style="color:green;">affiche la liste détaillée des
617 <li style="color:blue;">trie (et affiche) l'entrée standard par ordre
618 numérique décroissant selon le 5ème champ</li>
619 <li style="color:orange;">affiche la première ligne de
620 l'entrée standard</li>
622 <div style="height:5em;position:relative;margin:0 0;padding:0 0;">
623 <code class="sws-onframe-1" style="position:absolute;color:green;"> -rw-rw-r 1 kim kim 471 Sep 14 16:25 bd.txt
624 -rw-rw-r 1 kim kim 234 Sep 15 17:46 foo.txt
625 -rw-rw-r 1 kim kim 1048576 Sep 24 09:20 large.txt</code>
626 <code class="sws-onframe-2" style="position:absolute;color:blue;"> -rw-rw-r 1 kim kim 1048576 Sep 24 09:20 large.txt
627 -rw-rw-r 1 kim kim 471 Sep 14 16:25 bd.txt
628 -rw-rw-r 1 kim kim 234 Sep 15 17:46 foo.txt
630 <code class="sws-onframe-3" style="position:absolute;color:orange;"> -rw-rw-r 1 kim kim 1048576 Sep 24 09:20 large.txt
635 <div class="sws-slide">
636 <h1>Processus de type <i>daemon</i></h1>
638 Un <i>daemon</i> (prononcé démon) est un processus
639 qui <em>non-interactif</em> qui tourne en tâche de fond (pas
640 d'entrée/sortie sur le terminal, pas d'interface graphique, …). On
641 communique avec ce processus via des <em>signaux</em> ou en lisant
642 ou écrivant dans des fichiers ou connexions réseau. Le plus souvent,
643 leur but est de fournir un <em>service</em>
645 <p>Exemple de scénario: « <i> Les utilisateurs doivent interagir avec
646 le matériel. L'accès au matériel demande des droits
647 administrateur.</i> »
650 <li>Solution 1 : tout le monde est administrateur (DOS, Win XP,
652 <li>Solution 2 : on crée un programme particulier qui a les
653 privilèges suffisants pour la tâche en question. Les utilisateurs
654 communiquent avec ce programme</li>
657 <div class="sws-slide">
658 <h1>Quelques <i>daemons</i> sous Linux</h1>
659 <table class="simple">
660 <tr><th>Nom</th> <th>Description</th> </tr>
661 <tr><td>sshd</td> <td><i>shell</i> distant sécurisé</td> </tr>
662 <tr><td>crond</td> <td>exécution périodique de programmes</td> </tr>
663 <tr><td>cupsd</td> <td>serveur d'impressions</td> </tr>
664 <tr><td>pulseaudio</td> <td>serveur de son (mixe les sons des
665 différentes applications)</td> </tr>
666 <tr><td>udevd</td> <td>détection de matériel <i>hotplug</i></td></tr>
667 <tr><td>nfsd</td> <td>serveur de fichier réseau</td></tr>
668 <tr><td>smtpd</td> <td>livraison des e-mail</td></tr>
669 <tr class="sws-pause"><td><em>httpd</em></td> <td>serveur de pages Web</td></tr>
672 <div class="sws-slide">
673 <h1>Architecture client-serveur</h1>
675 xmlns:svg="http://www.w3.org/2000/svg"
676 xmlns="http://www.w3.org/2000/svg"
688 style="overflow:visible">
690 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
691 transform="scale(-0.6,-0.6)"
693 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
700 style="overflow:visible">
702 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
703 transform="scale(-0.6,-0.6)"
705 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
712 style="overflow:visible">
714 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
715 transform="scale(-0.6,-0.6)"
717 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
724 style="overflow:visible">
726 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
727 transform="scale(-0.6,-0.6)"
729 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
736 style="overflow:visible">
738 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
739 transform="scale(-0.6,-0.6)"
741 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
748 style="overflow:visible">
750 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
751 transform="scale(-0.6,-0.6)"
753 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
760 style="overflow:visible">
762 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
763 transform="scale(-0.6,-0.6)"
765 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
772 style="overflow:visible">
774 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
775 transform="scale(-0.6,-0.6)"
777 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
784 style="overflow:visible">
786 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
787 transform="scale(-0.6,-0.6)"
789 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
796 style="overflow:visible">
798 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
799 transform="scale(-0.6,-0.6)"
801 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
808 style="overflow:visible">
810 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
811 transform="scale(-0.6,-0.6)"
813 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
820 style="overflow:visible">
822 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
823 transform="scale(-0.6,-0.6)"
825 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
832 style="overflow:visible">
834 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
835 transform="scale(-0.6,-0.6)"
837 style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
841 transform="translate(-158.9,-91.262203)"
846 transform="translate(-1.1999969,-3.4960022)"
853 style="font-size:12.5px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
856 id="tspan2987">Client</tspan></text>
865 style="fill:none;stroke:#ff8305;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
869 transform="translate(-1.2000122,1.5039978)"
876 style="font-size:12.5px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
879 id="tspan3164">Serveur</tspan></text>
888 style="fill:none;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
893 d="m 210,177.36218 c 15,10 30,10 45,0"
895 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
897 d="m 255.84443,171.31278 c -15,-10 -30,-10 -45,0"
899 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
902 transform="translate(210,0)"
905 transform="translate(-1.1999969,-3.4960022)"
912 style="font-size:12.5px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
915 id="tspan2987-3">Client</tspan></text>
924 style="fill:none;stroke:#ff8305;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
928 transform="translate(109.96827,1.0864348)"
931 d="m 210,177.36218 c 15,10 30,10 45,0"
933 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
935 d="m 255.84443,171.31278 c -15,-10 -30,-10 -45,0"
937 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
940 transform="matrix(0.56532555,0.82486788,-0.82486788,0.56532555,266.51188,-153.17986)"
943 d="m 210,177.36218 c 15,10 30,10 45,0"
945 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
947 d="m 255.84443,171.31278 c -15,-10 -30,-10 -45,0"
949 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
952 transform="translate(40,-70)"
955 transform="translate(-1.1999969,-3.4960022)"
962 style="font-size:12.5px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
965 id="tspan2987-4">Client</tspan></text>
974 style="fill:none;stroke:#ff8305;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
978 transform="translate(165,-70)"
981 transform="translate(-1.1999969,-3.4960022)"
988 style="font-size:12.5px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
991 id="tspan2987-6">Client</tspan></text>
1000 style="fill:none;stroke:#ff8305;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
1004 transform="matrix(-0.56532555,0.82486788,0.82486788,0.56532555,302.25486,-153.17986)"
1007 d="m 210,177.36218 c 15,10 30,10 45,0"
1009 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
1011 d="m 255.84443,171.31278 c -15,-10 -30,-10 -45,0"
1013 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
1016 transform="translate(40,70)"
1019 transform="translate(-1.1999969,-3.4960022)"
1025 xml:space="preserve"
1026 style="font-size:12.5px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
1029 id="tspan2987-4-1">Client</tspan></text>
1038 style="fill:none;stroke:#ff8305;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
1042 transform="translate(160,70)"
1045 transform="translate(-1.1999969,-3.4960022)"
1051 xml:space="preserve"
1052 style="font-size:12.5px;font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DIN;-inkscape-font-specification:DIN Semi-Bold"><tspan
1055 id="tspan2987-6-0">Client</tspan></text>
1064 style="fill:none;stroke:#ff8305;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
1068 transform="matrix(0.56532555,0.82486788,-0.82486788,0.56532555,327.54691,-80.416181)"
1071 d="m 210,177.36218 c 15,10 30,10 45,0"
1073 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
1075 d="m 255.84443,171.31278 c -15,-10 -30,-10 -45,0"
1077 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
1080 transform="matrix(-0.56532555,0.82486788,0.82486788,0.56532555,242.10224,-81.191343)"
1083 d="m 210,177.36218 c 15,10 30,10 45,0"
1085 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
1087 d="m 255.84443,171.31278 c -15,-10 -30,-10 -45,0"
1089 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
1095 Des processus <span style="color:blue;">clients</span> communiquent
1096 avec le <span style="color:orange;">serveur</span> à travers le
1097 réseau. Les clients sont indépendant et ne communiquent pas entre
1098 eux. <em>Attention</em> plusieurs clients peuvent se trouver su la
1099 même machine physique!
1102 <div class="sws-slide">
1103 <h1>Architecture client-serveur</h1>
1105 <li>Le serveur attend des connexions entrantes</li>
1106 <li>Les clients peuvent se connecter à tout moment</li>
1107 <li>L'application client est généralement légère, envoie une
1108 requête au serveur et attend un résultat</li>
1109 <li>Le serveur est une application plus lourde qui:
1110 <ul><li>effectue des calculs trop coûteux pour le client</li>
1111 <li>gère l'accès à une ressource distante partagée<br/>…</li>
1115 <p>Exemples: serveur de bases de données, serveur mail, serveur Web,
1116 terminal de carte bancaire, …</p>