set.seed(10)
library(plyr)
library(ggplot2)
library(reshape)
##
## Attaching package: 'reshape'
##
## The following objects are masked from 'package:plyr':
##
## rename, round_any
library(gridExtra)
## Loading required package: grid
Service <- function(n=1,typeservice,x,y,p_det=1) {
# genere un temps de service
switch(typeservice,
det = rep(p_det,n),
uni = runif(n,x,y),
gamma = rgamma(n,shape=x,scale=y),
exp = rexp(n,x)
)
}
FileLIFO <- function(n,lambda,typeservice,x,y,policy,p_det) {
# simulates a M/GI/1 LIFO queue with different preemption policy
# parameters:
# n : total number of jobs
# lambda : arrival rate
# typeservice : service law (det uni gamma exp)
# x ,y : parameters of the service law
# policy: npmtn, pmtn, pmtn_restart, pmtn_reset
# return value:
# vector with response time of each task assuming the queue is initially empty
A <- rexp(n,lambda) # inter arrival
t1 <- cumsum(A) # arrival dates
t2 <- rep(NA,n) # completion dates
S <- Service(n,typeservice,x,y,p_det) # initial service times
#### Variables that define the state of the queue
t = 0 # current time
remaining = rep(NA,n) # how much work remains to do for each task
running = NA # index of the currently running task
waiting = c() # stack with tasks which have arrived and have not been completed yet
next_arrival = 1 # index of the next task to arrive
#### A few useful local functions
run_task = function() { # runs the last task of the waiting list
if(length(waiting)>0) {
running <<- waiting[length(waiting)]
remaining[running] <<- switch(policy,
npmtn = S[running],
pmtn = min(S[running],remaining[running],na.rm=T),
pmtn_restart = S[running],
pmtn_reset = Service(1,typeservice,x,y,p_det)
)
waiting <<- waiting[-length(waiting)]
}
}
push_task = function() { # insert the next_arrival-th task to the waiting list
# and run it if there is preemption
if(policy != "npmtn") {
if(!is.na(running)) {waiting <<- c(waiting,running)}
running <<- NA
}
waiting <<- c(waiting,next_arrival)
next_arrival <<- next_arrival+1
if(is.na(running)) { run_task() }
}
#### Main simulation loop
while(TRUE) {
# Look for next event
dt = NA
if(next_arrival <=n) { dt = min(dt,(t1[next_arrival]-t), na.rm=T) }
if(!is.na(running)) { dt = min(dt,remaining[running], na.rm=T) }
if(is.na(dt)) { break }
# Update state
t=t+dt
if(!is.na(running)) {
remaining[running] <- remaining[running] - dt
if(remaining[running]<=0) {
t2[running] <- t
running = NA
run_task()
}
}
if((next_arrival<=n) & (t==t1[next_arrival])) {
push_task()
}
}
df<-data.frame(arrival=t1,completion=t2,inter_arrival=A,service=S)
#
#
# #inspecter la fille d'attente
#
# t1[n+1] = t2[n]+1; # Un hack pour sortir de ma boucle
date = rep.int(0,2*n); # À initialiser absolument (performance + nom déjà utilisé) !
count = rep.int(0,2*n);
i1 = i2 = 1;
# print(t2-t1)
# print(t2)
while(i1<=n & i2 <=n) {
if(t1[i1]<t2[i2]) {
date[i1+i2] <- t1[i1];
count[i1+i2]<- count[i1+i2-1]+1;
i1 <- i1+1;
} else {
date[i1+i2] <- t2[i2];
count[i1+i2]<- count[i1+i2-1]-1;
i2 <- i2+1;
}
}
# #
# #
# # # Une deuxième itération pour avoir l'évolution du travail au cours du temps.
datework = rep.int(0,2*n)
work =rep.int(0,2*n)
i1 = i2 = 1
while(i1<=n & i2 <=n) {
if(t1[i1]<t2[i2]) {
i = 2*(i1+i2-1)
datework[i] <- t1[i1]
if(work[i-1]>0) {
work[i] <- work[i-1] - (datework[i]-datework[i-1])
} else {
work[i] <- 0
}
if(work[i]<1e-15) { work[i]<-0 } # Fix floating point precision issue
datework[i+1] <- datework[i]
work[i+1] <- work[i] + S[i1]
i1 <- i1+1
} else {
i = 2*(i1+i2-1)
datework[i] <- t2[i2]
work[i] <- work[i-1] - (datework[i]-datework[i-1])
datework[i+1] <- datework[i]
work[i+1] <- work[i]
i2 <- i2+1
}
}
list(jobs = df, events = data.frame(date=date,count=count),
workevolution = data.frame(date=datework,work=work))
# print(t2-t1)
}
Q1:Nature des lois de service Illustrer les différences de natures entre les différentes lois de temps de service. Réponse: Pour observer les différentes comportements des quatre lois plus raisonnablement, on met les paramètres d’expérence 0.2,0.5,0.7,0.9 pour chacune. Et on va générer les graphes de lifeSpan, queue length et work évolution.
drawPlot<-function(df=dc,loi = "uni",pp=1)
{
df$jobs$id=1:length(df$jobs$arrival)
df$jobs$response_time = df$jobs$completion-df$jobs$arrival
d <- melt(df$jobs,id=c("id"))
if(pp==1){
p1 <- ggplot(data=df$jobs) + geom_errorbarh(aes(y=id,xmin=arrival,xmax=completion,x=arrival
))+ xlab("Date") +
ylab("Job Id") +
ggtitle(paste(paste(paste("Job lifespan:",loi),",AVE:"),round(mean(df$jobs$response_time,digits = 5))))
p1
}else if(pp==2){
p2 <- ggplot(data=df$events) + geom_step(aes(x=date,y=count)) +
xlab("Date") +
ylab("Queue length") +
ggtitle(paste(paste(paste("Queue length:",loi),",AVE:"),round(mean(df$events$count),digits=3)))
p2
}else if(pp==3){
p3 <- ggplot(data=df$workevolution) +
geom_line(aes(x=date,y=work)) +
xlab("Date") +
ylab("Work") +
ggtitle(paste(paste(paste("Work evolution:",loi),",AVE:"), round(mean(df$workevolution$work),digits=3)))
p3
}
# heights=c(1/2, 1/4, 1/4)
}
#Pour la loi determinist
###################################################################
#0.2
dc<-FileLIFO(n=80,lambda=0.5,typeservice="det",x=0,y=1,policy="npmtn",p_det=0.2)
p111<-drawPlot(dc,"det",1)
p112<-drawPlot(dc,"det",2)
p113<-drawPlot(dc,"det",3)
#0.5
dc<-FileLIFO(n=80,lambda=0.5,typeservice="det",x=0,y=1,policy="npmtn",p_det=0.5)
p121<-drawPlot(dc,"det",1)
p122<-drawPlot(dc,"det",2)
p123<-drawPlot(dc,"det",3)
#0.7
dc<-FileLIFO(n=80,lambda=0.5,typeservice="det",x=0,y=1,policy="npmtn",p_det=0.7)
p131<-drawPlot(dc,"det",1)
p132<-drawPlot(dc,"det",2)
p133<-drawPlot(dc,"det",3)
#0.9
dc<-FileLIFO(n=80,lambda=0.5,typeservice="det",x=0,y=1,policy="npmtn",p_det=0.9)
p141<-drawPlot(dc,"det",1)
p142<-drawPlot(dc,"det",2)
p143<-drawPlot(dc,"det",3)
##################################################################
#Pour la loi uniform
##################################################################
#0.2
dc<-FileLIFO(n=80,lambda=0.5,typeservice="uni",x=0,y=0.4,policy="npmtn")
p211<-drawPlot(dc,"uni",1)
p212<-drawPlot(dc,"uni",2)
p213<-drawPlot(dc,"uni",3)
#0.5
dc<-FileLIFO(n=80,lambda=0.5,typeservice="uni",x=0,y=1,policy="npmtn")
p221<-drawPlot(dc,"uni",1)
p222<-drawPlot(dc,"uni",2)
p223<-drawPlot(dc,"uni",3)
#0.7
dc<-FileLIFO(n=80,lambda=0.5,typeservice="uni",x=0,y=1.4,policy="npmtn")
p231<-drawPlot(dc,"uni",1)
p232<-drawPlot(dc,"uni",2)
p233<-drawPlot(dc,"uni",3)
#0.9
dc<-FileLIFO(n=80,lambda=0.5,typeservice="uni",x=0,y=1.8,policy="npmtn")
p241<-drawPlot(dc,"uni",1)
p242<-drawPlot(dc,"uni",2)
p243<-drawPlot(dc,"uni",3)
##################################################################
#Pour la loi gamma
##################################################################
#0.2
dc<-FileLIFO(n=80,lambda=0.5,typeservice="gamma",x=0.2,y=1,policy="npmtn")
p311<-drawPlot(dc,"gamma",1)
p312<-drawPlot(dc,"gamma",2)
p313<-drawPlot(dc,"gamma",3)
#0.5
dc<-FileLIFO(n=80,lambda=0.5,typeservice="gamma",x=0.5,y=1,policy="npmtn")
p321<-drawPlot(dc,"gamma",1)
p322<-drawPlot(dc,"gamma",2)
p323<-drawPlot(dc,"gamma",3)
#0.7
dc<-FileLIFO(n=80,lambda=0.5,typeservice="gamma",x=0.7,y=1,policy="npmtn")
p331<-drawPlot(dc,"gamma",1)
p332<-drawPlot(dc,"gamma",2)
p333<-drawPlot(dc,"gamma",3)
#0.9
dc<-FileLIFO(n=80,lambda=0.5,typeservice="gamma",x=0.9,y=1,policy="npmtn")
p341<-drawPlot(dc,"gamma",1)
p342<-drawPlot(dc,"gamma",2)
p343<-drawPlot(dc,"gamma",3)
##################################################################
#Pour la loi exponentiel
##################################################################
#0.2
dc<-FileLIFO(n=80,lambda=0.5,typeservice="exp",x=5,y=1,policy="npmtn")
# plot(dc$jobs$completion,type = b)
p411<-drawPlot(dc,"exp",1)
p412<-drawPlot(dc,"exp",2)
p413<-drawPlot(dc,"exp",3)
#0.5
dc<-FileLIFO(n=80,lambda=0.5,typeservice="exp",x=2,y=1,policy="npmtn")
# plot(dc$jobs$completion)
p421<-drawPlot(dc,"exp",1)
p422<-drawPlot(dc,"exp",2)
p423<-drawPlot(dc,"exp",3)
#0.7
dc<-FileLIFO(n=80,lambda=0.5,typeservice="exp",x=10/7,y=1,policy="npmtn")
# plot(dc$jobs$completion)
p431<-drawPlot(dc,"exp",1)
p432<-drawPlot(dc,"exp",2)
p433<-drawPlot(dc,"exp",3)
#0.9
dc<-FileLIFO(n=80,lambda=0.5,typeservice="exp",x=10/9,y=1,policy="npmtn")
# plot(dc$jobs$completion)
p441<-drawPlot(dc,"exp",1)
p442<-drawPlot(dc,"exp",2)
p443<-drawPlot(dc,"exp",3)
##################################################################
print("Job lifespan in a M/G1/1 queue with exeperence 0.2")
## [1] "Job lifespan in a M/G1/1 queue with exeperence 0.2"
grid.arrange(p111,p211,p311,p411)
print("Job lifespan in a M/G1/1 queue with exeperence 0.5")
## [1] "Job lifespan in a M/G1/1 queue with exeperence 0.5"
grid.arrange(p121,p221,p321,p421)
print("Job lifespan in a M/G1/1 queue with exeperence 0.7")
## [1] "Job lifespan in a M/G1/1 queue with exeperence 0.7"
grid.arrange(p131,p231,p331,p431)
print("Job lifespan in a M/G1/1 queue with exeperence 0.9")
## [1] "Job lifespan in a M/G1/1 queue with exeperence 0.9"
grid.arrange(p141,p241,p341,p441)
print("Job lifespan in a M/G1/1 queue for det")
## [1] "Job lifespan in a M/G1/1 queue for det"
grid.arrange(p111,p121,p131,p141)
print("Job lifespan in a M/G1/1 queue for uni")
## [1] "Job lifespan in a M/G1/1 queue for uni"
grid.arrange(p211,p221,p231,p241)
print("Job lifespan in a M/G1/1 queue for gamma")
## [1] "Job lifespan in a M/G1/1 queue for gamma"
grid.arrange(p311,p321,p331,p341)
print("Job lifespan in a M/G1/1 queue for exp")
## [1] "Job lifespan in a M/G1/1 queue for exp"
grid.arrange(p411,p421,p431,p441)
##################################################################
print("Queue length in a LIFO M/G1/1 queue with exeperence 0.2")
## [1] "Queue length in a LIFO M/G1/1 queue with exeperence 0.2"
grid.arrange(p112,p212,p312,p412)
print("Queue length in a LIFO M/G1/1 queue with exeperence 0.5")
## [1] "Queue length in a LIFO M/G1/1 queue with exeperence 0.5"
grid.arrange(p122,p222,p322,p422)
print("Queue length in a LIFO M/G1/1 queue with exeperence 0.7")
## [1] "Queue length in a LIFO M/G1/1 queue with exeperence 0.7"
grid.arrange(p132,p232,p332,p432)
print("Queue length in a LIFO M/G1/1 queue with exeperence 0.9")
## [1] "Queue length in a LIFO M/G1/1 queue with exeperence 0.9"
grid.arrange(p142,p242,p342,p442)
print("Queue length in a LIFO M/G1/1 queue for det")
## [1] "Queue length in a LIFO M/G1/1 queue for det"
grid.arrange(p112,p122,p132,p142)
print("Queue length in a LIFO M/G1/1 queue for uni")
## [1] "Queue length in a LIFO M/G1/1 queue for uni"
grid.arrange(p212,p222,p232,p242)
print("Queue length in a LIFO M/G1/1 queue for gamma")
## [1] "Queue length in a LIFO M/G1/1 queue for gamma"
grid.arrange(p312,p322,p332,p342)
print("Queue length in a LIFO M/G1/1 queue for exp")
## [1] "Queue length in a LIFO M/G1/1 queue for exp"
grid.arrange(p412,p422,p432,p442)
############################
print("Work evolution in a LIFO M/G1/1 queue with exeperence 0.2")
## [1] "Work evolution in a LIFO M/G1/1 queue with exeperence 0.2"
grid.arrange(p113,p213,p313,p413)
print("Work evolution in a LIFO M/G1/1 queue with exeperence 0.5")
## [1] "Work evolution in a LIFO M/G1/1 queue with exeperence 0.5"
grid.arrange(p123,p223,p323,p423)
print("Work evolution in a LIFO M/G1/1 queue with exeperence 0.7")
## [1] "Work evolution in a LIFO M/G1/1 queue with exeperence 0.7"
grid.arrange(p133,p233,p333,p433)
print("Work evolution in a LIFO M/G1/1 queue with exeperence 0.9")
## [1] "Work evolution in a LIFO M/G1/1 queue with exeperence 0.9"
grid.arrange(p143,p243,p343,p443)
print("Work evolution in a LIFO M/G1/1 queue for det")
## [1] "Work evolution in a LIFO M/G1/1 queue for det"
grid.arrange(p113,p123,p133,p143)
print("Work evolution in a LIFO M/G1/1 queue for uni")
## [1] "Work evolution in a LIFO M/G1/1 queue for uni"
grid.arrange(p213,p223,p233,p243)
print("Work evolution in a LIFO M/G1/1 queue for gamma")
## [1] "Work evolution in a LIFO M/G1/1 queue for gamma"
grid.arrange(p313,p323,p333,p343)
print("Work evolution in a LIFO M/G1/1 queue for exp")
## [1] "Work evolution in a LIFO M/G1/1 queue for exp"
grid.arrange(p413,p423,p433,p443)
##################################################################
Selon les graphes de lifeSpan pour les prob respectivement, comme les clients arrivent à ratio exponentiel dont lambda=0.5, donc pour tous les serveurs de temps de service différents, on peut bien en sorte les comportements respectives par rapport aux temps de service pour chacuns de loi dont deterministe, uniforme, gamma et exponentiel. Selon les graphes, on voit que la loi uni et det se comportent prèsque linéairement et les temps de service se varient doucement et statinonairement comme une constante et au même temps, le système gardent un nombre constante de file d’attente moins grand que les deux autres en temps réel et au fur et au mesure dont l’incrémentation serait linéaire; par contre, pour gamma, il apparaît des “jits” évédants pendant notre expérimentation où il y a vraiement des moment où il y a beaucoup de clients qui ont besoin d’un temps de service plut long et les autres moments très petits de temps de service et un nombre de file d’attente plus gros relativement. En général, c’est un modèle plus brutale relativement; pour exp, on pourrait bien constater que c’est un modèle assez stable et indépendant des états de précédants.
Q2:Étude détaillée de la file M/M/1 − LIF O Étudier la distribution stationnaire du temps de réponse pour différents débit d’arrivées (par exemple λ = 0.2, 0.4, 0.6, 0.8) pour la file M/M/1 − LIFO (i.e., avec un temps de service et d’inter-arrivée exponentiel) pour chacun des modes de gestion. Vous représenterez sur un même graphique votre estimation des temps moyens de service en fonction du débit d’arrivée avec une couleur différente pour chacun des modes de gestion. Vous étudierez la stabilité du système, ses performances, les similarités et/ou les différences de comportement observés…
#Pour la loi determinist
###################################################################
getPara<-function(df=dc,loi = "uni",pp=1)
{
df$jobs$id=1:length(df$jobs$arrival)
df$jobs$response_time = df$jobs$completion-df$jobs$arrival
d <- melt(df$jobs,id=c("id"))
df$jobs$response_time
}
#Pour la loi exponentiel
##################################################################
dc<-FileLIFO(n=80,lambda=0.2,typeservice="exp",x=2,y=1,policy="pmtn")
r411<-getPara(df=dc)
dc<-FileLIFO(n=80,lambda=0.4,typeservice="exp",x=2,y=1,policy="pmtn")
r412<-getPara(df=dc)
dc<-FileLIFO(n=80,lambda=0.6,typeservice="exp",x=2,y=1,policy="pmtn")
r413<-getPara(df=dc)
dc<-FileLIFO(n=80,lambda=0.8,typeservice="exp",x=2,y=1,policy="pmtn")
r414<-getPara(df=dc)
##########################
dc<-FileLIFO(n=80,lambda=0.2,typeservice="exp",x=2,y=1,policy="pmtn_restart")
r421<-getPara(df=dc)
dc<-FileLIFO(n=80,lambda=0.4,typeservice="exp",x=2,y=1,policy="pmtn_restart")
r422<-getPara(df=dc)
dc<-FileLIFO(n=80,lambda=0.6,typeservice="exp",x=2,y=1,policy="pmtn_restart")
r423<-getPara(df=dc)
dc<-FileLIFO(n=80,lambda=0.8,typeservice="exp",x=2,y=1,policy="pmtn_restart")
r424<-getPara(df=dc)
##########################
dc<-FileLIFO(n=80,lambda=0.2,typeservice="exp",x=2,y=1,policy="pmtn_reset")
r431<-getPara(df=dc)
dc<-FileLIFO(n=80,lambda=0.4,typeservice="exp",x=2,y=1,policy="pmtn_reset")
r432<-getPara(df=dc)
dc<-FileLIFO(n=80,lambda=0.6,typeservice="exp",x=2,y=1,policy="pmtn_reset")
r433<-getPara(df=dc)
dc<-FileLIFO(n=80,lambda=0.8,typeservice="exp",x=2,y=1,policy="pmtn_reset")
r434<-getPara(df=dc)
##################################################################
dd1<-data.frame(pmtn=r411,pmtn_restart=r421,pmtn_reset=r431)
dd1$id=1:length(dd1$pmtn)
d <- melt(dd1,id=c("id"))
ggplot(data=d[d$variable %in% c("pmtn","pmtn_restart","pmtn_reset"),],
aes(x=id,y=value, color=variable)) +
geom_line() + scale_color_brewer(palette="Set1") +
xlab("Job Id") +
ylab("Response Time") +
ggtitle("Response time for debit: 0.2")
print(paste("Average response time for pmtn is:",round(mean(dd1$pmtn),digits=5)))
## [1] "Average response time for pmtn is: 0.55228"
print(paste("Average response time for pmtn_restart is:",round(mean(dd1$pmtn_restart),digits=5)))
## [1] "Average response time for pmtn_restart is: 0.53956"
print(paste("Average response time for pmtn_reset is:",round(mean(dd1$pmtn_reset),digits=5)))
## [1] "Average response time for pmtn_reset is: 0.57378"
######################
dd2<-data.frame(pmtn=r412,pmtn_restart=r422,pmtn_reset=r432)
dd2$id=1:length(dd2$pmtn)
d <- melt(dd2,id=c("id"))
ggplot(data=d[d$variable %in% c("pmtn","pmtn_restart","pmtn_reset"),],
aes(x=id,y=value, color=variable)) +
geom_line() + scale_color_brewer(palette="Set1") +
xlab("Job Id") +
ylab("Response Time") +
ggtitle("Response time for debit: 0.4")
print(paste("Average response time for pmtn is:",round(mean(dd2$pmtn),digits=5)))
## [1] "Average response time for pmtn is: 0.75896"
print(paste("Average response time for pmtn_restart is:",round(mean(dd2$pmtn_restart),digits=5)))
## [1] "Average response time for pmtn_restart is: 0.85886"
print(paste("Average response time for pmtn_reset is:",round(mean(dd2$pmtn_reset),digits=5)))
## [1] "Average response time for pmtn_reset is: 0.67512"
#########################
dd3<-data.frame(pmtn=r413,pmtn_restart=r423,pmtn_reset=r433)
dd3$id=1:length(dd3$pmtn)
d <- melt(dd3,id=c("id"))
ggplot(data=d[d$variable %in% c("pmtn","pmtn_restart","pmtn_reset"),],
aes(x=id,y=value, color=variable)) +
geom_line() + scale_color_brewer(palette="Set1") +
xlab("Job Id") +
ylab("Response Time") +
ggtitle("Response time for debit: 0.6")
print(paste("Average response time for pmtn is:",round(mean(dd3$pmtn),digits=5)))
## [1] "Average response time for pmtn is: 0.61186"
print(paste("Average response time for pmtn_restart is:",round(mean(dd3$pmtn_restart),digits=5)))
## [1] "Average response time for pmtn_restart is: 0.73231"
print(paste("Average response time for pmtn_reset is:",round(mean(dd3$pmtn_reset),digits=5)))
## [1] "Average response time for pmtn_reset is: 0.81191"
###########################
dd4<-data.frame(pmtn=r414,pmtn_restart=r424,pmtn_reset=r434)
dd4$id=1:length(dd4$pmtn)
d <- melt(dd4,id=c("id"))
ggplot(data=d[d$variable %in% c("pmtn","pmtn_restart","pmtn_reset"),],
aes(x=id,y=value, color=variable)) +
geom_line() + scale_color_brewer(palette="Set1") +
xlab("Job Id") +
ylab("Response Time") +
ggtitle("Response time for debit: 0.8")
print(paste("Average response time for pmtn is:",round(mean(dd4$pmtn),digits=5)))
## [1] "Average response time for pmtn is: 0.71986"
print(paste("Average response time for pmtn_restart is:",round(mean(dd4$pmtn_restart),digits=5)))
## [1] "Average response time for pmtn_restart is: 1.86887"
print(paste("Average response time for pmtn_reset is:",round(mean(dd4$pmtn_reset),digits=5)))
## [1] "Average response time for pmtn_reset is: 0.75987"
##############
ff<-data.frame(pmtn=c(mean(r411),mean(r412),mean(r413),mean(r414)),pmtn_restart=
c(mean(r421),mean(r422),mean(r423),mean(r424)),
pmtn_reset=c(mean(r431),mean(r432),mean(r433),mean(r434)))
ff$id=1:4
g <- melt(ff,id=c("id"))
ggplot(data=g[d$variable %in% c("pmtn","pmtn_restart","pmtn_reset"),],
aes(x=id,y=value, color=variable)) +
geom_line() + scale_color_brewer(palette="Set1") +
xlab("ave response") +
ylab("Policy") +
ggtitle("Average response time")
###################
kk<-data.frame(pmtn=c(var(r411),var(r412),var(r413),var(r414)),pmtn_restart=
c(var(r421),var(r422),var(r423),var(r424)),
pmtn_reset=c(var(r431),var(r432),var(r433),var(r434)))
kk$id=1:4
h <- melt(kk,id=c("id"))
ggplot(data=h[h$variable %in% c("pmtn","pmtn_restart","pmtn_reset"),],
aes(x=id,y=value, color=variable)) +
geom_line() + scale_color_brewer(palette="Set1") +
xlab("Response Time variance") +
ylab("Policy") +
ggtitle("Response time variance")
Selon les graphes générés au-dessus, on voit que pour la policy de préemption et préemption reset, ils ont prèsque les mêmes comportements par rapport à soit l’éxpérence soit la variance sauf que pour préemption reset, il se varie toujours plus brutalement que les deux autres à cause de son restart tout d’au début.Donc danc ce cas là, les deux précédents se comportent plus stable et au fur et au mesure, le temps de réponse ne se varient plus brustalement ou on dit qu’il ne serait pas “exceptionnel” de temps en temps; par contre, on ne pourrait jamais imaginer qu’un système de modèle de “préemption_restart” soit stable ou stationnaire comme il y a une prob plus important que le serveur serait “occupé” en servant aux clients qui viennent de reprendre son boulot.
Question 3. Étude de la file M/GI/1 − LIF O Tracer le temps moyen de réponse en fonction de λ pour les différentes lois proposées et les différents modes de gestion ci-dessus. Vous choisirez 2 valeurs pour la famille des lois Gamma. Vous étudierez la stabilité du système, ses performances, les similarités et/ou les différences de comportement observés…