Académique Documents
Professionnel Documents
Culture Documents
SYSTÈMES D’EXPLOITATION
AVANCÉES
• Utilisation du CPU
• Débit (Throughput)
• Temps de rotation (Turnaround time)
• Temps d’attente
• Temps de réponse
même temps??
Peuvent-ils tous être optimisés en
– Maximiser
• Débit (Throughput)
– Maximiser
• Temps de rotation (Turnaround time)
– Minimiser
• Temps d’attente
– Minimiser
• Temps de réponse
– Minimiser
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
5
Ordonnancement sans réquisition
PREMIER ARRIVÉ PREMIER SERVI
0 24 27 30
• Le temps d’attente pour P1 = 0; P2 = 24; P3 = 27
• Temps moyen d’attente: (0 + 24 + 27)/3 = 17
Nadia Bel Hadj Aissa 7
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ A
:
8
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ B
:
9
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ B C
:
10
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ B C
:
11
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ C D
:
12
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ C D A
:
13
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ C D A
:
14
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ D A B
:
15
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ D A B
:
16
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ A B C
:
17
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ B C D
:
18
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ B C D
:
19
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ C D A
:
20
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ C D A
:
21
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ D A
:
22
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ: A
23
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ: D
24
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ: D
25
2.3.1 First-Come-First-Served (FCFS)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4 4 4 4 4
B 2 8 1 8 - -
C 3 2 1 2 - -
D 7 1 1 1 1 1
RQ:
26
2.3.1 First-Come-First-Served (FCFS)
27
2.3.1 First-Come-First-Served (FCFS)
28
2.3.1 First-Come-First-Served (FCFS)
29
2.3.1 First-Come-First-Served (FCFS)
30
2.3.1 First-Come-First-Served (FCFS)
31
2.3.1 First-Come-First-Served (FCFS)
32
2.3.1 First-Come-First-Served (FCFS)
• Waiting time:
wtA = (0 – 0) + (15 – 8) + (30 – 23) = 14
wtB = (4 – 2) + (19 – 13) = 8
wtC = (12 – 3) + (27 – 15) = 21
wtD = (14 – 7) + (29 – 16) + (34 – 31) = 23
33
2.3.1 First-Come-First-Served (FCFS)
• Waiting time:
wtA = (0 – 0) + (15 – 8) + (30 – 23) = 14
wtB = (4 – 2) + (19 – 13) = 8
wtC = (12 – 3) + (27 – 15) = 21
wtD = (14 – 7) + (29 – 16) + (34 – 31) = 23
34
2.3.1 First-Come-First-Served (FCFS)
• Waiting time:
wtA = (0 – 0) + (15 – 8) + (30 – 23) = 14
wtB = (4 – 2) + (19 – 13) = 8
wtC = (12 – 3) + (27 – 15) = 21
wtD = (14 – 7) + (29 – 16) + (34 – 31) = 23
35
2.3.1 First-Come-First-Served (FCFS)
• Waiting time:
wtA = (0 – 0) + (15 – 8) + (30 – 23) = 14
wtB = (4 – 2) + (19 – 13) = 8
wtC = (12 – 3) + (27 – 15) = 21
wtD = (14 – 7) + (29 – 16) + (34 – 31) = 23
36
2.3.1 First-Come-First-Served (FCFS)
• Waiting time:
wtA = (0 – 0) + (15 – 8) + (30 – 23) = 14
wtB = (4 – 2) + (19 – 13) = 8
wtC = (12 – 3) + (27 – 15) = 21
wtD = (14 – 7) + (29 – 16) + (34 – 31) = 23
37
2.3.1 First-Come-First-Served (FCFS)
• Response time:
rtA = 0 – 0 = 0
rtB = 4 – 2 = 2
rtC = 12 – 3 = 9
rtD = 14 – 7 = 7
rtAVG = (0 + 2 + 9 + 7) / 4 = 4.5
38
2.3.1 First-Come-First-Served (FCFS)
• Response time:
rtA = 0 – 0 = 0
rtB = 4 – 2 = 2
rtC = 12 – 3 = 9
rtD = 14 – 7 = 7
rtAVG = (0 + 2 + 9 + 7) / 4 = 4.5
39
2.3.1 First-Come-First-Served (FCFS)
• Response time:
rtA = 0 – 0 = 0
rtB = 4 – 2 = 2
rtC = 12 – 3 = 9
rtD = 14 – 7 = 7
rtAVG = (0 + 2 + 9 + 7) / 4 = 4.5
40
2.3.1 First-Come-First-Served (FCFS)
• Response time:
rtA = 0 – 0 = 0
rtB = 4 – 2 = 2
rtC = 12 – 3 = 9
rtD = 14 – 7 = 7
rtAVG = (0 + 2 + 9 + 7) / 4 = 4.5
41
2.3.1 First-Come-First-Served (FCFS)
• Response time:
rtA = 0 – 0 = 0
rtB = 4 – 2 = 2
rtC = 12 – 3 = 9
rtD = 14 – 7 = 7
rtAVG = (0 + 2 + 9 + 7) / 4 = 4.5
42
Inconvénients FIFO
CPU (1s) I/O (1ms) I/O (1ms) I/O (1ms) I/O (1ms)
Process Arrival 1ère exec 1s I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:4 4 4:4 4 4:4
B 2 8:8 1 8:8 - -
C 3 2:2 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
FCFS
49
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:2 4 4:4 4 4:4
B 2 8:8 1 8:8 - -
C 3 2:2 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
FCFS
50
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:1 4 4:4 4 4:4
B 2 8:8 1 8:8 - -
C 3 2:2 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
51
Etats des processus
I/O 2 I/O
completed requested
WAITING
52
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:1 4 4:4 4 4:4
B 2 8:5 1 8:8 - -
C 3 2:2 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
53
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:1 4 4:4 4 4:4
B 2 8:5 1 8:8 - -
C 3 2:1 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
54
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:1 4 4:4 4 4:4
B 2 8:5 1 8:8 - -
C 3 2:0 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
55
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:4 4 4:4
B 2 8:5 1 8:8 - -
C 3 2:0 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
56
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:4 4 4:4
B 2 8:2 1 8:8 - -
C 3 2:0 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
57
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:4 4 4:4
B 2 8:2 1 8:8 - -
C 3 2:0 1 2:2 - -
D 7 1:0 1 1:1 1 1:1
58
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:4 4 4:4
B 2 8:2 1 8:8 - -
C 3 2:0 1 2:1 - -
D 7 1:0 1 1:1 1 1:1
59
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:4 4 4:4
B 2 8:2 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:1 1 1:1
60
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:4 4 4:4
B 2 8:0 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:1 1 1:1
61
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:3 4 4:4
B 2 8:0 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:1 1 1:1
62
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:1 4 4:4
B 2 8:0 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:1 1 1:1
63
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:1 4 4:4
B 2 8:0 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:1
64
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:1 4 4:4
B 2 8:0 1 8:7 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:1
65
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:1 4 4:4
B 2 8:0 1 8:5 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:1
66
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:0 4 4:4
B 2 8:0 1 8:5 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:1
67
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:0 4 4:4
B 2 8:0 1 8:5 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:0
68
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:0 4 4:4
B 2 8:0 1 8:2 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:0
69
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:0 4 4:1
B 2 8:0 1 8:2 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:0
70
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:0 4 4:1
B 2 8:0 1 8:0 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:0
71
Algorithme du Tourniquet (Round Robin)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:0 4 4:0
B 2 8:0 1 8:0 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:0
72
Algorithme du Tourniquet (Round Robin)
p p p p p p p
73
Algorithme du Tourniquet (Round Robin)
p p p p p p p
74
Algorithme du Tourniquet (Round Robin)
p p p p p p p
• *
75
Algorithme du Tourniquet (Round Robin)
p p p p p p p
76
Algorithme du Tourniquet (Round Robin)
p p p p p p p
77
Algorithme du Tourniquet (Round Robin)
p p p p p p p
78
Algorithme du Tourniquet (Round Robin)
p p p p p p p
• Waiting time:
wtA = (0 – 0)+(8 – 3)+(17 – 13)+(24 – 20)+(29 – 29)+(34 – 32)=15
wtB = (3 – 2)+(9 – 6)+ (15 -12)+(21 – 18)+(26 – 24)+(32 – 29) =15
wtC = (6 – 3) + (13 – 9) = 7
wtD = (12 – 7) + (20 – 14) + (25 – 22) = 14
79
Algorithme du Tourniquet (Round Robin)
p p p p p p p
• Waiting time:
wtA = (0 – 0)+(8 – 3)+(17 – 13)+(24 – 20)+(29 – 29)+(34 – 32)=15
wtB = (3 – 2)+(9 – 6)+ (15 -12)+(21 – 18)+(26 – 24)+(32 – 29) =15
wtC = (6 – 3) + (13 – 9) = 7
wtD = (12 – 7) + (20 – 14) + (25 – 22) = 14
80
Algorithme du Tourniquet (Round Robin)
p p p p p p p
• Waiting time:
wtA = (0 – 0)+(8 – 3)+(17 – 13)+(24 – 20)+(29 – 29)+(34 – 32)=15
wtB = (3 – 2)+(9 – 6)+ (15 -12)+(21 – 18)+(26 – 24)+(32 – 29) =15
wtC = (6 – 3) + (13 – 9) = 7
wtD = (12 – 7) + (20 – 14) + (25 – 22) = 14
81
Algorithme du Tourniquet (Round Robin)
p p p p p p p
• Waiting time:
wtA = (0 – 0)+(8 – 3)+(17 – 13)+(24 – 20)+(29 – 29)+(34 – 32)=15
wtB = (3 – 2)+(9 – 6)+ (15 -12)+(21 – 18)+(26 – 24)+(32 – 29) =15
wtC = (6 – 3) + (13 – 9) = 7
wtD = (12 – 7) + (20 – 14) + (25 – 22) = 14
82
Algorithme du Tourniquet (Round Robin)
p p p p p p p
• Waiting time:
wtA = (0 – 0)+(8 – 3)+(17 – 13)+(24 – 20)+(29 – 29)+(34 – 32)=15
wtB = (3 – 2)+(9 – 6)+ (15 -12)+(21 – 18)+(26 – 24)+(32 – 29) =15
wtC = (6 – 3) + (13 – 9) = 7
wtD = (12 – 7) + (20 – 14) + (25 – 22) = 14
83
Algorithme du Tourniquet (Round Robin)
p p p p p p p
• Response time:
rtA = 0 – 0 = 0
rtB = 36 – 2 = 1
rtC = 6 – 3 = 3
rtD = 12 – 7 = 5
rtAVG = (0 + 1 + 3 + 5) / 4 = 2.25
84
Algorithme du Tourniquet (Round Robin)
p p p p p p p
• Response time:
rtA = 0 – 0 = 0
rtB = 3 – 2 = 1
rtC = 6 – 3 = 3
rtD = 12 – 7 = 5
rtAVG = (0 + 1 + 3 + 5) / 4 = 2.25
85
Algorithme du Tourniquet (Round Robin)
p p p p p p p
• Response time:
rtA = 0 – 0 = 0
rtB = 36 – 2 = 1
rtC = 6 – 3 = 3
rtD = 12 – 7 = 5
rtAVG = (0 + 1 + 3 + 5) / 4 = 2.25
86
Algorithme du Tourniquet (Round Robin)
p p p p p p p
• Response time:
rtA = 0 – 0 = 0
rtB = 3 – 2 = 1
rtC = 6 – 3 = 3
rtD = 12 – 7 = 5
rtAVG = (0 + 1 + 3 + 5) / 4 = 2.25
87
Algorithme du Tourniquet (Round Robin)
p p p p p p p
• Response time:
rtA = 0 – 0 = 0
rtB = 3 – 2 = 1
rtC = 6 – 3 = 3
rtD = 12 – 7 = 5
rtAVG = (0 + 1 + 3 + 5) / 4 = 2.25
88
PLUS COURT TEMPS D’UTILISATION
D’ABORD PRÉEMPTIF
preemption
I/O I/O
completed requested
WAITING
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:4 4 4:4 4 4:4
B 2 8:8 1 8:8 - -
C 3 2:2 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
FCFS
2.3.3 Shortest-Remaining-Time-First (SRTF)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:2 4 4:4 4 4:4
B 2 8:8 1 8:8 - -
C 3 2:2 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:1 4 4:4 4 4:4
B 2 8:8 1 8:8 - -
C 3 2:2 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:4 4 4:4
B 2 8:8 1 8:8 - -
C 3 2:2 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:4 4 4:4
B 2 8:8 1 8:8 - -
C 3 2:0 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:4 4 4:4
B 2 8:7 1 8:8 - -
C 3 2:0 1 2:2 - -
D 7 1:1 1 1:1 1 1:1
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:4 4 4:4
B 2 8:7 1 8:8 - -
C 3 2:0 1 2:2 - -
D 7 1:0 1 1:1 1 1:1
p
2.3.3 Shortest-Remaining-Time-First (SRTF)
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:3 4 4:4
B 2 8:7 1 8:8 - -
C 3 2:0 1 2:2 - -
D 7 1:0 1 1:1 1 1:1
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:3 4 4:4
B 2 8:7 1 8:8 - -
C 3 2:0 1 2:1 - -
D 7 1:0 1 1:1 1 1:1
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:3 4 4:4
B 2 8:7 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:1 1 1:1
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:3 4 4:4
B 2 8:7 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:1
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:2 4 4:4
B 2 8:7 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:1
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:2 4 4:4
B 2 8:7 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:0
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:0 4 4:4
B 2 8:7 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:0
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:0 4 4:4
B 2 8:3 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:0
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:0 4 4:4
B 2 8:0 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:0
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:0 4 4:3
B 2 8:0 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:0
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:0 4 4:0
B 2 8:0 1 8:8 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:0
Process Arrival 1st exec 1st I/O 2nd exec 2nd I/O 3rd exec
time
A 0 4:0 4 4:0 4 4:0
B 2 8:0 1 8:0 - -
C 3 2:0 1 2:0 - -
D 7 1:0 1 1:0 1 1:0
RQ Proc in CPU:
:
continues
p p p
2.3.3 Shortest-Remaining-Time-First (SRTF)
p p p
p p p
p p p
p p p
p p p
p p p
p p p
• Waiting time:
wtA = (0 – 0) + (8 – 8) + (12 - 9) + (14 – 13) + (23 - 20) = 7
wtB = (6 – 2) + (16 – 7) + (27-24) = 16
wtC = (4 – 3) + (9 – 9) = 1
wtD = (7 – 7) + (11 – 10) + (13 – 13) = 1
wtAVG = (7 + 16 + 1 + 1) / 4 = 6.25
2.3.3 Shortest-Remaining-Time-First (SRTF)
p p p
• Waiting time:
wtA = (0 – 0) + (8 – 8) + (12 - 9) + (14 – 13) + (23 - 20) = 7
wtB = (6 – 2) + (16 – 7) + (27-24) = 16
wtC = (4 – 3) + (9 – 9) = 1
wtD = (7 – 7) + (11 – 10) + (13 – 13) = 1
wtAVG = (7 + 16 + 1 + 1) / 4 = 6.25
2.3.3 Shortest-Remaining-Time-First (SRTF)
p p p
• Waiting time:
wtA = (0 – 0) + (8 – 8) + (12 - 9) + (14 – 13) + (23 - 20) = 7
wtB = (6 – 2) + (16 – 7) + (27-24) = 16
wtC = (4 – 3) + (9 – 9) = 1
wtD = (7 – 7) + (11 – 10) + (13 – 13) = 1
wtAVG = (7 + 16 + 1 + 1) / 4 = 6.25
2.3.3 Shortest-Remaining-Time-First (SRTF)
p p p
• Waiting time:
wtA = (0 – 0) + (8 – 8) + (12 - 9) + (14 – 13) + (23 - 20) = 7
wtB = (6 – 2) + (16 – 7) + (27-24) = 16
wtC = (4 – 3) + (9 – 9) = 1
wtD = (7 – 7) + (11 – 10) + (13 – 13) = 1
wtAVG = (7 + 16 + 1 + 1) / 4 = 6.25
2.3.3 Shortest-Remaining-Time-First (SRTF)
p p p
• Waiting time:
wtA = (0 – 0) + (8 – 8) + (12 - 9) + (14 – 13) + (23 - 20) = 7
wtB = (6 – 2) + (16 – 7) + (27-24) = 16
wtC = (4 – 3) + (9 – 9) = 1
wtD = (7 – 7) + (11 – 10) + (13 – 13) = 1
wtAVG = (7 + 16 + 1 + 1) / 4 = 6.25
2.3.3 Shortest-Remaining-Time-First (SRTF)
p p p
• Response time:
rtA = 0 – 0 = 0
rtB = 6 – 2 = 4
rtC = 4 – 3 = 1
rtD = 7 – 7 = 0
rtAVG = (0 + 4 + 1 + 0) / 4 = 1.25
2.3.3 Shortest-Remaining-Time-First (SRTF)
p p p
• Response time:
rtA = 0 – 0 = 0
rtB = 6 – 2 = 4
rtC = 4 – 3 = 1
rtD = 7 – 7 = 0
rtAVG = (0 + 4 + 1 + 0) / 4 = 1.25
2.3.3 Shortest-Remaining-Time-First (SRTF)
p p p
• Response time:
rtA = 0 – 0 = 0
rtB = 6 – 2 = 4
rtC = 4 – 3 = 1
rtD = 7 – 7 = 0
rtAVG = (0 + 4 + 1 + 0) / 4 = 1.25
2.3.3 Shortest-Remaining-Time-First (SRTF)
p p p
• Response time:
rtA = 0 – 0 = 0
rtB = 6 – 2 = 4
rtC = 4 – 3 = 1
rtD = 7 – 7 = 0
rtAVG = (0 + 4 + 1 + 0) / 4 = 1.25
2.3.3 Shortest-Remaining-Time-First (SRTF)
p p p
• Response time:
rtA = 0 – 0 = 0
rtB = 6 – 2 = 4
rtC = 4 – 3 = 1
rtD = 7 – 7 = 0
rtAVG = (0 + 4 + 1 + 0) / 4 = 1.25
COMPARAISON
127