Вы находитесь на странице: 1из 5

Institut Suprieur dInformatique 2009-2010

1re anne SIL Semestre 2

Systmes dExploitation 1

Srie TD N2 - Correction
Ordonnancement des processus (2)

Exercice 1 :

Algorithme FCFS TRM = ((10-0)+(16-0)+(18-0)+(22-0)+(30-0)) / 5 = 19,2

A B C D E

0 10 16 18 22 30

Algorithme SJF TRM = ((2-0)+(6-0)+(12-0)+(20-0)+(30-0)) / 5 = 14

C D B E A

0 2 6 12 20 30
Algorithme RR (quantum=4)
TRM = ((10-0)+(14-0)+(24-0)+(28-0)+(30-0)) / 5 = 21,2

A B C D E A B E A

0 4 8 10 14 18 22 24 28 30


Page1

Institut Suprieur dInformatique 2009-2010
1re anne SIL Semestre 2

Exercice 2 :

Priorit Statique TRM = ((28-10)+(29-3)+(41-0)+(51-0)) / 4 = 34


TAM = ((18-18)+(26-8)+(41-15)+(51-10)) / 4 = 21,25

P2 P3 P4 3 P2 P1

0 3 10 28 29 41 51


Priorit Dynamique TRM = ((30-0)+(47-0)+(41-3)+(51-10)) / 4 = 39
TAM = ((30-0-10)+(47-0-15)+(41-3-8)+(51-10-18)) / 4 = 26,25

P2 3 P1 P4 P2 P3 P1 P4 P2 3 P4 2 P4

0 3 5 10 15 20 25 30 35 4041 4547 51

0 3 5 10 15 20 25 30 35 40 4 45
1
P 2 2 5+10/10 0+5/10= 5+5/10=1 10+5/10 15+5/10=
1 =2 1 =2 2
P 3 3 2+12/15 7+12/15 12+12/15 0+7/15= 5+7/15=1 10+7/15= 15+7/15 0+2/15 0 5+2/15
2 =1 =1 =2 0 1 =1 =0 =0
P 4 0+6/8=1 5+6/8=1 10+6/8=2 15+6/8= 0+1/8=0 5+1/8=1 10+1/8= 15+1/8
3 3 1 =2
P 5 0+13/18= 5+13/18 10+13/18 15+13/18 0+8/18= 5+8/18 1 0+4/18
4 1 =1 =1 =2 0 =1 =0

Hypothses :
- Au dmarrage, les priorits des processus sont gales leurs priorits statiques (indiques dans le
tableau).
- Les priorits ne sont calcules que toutes les 5mn. Pour les autres temps, on prend la priorit
prcdente.
- Le temps dattente dun processus est son temps dattente depuis sa dernire excution.
- Si on a le choix entre deux processus de mme priorit, on choisit celui qui attend depuis le plus
longtemps.


Page2

Institut Suprieur dInformatique 2009-2010
1re anne SIL Semestre 2


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 x
Attent x x x x
e
Prt x x x x x
Actif x x x x x x x x x x x

P2 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 x
Attent x x x x x
e
Prt x x
Actif x x x x x

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 x
Attent x x x
e
Prt
Actif x x x

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/S x
Attent x x x x x
e
Prt
Actif x x

Nombre de commutations de contexte : 11


Page3

Institut Suprieur dInformatique 2009-2010
1re anne SIL Semestre 2


Exercice 4 :

1)

A B C A D B D

0 1 7 9 1213 18 23 24 28 30

2)
File dattente

A B A C B D A B D

0 1 5 9 10 12 15 17 18 19 24 28 30

3)

File dattente

A B D

12 15 18 22 26
File dattente


A B A C B D A B D

0 1 5 9 10 12 15 17 18 19 24 28 30


Page4

Institut Suprieur dInformatique 2009-2010
1re anne SIL Semestre 2

Exercice 5
File dattente

P1 P2 P3 P1 P4 P3 P1 P5 P3 P4 P3 P2

0 2 3 5 7 9 11 13 15 17 18 20 23


Page5

Вам также может понравиться