CS计算机代考程序代写 matlab python capacity planning COMP9334

COMP9334
Capacity Planning for Computer Systems and Networks
Week 3A: Revision problems
COMP9334
1

Note
• Some of these questions can be done by a calculator but some of them require laborious calculations that are best done by a computer software, e.g. Matlab, Octave, Python etc.
T1,2021 COMP9334 2

Question 1
• YouhaveacomputersystemwithasingleCPU.
• Bothinter-arrivalandservicetimesareexponentiallydistributed.
• TherequestonlyrequiresservicesattheCPU. • EachrequestonlyvisitstheCPUonce.
• Afinishedrequestwillleavethesystem.
• Meanarrivalrateis9request/s
• MeanservicetimerequiredbyarequestattheCPUis0.1s.
• WhatistheutilisationoftheCPU?
• Whatisthemeanresponsetime?
• Theutilisationisprettyhighandyouwanttochangethe system. You can think of 3 alternatives.
T1,2021 COMP9334 3

Question 1 – Alternative 1
• Replace the existing CPU by one that is 2 times faster • You may assume that the service time is inversely
proportional to CPU speed.
T1,2021 COMP9334 4

Question 1 – Alternative 2
• Buyasystemwhichisidenticaltothecurrentone
• Putthetwosystemsinparallel
• Addaswitchinfrontofthesystem
• Whenarequestarrives,theswitchwillrandomlyassignthe request to one of the systems. On average, half of the request goes to each system
• (Pictorialrepresentationonthenextslide)
• Assumetheswitchrequiresnegligibletime
T1,2021 COMP9334 5

Question 1 – Alternative 2 (cont’d)
Half of the requests to system 1
System 1
requests
Switch
Half of the requests to System 2
System 2
T1,2021 COMP9334
6

Question 1 – Alternative 3
• SimilartoAlternative2,webuyasystemwhichisidentical to the current one and we also buy a switch
• However,weonlymaintainaqueueattheswitch
• Ifbothsystemsarebusy,therequestwaitsattheswitch; otherwise, the switch dispatches the request to any of the available systems
• Assumingthatittakesnegligibletimefortheswitchtofind out whether a system is idle
• (Pictorialrepresentationonthenextpage)
T1,2021 COMP9334 7

Question 1 – Alternative 3 (cont’d)
requests
System 1
Switch
The switch dispatches the requests to the first available server.
System 2
T1,2021
COMP9334
8

Question 1
• Part(a):Calculatetheresultingmeanresponsetimefor each for the three alternatives
• Part(b):Repeatpart(a)foranumberofdifferentmean arrival rates. Plot a graph of arrival rates against the mean response time.
• Part(c):Whatobservationscanyoumakefromthese calculations?
• Part(d):Whatisthebestwaytoupgradethesystemin terms of performance? However, the best way to upgrade
in terms of performance may not be the best way to upgrade in terms of cost, why?
T1,2021 COMP9334 9

Question 2
Customers
• Considerasingleserverqueueasshownabove
• Part(a):Considerthesituation
• The inter-arrival time is a constant and is given by 1 second.
• The service time required by each customer is always 0.5 second.
• Whatisthemeanwaitingtimepercustomer?
• Part(b):Considerthesituation
• The inter-arrival time is exponentially distributed with mean 1 second
• The service time required by each customer is exponentially distributed with mean 0.5s
• Whatisthemeanwaitingtimepercustomer?
• ComparetheanswersofParts(a)and(b).Whatconclusionscanyou
draw?
T1,2021 COMP9334 10

Question 3
• An Internet Service Provider has 4 dial-up ports. Connection requests obey Poisson distribution with a mean arrival rate of 3 requests per hour. The session duration of each connection request is exponentially distributed with a mean of 1.5 hours. What is the probability that a connection request will be rejected?
T1,2021 COMP9334 11