fa93d63f9fa0c277c9aa10758f02c75ae4b6588d
[hacks/simpleWebSlides.git] / prog_internet / prog_internet_03.xhtml
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"
4           >
5 <html xmlns="http://www.w3.org/1999/xhtml" >
6   <head>
7     <title>Programmation Internet</title>
8
9     <meta http-equiv="Content-Type"
10           content="text/html; charset=utf-8" />
11     <meta name="copyright"
12           content="Copyright &#169; 2013 Kim Nguyễn" />
13
14     <!-- Load jQuery -->
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>
18
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" />
23
24     <!-- Customize some templates and initialize -->
25
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;
30
31       //Ensures that we load SWS at the very end, after MathJax has
32       //been initialized
33
34       $(window).load(SWS.Presentation.init);
35     </script>
36     <style>
37       #svg2,#svg3 {
38       -webkit-transform: scale(1.8) translateX(40%);
39       transform: scale(1.8) translateX(40%);
40       }
41     </style>
42   </head>
43   <body>
44
45     <div class="sws-slide sws-cover sws-option-nofooter">
46       <h1>Programmation Internet</h1>
47       <h1>Cours 2</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>
50     </div>
51
52     <div class="sws-slide" >
53       <h1> Plan </h1>
54       <ol >
55         <li> Systèmes d'exploitation &#10004;
56           <li class="hi"> Réseau et Internet 
57             <ul class="empty">
58               <li class="hi"> 2.1 Principes des réseaux</li>
59               <li> 2.2 TCP/IP</li>
60               <li> 3
61             </ul>
62         </li>
63       </ol>
64     </div>
65
66     <div class="sws-slide">
67       <h1> Définitions </h1>
68       <table class="desc">
69         <tr>
70           <td style="width:6.5em;">Programme</td> <td>séquences d'instructions effectuant
71             une tâche sur un ordinateur</td>
72         </tr>
73         <tr>
74           <td>Exécutable</td> <td>fichier binaire contenant des
75             instructions machines interprétables par le
76             microprocesseur</td>
77         </tr>
78         <tr>
79           <td><i>Thread</i> </td>
80           <td>plus petite unité de traitement (≡
81             séquence d'instructions) pouvant être ordonnancée par
82             l'OS
83           </td>
84         </tr>
85         <tr>
86           <td>Processus</td>
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>
90         </tr>
91       </table>
92     </div>
93
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
98           C</span>)</p>
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;
101  int exit = 0;
102  void <span style="color:green;">display()</span> {
103     while (exit == 0) {
104       sleep (3);
105       printf("%i\n", count);
106     }
107  }
108  void <span style="color:red;">listen()</span> {
109     while (exit == 0) {
110       wait_connect(80);
111       count++;
112   }
113  }</code>
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') { };
119     exit = 1;
120     return;
121  }</code>
122       </div>
123     </div>
124     <div class="sws-slide">
125       <h1> Exemple: programme </h1>
126       <p>Compilation <br/>
127         <code>
128           gcc -o counter.exe counter.c
129         </code><br/>
130         Le <em>fichier</em> « <code>counter.exe</code> » est un
131         exécutable (fichier binaire contenant du code machine)<br/>
132         <code>
133           ./counter.exe <span style="margin-left:2em;font-size:smaller;color:red;"> ← il faut la permission +x sur le fichier</span>
134         </code>
135         <br/>
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.
138       </p>
139     </div>
140     <div class="sws-slide">
141       <h1> Exemple: <i>threads</i> </h1>
142       <ol>
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>
146         </li>
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>
149         </li>
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>
156         </li>
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>
163         </li>
164         <li class="sws-pause" ><span style="color:white;background:green">display</span> (<span style="color:green;">affiche
165             1 à l'écran)</span> </li>
166       </ol>
167       <p class="sws-pause" >Les <i>threads</i> partagent leur mémoire (variables communes)</p>
168     </div>
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>
173       <ol>
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㎲
175         </li>
176         <li > Exécution
177           de <code><span style="color:orange;">firefox.exe</span></code>
178           pendant 50㎲ </li>
179         <li > Exécution du processus qui dessine le bureau pendant 50
180           ㎲<br/> … </li>
181         
182       </ol>
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>).
188       </p>
189     </div>
190     <div class="sws-slide">
191       <h1>Proccess Control Block</h1>
192       <p>Le PCB contient:</p>
193       <ul>
194         <li>l'<em>identificateur du processus</em> (pid)</li>
195         <li>l'<em>l'état</em> du processus (en attente, en exécution,
196           bloqué, …)</li>
197         <li>le compteur d'instructions (<i>i.e.</i> où on en est dans
198           le programme)</li>
199         <li>le <em>contexte courant</em>(état des registres, …)</li>
200         <li>position dans <em>la file d'attente de priorité
201             globale</em></li>
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>
206       </ul>
207     </div>
208     <div class="sws-slide">
209       <h1>Opérations sur les processus</h1>
210       <ul>
211         <li><em>création</em> et <em>destruction</em> de
212           processus</li>
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>
217       </ul>
218     </div>
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>
222       <table class="desc">
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,
227             …)</td></tr>
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>
231       </table>
232     </div>
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>
236       <ul>
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
240               »)</li>
241             <li>le processus attends volontairement pendant x
242               secondes<br/>…</li>
243           </ul>
244         </li>
245         <li>
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>
250           </ul>
251         </li>
252       </ul>
253     </div>
254     <div class="sws-slide">
255       <h1>États d'un processus</h1>
256       <svg
257          xmlns:svg="http://www.w3.org/2000/svg"
258          xmlns="http://www.w3.org/2000/svg"
259          version="1.1"
260          width="340.10629"
261          height="207.70399"
262          viewBox="0 0 350 208"
263          id="svg2"
264          >
265         <defs
266            id="defs4">
267           <marker
268              refX="0"
269              refY="0"
270              orient="auto"
271              id="Arrow2Mend"
272              style="overflow:visible">
273             <path
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)"
276                id="path3842"
277                style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
278           </marker>
279         </defs>
280         <g
281            transform="translate(-43.8,-16.162183)"
282            id="layer1">
283           <g
284              transform="translate(2.8953552e-6,-2.2416992e-6)"
285              id="g4956">
286             <text
287                x="50"
288                y="32.362183"
289                id="text2985"
290                xml:space="preserve"
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
292                                                                                                                                                                                                                                                                              x="50"
293                                                                                                                                                                                                                                                                              y="32.362183"
294                                                                                                                                                                                                                                                                              id="tspan2987">Nouveau</tspan></text>
295             <text
296                x="140"
297                y="102.36218"
298                id="text2989"
299                xml:space="preserve"
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
301                                                                                                                                                                                                                                                                              x="140"
302                                                                                                                                                                                                                                                                              y="102.36218"
303                                                                                                                                                                                                                                                                              id="tspan2991">Prêt</tspan></text>
304             <text
305                x="255"
306                y="102.36218"
307                id="text2993"
308                xml:space="preserve"
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
310                                                                                                                                                                                                                                                                              x="255"
311                                                                                                                                                                                                                                                                              y="102.36218"
312                                                                                                                                                                                                                                                                              id="tspan2995">En exécution</tspan></text>
313             <text
314                x="195"
315                y="187.36218"
316                id="text2997"
317                xml:space="preserve"
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
319                                                                                                                                                                                                                                                                              x="195"
320                                                                                                                                                                                                                                                                              y="187.36218"
321                                                                                                                                                                                                                                                                              id="tspan2999">En attente</tspan></text>
322             <rect
323                width="65"
324                height="20"
325                rx="5"
326                ry="5.25"
327                x="45"
328                y="17.362183"
329                id="rect3007"
330                style="fill:none;stroke:#ffff05;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
331             <rect
332                width="45"
333                height="20"
334                rx="5"
335                ry="5.25"
336                x="130"
337                y="87.362183"
338                id="rect3007-2"
339                style="fill:none;stroke:#009eff;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
340             <rect
341                width="90"
342                height="20"
343                rx="5"
344                ry="5.25"
345                x="250"
346                y="87.362183"
347                id="rect3007-8"
348                style="fill:none;stroke:#5aff0b;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
349             <rect
350                width="68"
351                height="19"
352                rx="5"
353                ry="5.25"
354                x="192"
355                y="173.36218"
356                id="rect3007-7"
357                style="fill:none;stroke:#ff7b00;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
358             <path
359                d="m 70,42.362183 c 0,35 20,55 55,55"
360                id="path3809"
361                style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
362             <path
363                d="m 150,82.362183 c 30,-30 120,-30 145,0"
364                id="path3809-2"
365                style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
366             <path
367                d="m 295,112.36218 c -30,30 -121.15954,29.51126 -146.15954,-0.48874"
368                id="path3809-2-8"
369                style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
370             <path
371                d="m 305,112.36218 c 0,35 -10,70 -45,70"
372                id="path3809-9"
373                style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
374             <path
375                d="m 185,182.36218 c -35.00001,0 -45,-35 -45,-70"
376                id="path3809-9-6"
377                style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
378             <text
379                x="325"
380                y="217.36218"
381                id="text2997-5"
382                xml:space="preserve"
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
384                                                                                                                                                                                                                                                                              x="325"
385                                                                                                                                                                                                                                                                              y="217.36218"
386                                                                                                                                                                                                                                                                              id="tspan2999-3">Terminé</tspan></text>
387             <rect
388                width="58"
389                height="19"
390                rx="5"
391                ry="5.25"
392                x="322"
393                y="203.36218"
394                id="rect3007-7-6"
395                style="fill:none;stroke:#ff0000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
396             <path
397                d="m 315,112.36218 c 13.42024,11.32439 24.04764,43.74151 35,85"
398                id="path3809-9-6-7"
399                style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
400             <path
401                d="m 225,197.36218 c 15,15 60,15 95,15"
402                id="path3809-9-6-2"
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)" />
404             <path
405                d="m 135,112.36218 c 5,85 20,100 185,105"
406                id="path3809-8"
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)" />
408             <text
409                x="225"
410                y="37.362183"
411                id="text4821"
412                xml:space="preserve"
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
414                                                                                                                                                                                                                                                                                                                x="225"
415                                                                                                                                                                                                                                                                                                                y="37.362183"
416                                                                                                                                                                                                                                                                                                                id="tspan4823">mise en route</tspan><tspan
417                                                                                                                                                                                                                                                                                                                                                       x="225"
418                                                                                                                                                                                                                                                                                                                                                       y="48.612183"
419                                                                                                                                                                                                                                                                                                                                                       id="tspan4825">par l'ordonnanceur</tspan></text>
420             <text
421                x="220"
422                y="117.36218"
423                id="text4821-3"
424                xml:space="preserve"
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
426                                                                                                                                                                                                                                                                                                                x="220"
427                                                                                                                                                                                                                                                                                                                y="112.36218"
428                                                                                                                                                                                                                                                                                                                id="tspan4823-1">interruption</tspan><tspan
429                                                                                                                                                                                                                                                                                                                                                        x="220"
430                                                                                                                                                                                                                                                                                                                                                        y="123.61218"
431                                                                                                                                                                                                                                                                                                                                                        id="tspan4825-7">par l'ordonnanceur</tspan></text>
432             <text
433                x="300"
434                y="187.36218"
435                id="text4821-0"
436                xml:space="preserve"
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
438                                                                                                                                                                                                                                                                                                                x="300"
439                                                                                                                                                                                                                                                                                                                y="187.36218"
440                                                                                                                                                                                                                                                                                                                id="tspan4825-74">attente E/S</tspan><tspan
441                                                                                                                                                                                                                                                                                                                                                        x="300"
442                                                                                                                                                                                                                                                                                                                                                        y="198.61218"
443                                                                                                                                                                                                                                                                                                                                                        id="tspan4864">interruption</tspan></text>
444             <text
445                x="180"
446                y="152.36218"
447                id="text4821-0-2"
448                xml:space="preserve"
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
450                                                                                                                                                                                                                                                                                                                x="180"
451                                                                                                                                                                                                                                                                                                                y="152.36218"
452                                                                                                                                                                                                                                                                                                                id="tspan4864-7">fin E/S</tspan><tspan
453                                                                                                                                                                                                                                                                                                                                                   x="180"
454                                                                                                                                                                                                                                                                                                                                                   y="163.61218"
455                                                                                                                                                                                                                                                                                                                                                   id="tspan4892">int. traitée</tspan><tspan
456                                                                                                                                                                                                                                                                                                                                                                                         x="180"
457                                                                                                                                                                                                                                                                                                                                                                                         y="174.86218"
458                                                                                                                                                                                                                                                                                                                                                                                         id="tspan4894">…</tspan></text>
459             <text
460                x="360"
461                y="147.36218"
462                id="text4821-0-29"
463                xml:space="preserve"
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
465                                                                                                                                                                                                                                                                                                                x="365"
466                                                                                                                                                                                                                                                                                                                y="147.36218"
467                                                                                                                                                                                                                                                                                                                id="tspan4864-1">terminaison</tspan><tspan
468                                                                                                                                                                                                                                                                                                                                                       x="365"
469                                                                                                                                                                                                                                                                                                                                                       y="158.61218"
470                                                                                                                                                                                                                                                                                                                                                       id="tspan4909">normale</tspan></text>
471             <text
472                x="170"
473                y="212.36218"
474                id="text4821-0-7"
475                xml:space="preserve"
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
477                                                                                                                                                                                                                                                                                                                x="170"
478                                                                                                                                                                                                                                                                                                                y="212.36218"
479                                                                                                                                                                                                                                                                                                                id="tspan4864-75">terminaison</tspan><tspan
480                                                                                                                                                                                                                                                                                                                                                        x="170"
481                                                                                                                                                                                                                                                                                                                                                        y="223.61218"
482                                                                                                                                                                                                                                                                                                                                                        id="tspan4935">anormale</tspan></text>
483           </g>
484         </g>
485       </svg>
486     </div>
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
491         options):<br/>
492         <code>$ ps -o user,pid,state,cmd x
493           USER     PID   S CMD
494           …
495           kim      27030 Z [chrome] &lt;defunct&gt;
496           kim      27072 S /opt/google/chrome/chrome --type=renderer
497           kim      29146 S bash
498           kim      29834 S evince
499           kim      29858 S emacs cours.xhtml
500           kim      29869 R ps -o user,pid,state,cmd x
501         </code><br/>
502       </p>
503       
504     </div>
505     <div class="sws-slide">
506       <h1>États des processus (sous Linux)</h1>
507       <table class="desc">
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>
516       </table>
517     </div>
518
519     <div class="sws-slide">
520       <h1>Signaux</h1>
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:
524       </p>
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
530             terminer</td></tr>
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
534         </td></tr>
535         <tr><td>SEGV</td> <td>11</td> <td>signale au processus une erreur mémoire
536         </td></tr>
537         <tr><td>STOP</td> <td>24</td> <td>suspend l'exécution du processus
538         </td></tr>
539         <tr><td>CONT</td> <td>28</td> <td>reprend l'exécution d'un processus suspendu
540         </td></tr>
541       </table>
542     </div>
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é
548 <code >
549
550  $ gedit
551
552 </code>
553         On peut envoyer au processus le signal <em>STOP</em> en
554         tapant <code>ctrl-Z</code> dans le terminal:
555 <code>
556
557  $ gedit
558  ^Z
559  [1]+  Stopped            gedit
560
561 </code>
562         Le processus est suspendu, la fenêtre est gelée (ne répond plus).
563       </p>
564     </div>
565     <div class="sws-slide">
566       <h1>Processus et terminal</h1>
567       <p> <span>On peut reprendre l'exécution du programme de deux
568           manières:<br/>
569           <code> $ fg </code><br/>
570           Reprend l'exécution du processus et le remet en avant plan (terminal
571           bloqué)</span><br/>
572         <span class="sws-pause"><code> $ bg </code><br/>
573           Reprend l'exécution du processus et le remet en arrière plan (terminal
574 libre)</span><br/>
575         <span class="sws-pause">On peut lancer un programme
576           directement en arrière plan en faisant:<br/>
577 <code> $ gedit &amp; </code><br/></span>
578         <span class="sws-pause">On peut envoyer un signal à un
579           processus avec la commande «&nbsp;<code>kill [-signal] pid</code>&nbsp;»<br/>
580 <code> $ kill -9 2345  </code></span>
581         </p>
582         </div>
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
586       spéciaux:</p>
587       <ol>
588         <li> L'entrée standard (<code><em>stdin</em></code>), reliée
589           au clavier</li>
590         <li> La sortie standard (<code><em>stdout</em></code>), reliée
591           à l'affichage</li>
592         <li> La sortie d'erreur (<code><em>stderr</em></code>), reliée
593           à l'affichage</li>
594       </ol>
595       <p>Dans le <i>shell</i>, on peut utiliser les
596       opérateurs <code><em>&lt;</em></code>, <code><em>&gt;</em></code>
597       et <code><em>2&gt;</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/>
600 <code>
601 $ sort &lt; toto.txt
602 $ ls -l  &gt; liste_fichiers.txt
603 $ ls -l * 2&gt; erreurs.txt
604 </code>
605 </p>
606 </div>
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
611       autre:<br/>
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>
613       </p>
614       <ol>
615         <li style="color:green;">affiche la liste détaillée des
616         fichiers textes</li>
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>
621       </ol>
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
629 </code>
630 <code class="sws-onframe-3" style="position:absolute;color:orange;"> -rw-rw-r    1 kim kim 1048576 Sep 24 09:20 large.txt
631 </code>
632       </div>
633
634     </div>
635 <div class="sws-slide">
636   <h1>Processus de type <i>daemon</i></h1>
637 <p>
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>
644 </p>
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> »
648 </p>
649 <ul class="empty">
650   <li>Solution 1 : tout le monde est administrateur (DOS, Win XP,
651   …)</li>
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>
655 </ul>
656 </div>
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>
670 </table>
671 </div>
672 <div class="sws-slide">
673 <h1>Architecture client-serveur</h1>
674 <svg
675    xmlns:svg="http://www.w3.org/2000/svg"
676    xmlns="http://www.w3.org/2000/svg"
677    version="1.1"
678    width="256"
679    height="163.70399"
680    id="svg3">
681   <defs
682      id="defs3115">
683     <marker
684        refX="0"
685        refY="0"
686        orient="auto"
687        id="Arrow2Mend"
688        style="overflow:visible">
689       <path
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)"
692          id="path3842"
693          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
694     </marker>
695     <marker
696        refX="0"
697        refY="0"
698        orient="auto"
699        id="Arrow2Mend-9"
700        style="overflow:visible">
701       <path
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)"
704          id="path3842-7"
705          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
706     </marker>
707     <marker
708        refX="0"
709        refY="0"
710        orient="auto"
711        id="Arrow2Mend-2"
712        style="overflow:visible">
713       <path
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)"
716          id="path3842-3"
717          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
718     </marker>
719     <marker
720        refX="0"
721        refY="0"
722        orient="auto"
723        id="Arrow2Mend-1"
724        style="overflow:visible">
725       <path
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)"
728          id="path3842-71"
729          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
730     </marker>
731     <marker
732        refX="0"
733        refY="0"
734        orient="auto"
735        id="marker4143"
736        style="overflow:visible">
737       <path
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)"
740          id="path4145"
741          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
742     </marker>
743     <marker
744        refX="0"
745        refY="0"
746        orient="auto"
747        id="Arrow2Mend-11"
748        style="overflow:visible">
749       <path
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)"
752          id="path3842-39"
753          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
754     </marker>
755     <marker
756        refX="0"
757        refY="0"
758        orient="auto"
759        id="marker4143-8"
760        style="overflow:visible">
761       <path
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)"
764          id="path4145-9"
765          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
766     </marker>
767     <marker
768        refX="0"
769        refY="0"
770        orient="auto"
771        id="Arrow2Mend-6"
772        style="overflow:visible">
773       <path
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)"
776          id="path3842-1"
777          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
778     </marker>
779     <marker
780        refX="0"
781        refY="0"
782        orient="auto"
783        id="marker4245"
784        style="overflow:visible">
785       <path
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)"
788          id="path4247"
789          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
790     </marker>
791     <marker
792        refX="0"
793        refY="0"
794        orient="auto"
795        id="Arrow2Mend-7"
796        style="overflow:visible">
797       <path
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)"
800          id="path3842-8"
801          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
802     </marker>
803     <marker
804        refX="0"
805        refY="0"
806        orient="auto"
807        id="marker4353"
808        style="overflow:visible">
809       <path
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)"
812          id="path4355"
813          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
814     </marker>
815     <marker
816        refX="0"
817        refY="0"
818        orient="auto"
819        id="Arrow2Mend-8"
820        style="overflow:visible">
821       <path
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)"
824          id="path3842-4"
825          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
826     </marker>
827     <marker
828        refX="0"
829        refY="0"
830        orient="auto"
831        id="marker4353-5"
832        style="overflow:visible">
833       <path
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)"
836          id="path4355-9"
837          style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" />
838     </marker>
839   </defs>
840   <g
841      transform="translate(-158.9,-91.262203)"
842      id="layer1">
843     <g
844        id="g3947">
845       <g
846          transform="translate(-1.1999969,-3.4960022)"
847          id="g4068">
848         <text
849            x="166.2"
850            y="180.85818"
851            id="text2985"
852            xml:space="preserve"
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
854              x="166.2"
855              y="180.85818"
856              id="tspan2987">Client</tspan></text>
857         <rect
858            width="43.800003"
859            height="21.503998"
860            rx="5"
861            ry="5.25"
862            x="161.2"
863            y="165.85818"
864            id="rect3007"
865            style="fill:none;stroke:#ff8305;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
866       </g>
867     </g>
868     <g
869        transform="translate(-1.2000122,1.5039978)"
870        id="g3942">
871       <text
872          x="266.20001"
873          y="175.85818"
874          id="text2985-1"
875          xml:space="preserve"
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
877            x="266.20001"
878            y="175.85818"
879            id="tspan3164">Serveur</tspan></text>
880       <rect
881          width="53.799988"
882          height="21.503998"
883          rx="5"
884          ry="5.25"
885          x="261.20001"
886          y="160.85818"
887          id="rect3007-8"
888          style="fill:none;stroke:#0000ff;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
889     </g>
890     <g
891        id="g4097">
892       <path
893          d="m 210,177.36218 c 15,10 30,10 45,0"
894          id="path3809"
895          style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
896       <path
897          d="m 255.84443,171.31278 c -15,-10 -30,-10 -45,0"
898          id="path3809-5"
899          style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
900     </g>
901     <g
902        transform="translate(210,0)"
903        id="g3947-5">
904       <g
905          transform="translate(-1.1999969,-3.4960022)"
906          id="g4068-3">
907         <text
908            x="166.2"
909            y="180.85818"
910            id="text2985-0"
911            xml:space="preserve"
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
913              x="166.2"
914              y="180.85818"
915              id="tspan2987-3">Client</tspan></text>
916         <rect
917            width="43.800003"
918            height="21.503998"
919            rx="5"
920            ry="5.25"
921            x="161.2"
922            y="165.85818"
923            id="rect3007-5"
924            style="fill:none;stroke:#ff8305;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
925       </g>
926     </g>
927     <g
928        transform="translate(109.96827,1.0864348)"
929        id="g4097-7">
930       <path
931          d="m 210,177.36218 c 15,10 30,10 45,0"
932          id="path3809-3"
933          style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
934       <path
935          d="m 255.84443,171.31278 c -15,-10 -30,-10 -45,0"
936          id="path3809-5-7"
937          style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
938     </g>
939     <g
940        transform="matrix(0.56532555,0.82486788,-0.82486788,0.56532555,266.51188,-153.17986)"
941        id="g4097-0">
942       <path
943          d="m 210,177.36218 c 15,10 30,10 45,0"
944          id="path3809-2"
945          style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
946       <path
947          d="m 255.84443,171.31278 c -15,-10 -30,-10 -45,0"
948          id="path3809-5-5"
949          style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
950     </g>
951     <g
952        transform="translate(40,-70)"
953        id="g3947-3">
954       <g
955          transform="translate(-1.1999969,-3.4960022)"
956          id="g4068-36">
957         <text
958            x="166.2"
959            y="180.85818"
960            id="text2985-2"
961            xml:space="preserve"
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
963              x="166.2"
964              y="180.85818"
965              id="tspan2987-4">Client</tspan></text>
966         <rect
967            width="43.800003"
968            height="21.503998"
969            rx="5"
970            ry="5.25"
971            x="161.2"
972            y="165.85818"
973            id="rect3007-7"
974            style="fill:none;stroke:#ff8305;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
975       </g>
976     </g>
977     <g
978        transform="translate(165,-70)"
979        id="g3947-1">
980       <g
981          transform="translate(-1.1999969,-3.4960022)"
982          id="g4068-1">
983         <text
984            x="166.2"
985            y="180.85818"
986            id="text2985-9"
987            xml:space="preserve"
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
989              x="166.2"
990              y="180.85818"
991              id="tspan2987-6">Client</tspan></text>
992         <rect
993            width="43.800003"
994            height="21.503998"
995            rx="5"
996            ry="5.25"
997            x="161.2"
998            y="165.85818"
999            id="rect3007-6"
1000            style="fill:none;stroke:#ff8305;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
1001       </g>
1002     </g>
1003     <g
1004        transform="matrix(-0.56532555,0.82486788,0.82486788,0.56532555,302.25486,-153.17986)"
1005        id="g4097-0-8">
1006       <path
1007          d="m 210,177.36218 c 15,10 30,10 45,0"
1008          id="path3809-2-9"
1009          style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
1010       <path
1011          d="m 255.84443,171.31278 c -15,-10 -30,-10 -45,0"
1012          id="path3809-5-5-7"
1013          style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
1014     </g>
1015     <g
1016        transform="translate(40,70)"
1017        id="g3947-3-1">
1018       <g
1019          transform="translate(-1.1999969,-3.4960022)"
1020          id="g4068-36-8">
1021         <text
1022            x="166.2"
1023            y="180.85818"
1024            id="text2985-2-8"
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
1027              x="166.2"
1028              y="180.85818"
1029              id="tspan2987-4-1">Client</tspan></text>
1030         <rect
1031            width="43.800003"
1032            height="21.503998"
1033            rx="5"
1034            ry="5.25"
1035            x="161.2"
1036            y="165.85818"
1037            id="rect3007-7-3"
1038            style="fill:none;stroke:#ff8305;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
1039       </g>
1040     </g>
1041     <g
1042        transform="translate(160,70)"
1043        id="g3947-1-7">
1044       <g
1045          transform="translate(-1.1999969,-3.4960022)"
1046          id="g4068-1-2">
1047         <text
1048            x="166.2"
1049            y="180.85818"
1050            id="text2985-9-4"
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
1053              x="166.2"
1054              y="180.85818"
1055              id="tspan2987-6-0">Client</tspan></text>
1056         <rect
1057            width="43.800003"
1058            height="21.503998"
1059            rx="5"
1060            ry="5.25"
1061            x="161.2"
1062            y="165.85818"
1063            id="rect3007-6-4"
1064            style="fill:none;stroke:#ff8305;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
1065       </g>
1066     </g>
1067     <g
1068        transform="matrix(0.56532555,0.82486788,-0.82486788,0.56532555,327.54691,-80.416181)"
1069        id="g4097-0-2">
1070       <path
1071          d="m 210,177.36218 c 15,10 30,10 45,0"
1072          id="path3809-2-3"
1073          style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
1074       <path
1075          d="m 255.84443,171.31278 c -15,-10 -30,-10 -45,0"
1076          id="path3809-5-5-5"
1077          style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
1078     </g>
1079     <g
1080        transform="matrix(-0.56532555,0.82486788,0.82486788,0.56532555,242.10224,-81.191343)"
1081        id="g4097-0-3">
1082       <path
1083          d="m 210,177.36218 c 15,10 30,10 45,0"
1084          id="path3809-2-7"
1085          style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
1086       <path
1087          d="m 255.84443,171.31278 c -15,-10 -30,-10 -45,0"
1088          id="path3809-5-5-9"
1089          style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
1090     </g>
1091   </g>
1092 </svg>
1093 <p>
1094   <br/><br/>
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!
1100 </p>
1101 </div>
1102 <div class="sws-slide">
1103   <h1>Architecture client-serveur</h1>
1104 <ul>
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>
1112     </ul>
1113   </li>
1114 </ul>
1115 <p>Exemples: serveur de bases de données, serveur mail, serveur Web,
1116   terminal de carte bancaire, …</p>
1117 </div>
1118   </body>
1119 </html>