Td2 correction - systèmes d’exploitation - télécharger pdf

Télécharger PDF

Obtenir le pack complet des cours, TDs, examens sur Systèmes d’Exploitation!

Vous souhaitez maîtriser Systèmes d’Exploitation ? Ne cherchez plus, nous avons le pack bien choisi pour vous.

pack complet des cours, TDs, TPs et examens exercices sur Systèmes d’Exploitation

Accédez à une collection complète des supports de cours, des travaux dirigés (TDs) corrigés, TPs avec solution, examens...

Télécharger pack

Institut Supérieur d’Informatique

2009-2010 1

ère année SIL

Semestre 2 Page1

Systèmes d’Exploitation 1 Série TD N°2 - Correction Ordonnancement des processus (2)

Exercice 1

Algorithme FCFST RM = ((10-0)+(16-0)+(18-0)+(22-0)+(30-0)) / 5 = 19,2 Algorithme SJFT RM = ((2-0)+(6-0)+(12-0)+(20-0)+(30-0)) / 5 = 14 Algorithme RR (quantum=4) T

RM = ((10-0)+(14-0)+(24-0)+(28-0)+(30-0)) / 5 = 21,2 ABCDE1016 182230 0ABCDE 2612 2030 0ABCDE 4

141822300 ABEA8 1024 28

Institut Supérieur d’Informatique

2009-2010 1

ère année SIL

Semestre 2 Page2

Exercice 2

Priorité Statique T

RM = ((28-10)+(29-3)+(41-0)+(51-0)) / 4 = 34T AM = ((18-18)+(26-8)+(41-15)+(51-10)) / 4 = 21,25 Priorité Dynamique T

RM = ((30-0)+(47-0)+(41-3)+(51-10)) / 4 = 39T AM = ((30-0-10)+(47-0-15)+(41-3-8)+(51-10-18)) / 4 = 26,25 0 3 5 10 15 20 25 30 35 40 4

1 45 P

1 2 2 5+10/10

=2 0+5/10=

1 5+5/10=1 10+5/10

=2 15+5/10=

2 P

2 3 3 2+12/15

=1 7+12/15

=1 12+12/15

=2 0+7/15=

0 5+7/15=1 10+7/15=

1 15+7/15

=1 0+2/15

=0 0 5+2/15

=0 P

3 4 0+6/8=1 5+6/8=1 10+6/8=2 15+6/8=

3 0+1/8=0 5+1/8=1 10+1/8=

1 15+1/8

=2 P4 5 0+13/18=

1 5+13/18

=1 10+13/18

=1 15+13/18

=2 0+8/18=

0 5+8/18

=1 1 0+4/18

=0 Hypothèses : - Au démarrage, les priorités des processus sont égales à leurs priorités statiques (indiquées dans le tableau). - Les priorités ne sont calculées que toutes les 5mn. Pour les autres temps, on prend la priorité précédente. - Le temps d’attente d’un processus est son temps d’attente depuis sa dernière exécution. - Si on a le choix entre deux processus de même priorité, on choisit celui qui attend depuis le plus longtemps. P20 3P3 10P4 283 29P2 41P1 51P2 03 1040 513 5

P1P4P2P3P1P4P2315 2025 3035 41P4 452 47P4 Institut Supérieur d’Informatique

2009-2010 1

ère année SIL

Semestre 2 Page3

Exercice 3

P1 0 1 2

3 4 5 6

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 E/S

x x x

x x x xAttent e

x x x xPrêt x x x x x

Actif x x x

x x x

x x x

x xP2 0 1 2

3 4 5 6

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 E/S

x x x x x

x xAttent e

x x x x xPrêt xx Actif

x x

x xx P3

0 1 2

3 4 5 6

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 E/S

x x x xAttent e

x x x

Prêt Actif

x xx P4

0 1 2

3 4 5 6

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 E/Sx Attente x x x x x

Prêt Actifx x

Nombre de commutations de contexte : 11

Institut Supérieur d’Informatique

2009-2010 1

ère année SIL

Semestre 2 Page4

Exercice 4

1) 2) File d’attente 3) File d’attente File d’attente 15A 07 B13 C18 A23 D30 24BD 281 912 A0 5B 12C 17A 18D 3019 BD 241 910 AB 2815 A0 5B 12C 17A 18D 3019 B24 19 10B 28AD A12 15BD 1822 26

Institut Supérieur d’Informatique

2009-2010 1

ère année SIL

Semestre 2 Page5

Exercice 5

File d’attente P10 217 P23 P3P1P4P3P1P5P37 911 1315 18P4 20P3 23P2 5