首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
代写COMP5416、Python设计程序代做
项目预算:
开发周期:
发布时间:
要求地区:
COMP5416/4416 Assignment 2 2023 S2
Due: 29/Oct/2023 23:59
8 questions. Q1-Q4, 10 points each. Q5-Q7, 20 points each.
1. M/M Queue. 10%. Given arrival rate λ = 6 unit/s and service rate μ = 3 unit/s. Analyse
M/M/3/6 queue. Calculate (1) the stationary distribution of the queueing system, and (2) the
probability that a new arrival is dropped. (3) In an M/M/1 queue, λ > μ is not allowed. Why is
λ > μ allowed in an M/M/3/6 queue?
2. Packet scheduling. 10%. Consider a queueing system below. It takes one second to process
one packet.
(1) Assuming FIFO service, indicate the time at which packets 2 through 12 each leave the
queue. What is the average of this delay over all 12 packets?
(2) Now assume a priority service and assume that odd-numbered packets are high priority,
and even-numbered packets are low priority. Indicate the time at which packets 2 through 12
each leave the queue. For each packet, what is the delay between its arrival and the beginning
of the slot in which it is transmitted? What is the average of this delay over all 12 packets?
(3) Now assume weighted fair queueing (WFQ) service. Assume that odd-numbered packets
are from class 1, and even-numbered packets are from class 2. Class 1 has a WFQ weight of 2,
while class 2 has a WFQ weight of 1. For each packet what is the delay between its arrival and
its departure? What is the average delay over all 12 packets?
(4) What do you notice about the average delay in all cases? Why?
3. Weighted fair queue. 10%. Alice, Bob, and Chris are three users sharing one bottleneck
link with 100 Mbps. We use a weighted fair queue to guarantee that Alice, Bob, and Chirs
should get 40 Mbps, 35Mbps, and 25Mbps respectively. What are the weights of the weighted
fair queue for the three users? Then, Bob does not have anything to transmit, but Alice and
Chris have many packets to transmit. What are the transmission rates of them using the same
weighted fair queue in the system?
4. Token bucket. 10%. The following figure shows a token bucket scheduler. It consists of a
bucket which can accommodate 3 tokens and a queue which can accommodate infinite
packets. The arrival of packets follows Poisson process with rate 𝜆𝜆 > 0. The arrival of tokens
follows Poisson process with rate 𝜇𝜇 > 0, which is independent of the arrival of packets. As
discussed in the class, each packet consumes exactly one token and the packets are served by
the first-in-first-out principle. If there is no token in the bucket, packets will wait at the queue.
Otherwise, each packet consumes one token and leaves the system immediately. If the bucket
is full, new token arrivals will be dropped. The system reaches the steady state after a
sufficiently long time.
Let 1, 2, 3, 4, … denote the states where there are 1, 2, 3, 4… packets in the buffer. Let -1, -2,
-3 denote the states where there are 1, 2, 3 tokens in the bucket. Let 0 denote the state where
there are 0 packet and 0 token. Draw the state transition diagram of the system. Compute the
stationary probability that there are at least 1 token in the bucket. (Hint: it is very similar to an
M/M/1 queue, but the states are left-shifted by 3.)
5. BER vs SNR. 20%. We aim to plot BER vs SNR curves of two modulation schemes in this
question.
(1) BPSK. In wireless communication, we can transmit 0 and 1 through signals –1 and 1
respectively. Both –1and 1 signals have power of 1, so that the mean signal power is 1. This is
called Binary Phase Shift Keying (BPSK). Due to the existence of noise, the received signal is
–1+n or 1+n respectively, where n is the noise term. n follows Gaussian distribution
n~N(0, σ2). σ2 is the power of the noise, and thus 1
σ2 is SNR. If the received signal is ≥ 0, it
is decoded as 1; if the received signal is < 0, it is decoded as 0. We assume that 0 and 1 are sent
with equal probabilities. Compute average BER vs SNR of BPSK when SNR =
[0,5,10,15,20,25] dB. Hint: What is dB?
(2) 4PAM. Now we consider another modulation scheme, where each signal can represent two
bits. We can transmit 00, 01, 11, 10 through signals –3, –1, 1, and 3 respectively. The mean
signal power of the signal is32+12+12+32
4 = 5. This is called 4 pulse-amplitude modulation
(4PAM). Still, due to the existence of noise, the received signal is –3+n, –1+n, 1+n, or 3+n
respectively, where n is the noise term. Still, n follows Gaussian distribution n~N(0, σ2). σ2
is the power of the noise, and thus 5
σ2 is SNR. If the received signal is in (−∞, –2], (–2, 0], (0,
2], and (2, ∞), it is decoded as 00, 01, 11, and 10 respectively. We assume that 00, 01, 11, and
10 are sent with equal probabilities. Compute average BER vs SNR of 4PAM when SNR =
[0,5,10,15,20,25] dB. Note that if 00 is decoded as 01, it is regarded as one-bit error; if 00 is
decoded as 11, it is regarded as two-bit error. To compute Q function, you can use Python
math.erfc() function. math.erfc() returns result of erfc function, and Q(x) = 1
2
erfc x
√2
(3) Plot the BER vs SNR curves of BPSK and 4PAM. Discuss why improved data rate can
cause higher BER.
If you use any form of programming to complete this task, you need to submit your code as
LastnameFirstBER.py.
6. Erlang. 20%. Erlang B Figure Establishment. In this task, you will need to establish Erlang
B Figure through two ways, by simulation and by calculation. Show your plotted figures as
your final answers. Your plotted figures should match one of the figures in the lecture slides.
The ranges of the figures: x-axis, λ
μ is from 0.1 to 100; y-axis, probability of blocking is from
0.001 to 0.1.
By simulation: You will need to build simulation on an M/M/m/m queue with arbitrary m.
You can reuse the codes in Week 6 Lab to simulate an M/M/m/m queue. Your Python code
must be submitted as supplementary material.
Let m = 1,2,3, … , 9; 10, 20,30, … ,90, 100. Let λ
μ = 0.1,0.2, … , 0.9; 1, 2,3, … ,9; 10, 20,30, …,
90, 100. You will need to find the simulated the probability of blocking under all m and λ
μ
values, and plot the Erlang B Chart (using log-log chart). You need to submit your Python
code as LastnameFirstSimulation.py.
By calculation: You will need to use Erlang B formulation to plot the chart. Still, let m =
1,2,3, … , 9, 10, 20,30, … ,90, 100. Let λ
μ = 0.1,0.2, … , 0.9, 1, 2,3, … ,9,10, 20,30, … , 90, 100.
You will need to find the calculated the probability of blocking under all m and λ
μ values, and
plot the Erlang B Chart (using log-log chart). You need to submit your Python code as
LastnameFirstCalculation.py.
7. Socket Programming. 20%. In this task, you will need to build a multicasting server for a
chatroom. Each client will first connect to the server. Then, if the client sends a message to the
server, all connected clients will receive the message. The client side is provided in Q7client.py.
An exemplary server side is running at “wbserver.cs.usyd.edu.au” and port number 34000. You
can use Q7client.py and change the serverName as “wbserver.cs.usyd.edu.au” to connect to the
exemplary server. (Need to use VPN if you are not at the University.) We do not provide the
code of the server, and your task is to re-build the server by yourself. Please note, only the
serverName and serverPort can be changed; anything else in the Q7client.py cannot be changed!
When you start the client, you will first input your name (e.g., “TestName”), and then you can
send your message (e.g., “Hello World!”). Then, all the connected clients will receive
“TestName: Hello World!”.
(1) Read the code of Q7client.py, and use it to connect to the exemplary server to understand
what functions it can provide. An example of results are shown below.
(2) Write the code of server by yourself. (Hint: your server should support multiple clients at
the same time, so that you need to establish multiple threads for each new client.)
(3) Run your server and at least three clients in your own computer and test if they can work
correctly. In this step, the server is run on your local machine so that the server’s IP address
should be 127.0.0.1. Also, the server socket should bind with port number 34000.
(4) After (3) Use one of the clients to send a message “Hello World!”. Use Wireshark to capture
what packets are sent from this client to the server and what packets are sent from the server to
all clients. Use screenshot to show that all clients receive the message.
You need to submit your server code in Python 3. You should name it as
LastnameFirstNameServer.py. You need to submit your Wireshark trace. You should name it
as LastnameFirstNameCapture.pcapng
We will test your server code by the following approach. We will run three Q7client.py
(without any change, i.e., with 127.0.0.1 and 34000) and your server code (without any change)
in one computer. You will get significant penalty if your submitted code does not work (e.g.,
we need to modify your code).
Submission instructions. In the “main file submission”, you can only upload your answers
in a single pdf file. In the “supplementary file submission”, zip all your codes and captures
in one file and upload.
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代做ceng0013 design of a pro...
2024-11-13
代做mech4880 refrigeration a...
2024-11-13
代做mcd1350: media studies a...
2024-11-13
代写fint b338f (autumn 2024)...
2024-11-13
代做engd3000 design of tunab...
2024-11-13
代做n1611 financial economet...
2024-11-13
代做econ 2331: economic and ...
2024-11-13
代做cs770/870 assignment 8代...
2024-11-13
代写amath 481/581 autumn qua...
2024-11-13
代做ccc8013 the process of s...
2024-11-13
代写csit040 – modern comput...
2024-11-13
代写econ 2070: introduc2on t...
2024-11-13
代写cct260, project 2 person...
2024-11-13
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!