Course Documents Authorized Duration: 120 minutes. Questions are generally independent. You can respond to any question before the other.

Similar documents
Only slides are your own summaries are authorized Summaries must contain only equations. No exercises or solutions are authorized.

Course Documents Authorized Duration: 120 minutes. Exercise 1. Monte Carlo Simulation and Confidence Interval (5 points)

التعليمات: أجب عن جميع األسئلة

Solutions to COMP9334 Week 8 Sample Problems

Chapter 3 Balance equations, birth-death processes, continuous Markov Chains

Lecture 7: Simulation of Markov Processes. Pasi Lassila Department of Communications and Networking

CS 798: Homework Assignment 3 (Queueing Theory)

CS418 Operating Systems

Performance Evaluation of Queuing Systems

16:330:543 Communication Networks I Midterm Exam November 7, 2005

A Study on Performance Analysis of Queuing System with Multiple Heterogeneous Servers

Queueing Theory I Summary! Little s Law! Queueing System Notation! Stationary Analysis of Elementary Queueing Systems " M/M/1 " M/M/m " M/M/1/K "

EP2200 Course Project 2017 Project II - Mobile Computation Offloading

Readings: Finish Section 5.2

λ λ λ In-class problems

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

Queuing Theory. Using the Math. Management Science

Queuing Networks: Burke s Theorem, Kleinrock s Approximation, and Jackson s Theorem. Wade Trappe

Name of the Student:

CDA5530: Performance Models of Computers and Networks. Chapter 4: Elementary Queuing Theory

Link Models for Circuit Switching

Bernoulli Counting Process with p=0.1

Multiaccess Problem. How to let distributed users (efficiently) share a single broadcast channel? How to form a queue for distributed users?

Introduction to Markov Chains, Queuing Theory, and Network Performance

Computer Systems Modelling

Buzen s algorithm. Cyclic network Extension of Jackson networks

Computer Systems Modelling

Operations Research II, IEOR161 University of California, Berkeley Spring 2007 Final Exam. Name: Student ID:

Introduction to Queuing Theory. Mathematical Modelling

NICTA Short Course. Network Analysis. Vijay Sivaraman. Day 1 Queueing Systems and Markov Chains. Network Analysis, 2008s2 1-1

Probability Models in Electrical and Computer Engineering Mathematical models as tools in analysis and design Deterministic models Probability models

Session-Based Queueing Systems

6 Solving Queueing Models

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

Homework 1 - SOLUTION

CPSC 531 Systems Modeling and Simulation FINAL EXAM

Introduction to Queueing Theory with Applications to Air Transportation Systems

1.225 Transportation Flow Systems Quiz (December 17, 2001; Duration: 3 hours)

QUEUING MODELS AND MARKOV PROCESSES

Time Reversibility and Burke s Theorem

Master thesis. Multi-class Fork-Join queues & The stochastic knapsack problem

Advanced Computer Networks Lecture 3. Models of Queuing

Link Models for Packet Switching

Solutions to Homework Discrete Stochastic Processes MIT, Spring 2011

57:022 Principles of Design II Final Exam Solutions - Spring 1997

QueueTraffic and queuing theory

An Admission Control Mechanism for Providing Service Differentiation in Optical Burst-Switching Networks

Capacity management for packet-switched networks with heterogeneous sources. Linda de Jonge. Master Thesis July 29, 2009.

Statistics 150: Spring 2007

Chapter 5: Special Types of Queuing Models

Queueing Theory. VK Room: M Last updated: October 17, 2013.

Queueing Theory II. Summary. ! M/M/1 Output process. ! Networks of Queue! Method of Stages. ! General Distributions

Data analysis and stochastic modeling

COMP9334: Capacity Planning of Computer Systems and Networks

Queuing Analysis. Chapter Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

Chapter 10. Queuing Systems. D (Queuing Theory) Queuing theory is the branch of operations research concerned with waiting lines.

Computer Networks More general queuing systems

One billion+ terminals in voice network alone

Chapter 11. Output Analysis for a Single Model Prof. Dr. Mesut Güneş Ch. 11 Output Analysis for a Single Model

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

2DI90 Probability & Statistics. 2DI90 Chapter 4 of MR

GI/M/1 and GI/M/m queuing systems

5/15/18. Operations Research: An Introduction Hamdy A. Taha. Copyright 2011, 2007 by Pearson Education, Inc. All rights reserved.

Discrete-event simulations

Introduction to queuing theory

Exercises Solutions. Automation IEA, LTH. Chapter 2 Manufacturing and process systems. Chapter 5 Discrete manufacturing problems

Queueing Theory and Simulation. Introduction

QUEUING SYSTEM. Yetunde Folajimi, PhD

Chapter 5. Elementary Performance Analysis

Introduction to Queueing Theory

Non Markovian Queues (contd.)

SOLUTIONS IEOR 3106: Second Midterm Exam, Chapters 5-6, November 8, 2012

Markov Chains. X(t) is a Markov Process if, for arbitrary times t 1 < t 2 <... < t k < t k+1. If X(t) is discrete-valued. If X(t) is continuous-valued

Review of Queuing Models

Probability and Statistics Concepts

Page 0 of 5 Final Examination Name. Closed book. 120 minutes. Cover page plus five pages of exam.

Introduction to queuing theory

STEADY-STATE PROBABILITIES FOR SOME QUEUEING SYSTEMS: Part II

Queuing Theory. Richard Lockhart. Simon Fraser University. STAT 870 Summer 2011

Quiz Queue II. III. ( ) ( ) =1.3333

PBW 654 Applied Statistics - I Urban Operations Research

MSA 640 Homework #2 Due September 17, points total / 20 points per question Show all work leading to your answers

Networking = Plumbing. Queueing Analysis: I. Last Lecture. Lecture Outline. Jeremiah Deng. 29 July 2013

7 Variance Reduction Techniques

Little s result. T = average sojourn time (time spent) in the system N = average number of customers in the system. Little s result says that

Queueing systems. Renato Lo Cigno. Simulation and Performance Evaluation Queueing systems - Renato Lo Cigno 1

YORK UNIVERSITY FACULTY OF ARTS DEPARTMENT OF MATHEMATICS AND STATISTICS MATH , YEAR APPLIED OPTIMIZATION (TEST #4 ) (SOLUTIONS)

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER I EXAMINATION MH4702/MAS446/MTH437 Probabilistic Methods in OR

Introduction to Queueing Theory

Since D has an exponential distribution, E[D] = 0.09 years. Since {A(t) : t 0} is a Poisson process with rate λ = 10, 000, A(0.

CHAPTER 4. Networks of queues. 1. Open networks Suppose that we have a network of queues as given in Figure 4.1. Arrivals

UNIVERSITY OF YORK. MSc Examinations 2004 MATHEMATICS Networks. Time Allowed: 3 hours.

Outline. Finite source queue M/M/c//K Queues with impatience (balking, reneging, jockeying, retrial) Transient behavior Advanced Queue.

Queueing Theory (Part 4)

Birth-Death Processes

A TANDEM QUEUEING SYSTEM WITH APPLICATIONS TO PRICING STRATEGY. Wai-Ki Ching. Tang Li. Sin-Man Choi. Issic K.C. Leung

Chapter 2 Queueing Theory and Simulation

Part I Stochastic variables and Markov chains

Chapter 2. Poisson Processes. Prof. Shun-Ren Yang Department of Computer Science, National Tsing Hua University, Taiwan

Slides 9: Queuing Models

Transcription:

KINGDOM OF SAUDI ARABIA Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University Faculty of Computer Science and Information المملكة العربية السعودية وزارة التعليم العالي جامعة اإلمام محمد بن سعود اإلسالمية كلية علوم الحاسب والمعلومات Final Exam in Modeling and Simulation (CS-433) Course Documents Authorized Duration: 120 minutes اإلسم الثالثي:... المستوى...... الرقم الجامعي النتيجة: 40/ Questions are generally independent. You can respond to any question before the other. يمكنك اإلجابة على أي سؤال قبل أي سؤال آخر ألن األسئلة عموما غير مترابطة. الرجاء إعادة أوراق اإلجابة فقط أوراق األسئلة ال تعاد إلى الدكتور Grading Exercise 1 General Questions 4 points Exercise 2 Queuing Theory 10 points Exercise 3 Simulation 16 points Total 30 points Dr. Anis Koubâa Januray 2008

Exercise 1. General Questions (5 points) (15 mn) You can have more than one correct answer in each question Each correct answer gives +0.5 and each wrong answer gives -0.5. There are eight correct answers. There is at least one correct answer in each question. 1- What is a state of the system in the discrete-event simulation? A It is a variable that represents the simulation time B It is variable that represents an event in the system C It is a variable that represents the behavior of the system D It is variable that represents describe the changes that occur in the system 2- The confidence interval A becomes larger when the confidence level decreases B becomes larger when the confidence level increases C becomes larger when the variance of the sample increases D becomes larger when the sample size increases 3- In discrete-event simulations A Events are stored in a future event list in increasing order of their time stamps B The simulation time progresses at regular time steps C Events are stored in a future event list in decreasing order of their time stamps D The simulation time progresses at according to the event time stamps 4- In Continuous Markov Chains A The transition probability to the same state is always equal to zero B The steady state probability can be different from zero C The CDF of the state holding time is 1 exp, is the output rate D The output transition rate is equal to the sum of input transition rates. Dr. Anis Koubâa 2/9 Januray 2008

Exercise 2. Queueing Theory (10 points) (20 minutes) Consider an M/M/1 queuing system with an arrival rate λ=0.4 and service rate μ=0.5. 1. Compute the system load and tell if the system stable or not? (1 point) 0.4 0.5 0.8 The system is stable because 1 2. Compute the average number of customers in the system? (1 point) The average number of customer in the system is 0.8 1 10.8 4 We made a simulation run and we find that the average number of customers is equal to 6.32. 3. What are the TWO possible reasons that explain the difference between simulation and analytical results? (3 points) The simulation time may be too short, and thus did not reach the steady state The random number generator may be bad 4. List TWO advantages of simulation models as compared to analytical models (2 points). Simulation can be used for highly complex system where analytical models are not possible. Simulations are more flexible than mathematical modeling and have fewer assumptions. Exercise 3. Queueing Theory (10 points) (20 minutes) Consider a computer system with two processors and one infinite queue. Tasks arrive to the processors according to a Poisson process with a rate 20 / and the each server has a processing speed of 2 /. The service time is exponentially distributed with a mean 50. 1. What is the service rate of each processor expressed in /. The service rate 20 / 2. Compute the average task size (L) in Kbits? (1 point) (assume that 1 1000 ) The average size of the task is / / 100 3. Determine the queue model of the computer system and compute the expected queue length of the system? (2 points) Dr. Anis Koubâa 3/9 Januray 2008

This is an M/M/2 queue model as there are two servers with the same rate, an infinite queue, a Poisson arrival and exponential service time. The expected queue length is: E [ X ] = 2ρ + ( 2ρ ) 2 2! 1 ρ ( ρ ) 20 2 220 0.5 We need to compute 1 1 1 1 π 0 = = = = 2 2 4 ( ρ ) 4 ( 0.5) 1 3 1 ( 2 ρ ) 1 ( 20.5) 1+ 1+ + + + + 2 ( 1 ρ ) 2 ( 1 0.5) 1 Thus, ( ) 2 2ρ ρ 1 0.5 1 1 4 E [ X ] = 2ρ + π 2 0 = 1+ = 1+ = = 1.333 tasks 2! 1 ρ 2 0.25 3 3 3 ( ) 4. If an M/M/1 queue model was used for the computer system with an arrival rate 20 / and one processor with a service rate 40 /. Decide if the M/M/1 queue model will provide faster response time or not as compared to the previous queue model of the computer system? (2 points) The response time for the M/M/1 queue model is: // 0.05 The response time in the M/M/2 queue is // // 1 40 20 4 0.066 320 Thus, the M/M/1 queue model would be faster than the M/M/2 queue model. 2 π 0 Dr. Anis Koubâa 4/9 Januray 2008

Exercise 4. Simulation (16 points) (75 minutes) Consider the network simulation problem as shown in the following figure. we propose to study the performance of a network router which has a buffer to store incoming packets from a video server and phone server in a local network and a constant transmission speed equal to C = 1 Mbit/sec. Figure 1. Network Simulation Model We assume that the router has an infinite buffer size. The first station sends video stream at a rate 1 / and the second station sends a voice stream at a rate 2 /. We assume that both streams follow a Poisson Arrival Process and that the total arrival rate 1 2 /. All Packets have an exponentially distributed service time with the mean 1/μ. We make two simulation runs with different simulation times, and we observe the results of waiting time. Table 1 presents the simulation and analytical results of the waiting time for this network. Table 1. Average Queueing Time (ms) as a function of the system load ρ Rho Waiting Time (ms) Analytical Waiting Time (ms) Run#1 Waiting Time (ms) Run#2 0.1 0.2020 0.2036 0.2027 0.2 0.9091 0.9004 0.9077 0.3 2.3377 2.3383 2.3459 0.4 4.8485 4.8241 4.8654 0.5 9.0909 8.8637 9.1200 0.6 16.3636 15.5304 16.3455 0.7 29.6970 27.5535 29.9064 0.8 58.1818 52.9243 59.3392 0.9 147.2727 123.8460 146.6010 The same results are also presented in Figure 1. 1. Did Simulation run#1 and Simulation run#2 reach the steady state? Explain (2 points). Simulation Run# 2 has reached the steady state because all its values are close to the analytical results. However, Simulation run#1 did not reach the steady state because its values at high loads are far from the analytical results. Dr. Anis Koubâa 5/9 Januray 2008

60 58.18 52.92 59.34 50 40 30 29.70 27.55 29.91 20 16.36 15.53 16.35 10 0 2.34 0.20 0.91 0.20 0.90 0.20 0.91 2.34 8.86 9.09 9.12 4.82 4.85 4.87 2.35 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Analytical Run#1 Run#2 Figure. 1. Queueing Time (ms) as a function of the system load ρ 2. What are the maximum system load and the minimum service rate (packets/sec) such that the Queuing Time do not exceed 17 ms? (2 points) According to the figure, the system load must not exceed 0.6. This means that the maximum service 0.6. 0.0109 Thus the minimum service rate is 91.67 packets/sec. 3. Compute is the margin of error and the confidence interval of waiting time for 0.9 for both runs assuming the sample size and standard deviation presented in Table 2. Table 2. Sample Size and Std Dev of the simulation runs Rho Sample Size Standard deviation Run#1 234 87.70 Run#2 3229 60.48 The margin of error in run#1 is : 1.96. 11.236 The confidence interval for run #1 is then: 123.84 11.236, 123.84 11.236 112.6091, 135.0829] The margin of error in run#1 is : 1.96. 2.0860 The confidence interval for run #1 is then: 146.6 2.086, 146.6 2.086 144.5149, 148.6871] Dr. Anis Koubâa 6/9 Januray 2008

4. What do you conclude on the confidence on the results of simulation run #1 and simulation run #2? It can be easily observed that run#2 provided more confidence on the results rather than run#1, because for the same confidence level, it has a shorter Dr. Anis Koubâa 7/9 Januray 2008