CS445: Modeling Complex Systems

Similar documents
Contents. Basic Concepts. Histogram of CPU-burst Times. Diagram of Process State CHAPTER 5 CPU SCHEDULING. Alternating Sequence of CPU And I/O Bursts

Chapter 6: CPU Scheduling

Single-Server Queue. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

ECE 5325/6325: Wireless Communication Systems Lecture Notes, Spring 2013

Single-Server Queue. Hui Chen, Ph.D. Department of Engineering & Computer Science. Virginia State University. 1/23/2017 CSCI Spring

Single-Server Queue. Hui Chen, Ph.D. Computer Science Dept. of Math & Computer Science Virginia State University Petersburg, VA 23806

Event-Driven Scheduling. (closely following Jane Liu s Book)

COMP Online Algorithms. Paging and k-server Problem. Shahin Kamali. Lecture 11 - Oct. 11, 2018 University of Manitoba

Medium Access Methods. Lecture 9

Lecture 8: Frequency Reuse Concepts

5. Process and thread scheduling

My Research. 1 Animation = 1K Words. Overview of by Azer Bestavros, Fall

Link Models for Circuit Switching

Real Time User-Centric Energy Efficient Scheduling In Embedded Systems

PRIORITY QUEUES AND HEAPS. Lecture 19 CS2110 Spring 2014

IEOR 130 Methods of Manufacturing Improvement Fall, 2018, Prof. Leachman Homework Assignment 8, Due Tuesday Nov. 13

ITEE Journal. Information Technology & Electrical Engineering

Circuit Switching: Traffic Engineering References Chapter 1, Telecommunication System Engineering, Roger L. Freeman, Wiley. J.1

Channel Capacity. Tom McDermott, N5EG June 1997

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims. Lecture 17: Heaps and Priority Queues

MOBILE COMMUNICATIONS (650539) Part 3

Assignment Problem. Introduction. Formulation of an assignment problem

Mobile Communication Systems

Free Home Valuation Report Lead Follow Up Tips & Phone Scripts and appointment eneral lead follow up conversion tips

BONUS MATERIALS. The 40 Hour Teacher Workweek Club. Learn how to choose actionable steps to help you:

Delay Performance Modeling and Analysis in Clustered Cognitive Radio Networks

Queuing Theory Systems Analysis in Wireless Networks Mobile Stations with Non-Preemptive Priority

k-means Clustering David S. Rosenberg December 15, 2017 Bloomberg ML EDU David S. Rosenberg (Bloomberg ML EDU) ML 101 December 15, / 18

Homework Assignment #1

Link and Link Impedance 2018/02/13. VECTOR DATA ANALYSIS Network Analysis TYPES OF OPERATIONS

Mining for Statistical Models of Availability in Large-Scale Distributed Systems: An Empirical Study of

Time And Resource Characteristics Of Radical New Product Development (NPD) Projects And their Dynamic Control. Introduction. Problem Description.

QOS Enhancement for OFDM System Using Queuing Theory and an Optimized Estimator

Step 3- Creating A Good Work Flow Floor Plan For Faster Production And Creating Process Manuals

Lecture 20: Mitigation Techniques for Multipath Fading Effects

Seaman Risk List. Seaman Risk Mitigation. Miles Von Schriltz. Risk # 2: We may not be able to get the game to recognize voice commands accurately.

Scheduling on a Channel with Failures and Retransmissions

TSIN01 Information Networks Lecture 9

Teletraffic and Network Dimensioning. David Falconer Carleton University

Grades 6 8 Innoventure Components That Meet Common Core Mathematics Standards

Real Time Operating Systems Lecture 29.1

Model 5-1: Simple Call Center

***NEW*** We will give you 2 pencils, an eraser and sharpener. You are not allowed to bring your own stationery into the testing room with you.

03_57_104_final.fm Page 97 Tuesday, December 4, :17 PM. Problems Problems

Bandwidth Estimation Using End-to- End Packet-Train Probing: Stochastic Foundation

Antennas and Propagation. Chapter 6b: Path Models Rayleigh, Rician Fading, MIMO

PRIORITY QUEUES AND HEAPS. Slides of Ken Birman, Cornell University

Hospital Delivery System Comparison Via Computer Simulation

Stability Analysis for Network Coded Multicast Cell with Opportunistic Relay

RICOH Ri 3000/Ri 6000

PRIORITY QUEUES AND HEAPS

CSE 355: Human-aware Robo.cs Introduction to Theoretical Computer Science

Downlink Erlang Capacity of Cellular OFDMA

Utilization-Aware Adaptive Back-Pressure Traffic Signal Control

EE 126 Fall 2006 Midterm #1 Thursday October 6, 7 8:30pm DO NOT TURN THIS PAGE OVER UNTIL YOU ARE TOLD TO DO SO

A Lesson in Probability and Statistics: Voyager/Scratch Coin Tossing Simulation

3.5: Multimedia Operating Systems Resource Management. Resource Management Synchronization. Process Management Multimedia

Unit 2: Mobile Communication Systems Lecture 8, 9: Performance Improvement Techniques in Cellular Systems. Today s Lecture: Outline

EE6604 Personal & Mobile Communications. Week 16. Multi-carrier Multi-access Techniques

Raj Jain. The Ohio State University

Candlestick Secrets for Profiting in Options Seminar Bonus module- Using NCS to set up option trades + Bouncing Ball strategy

MAT points Impact on Course Grade: approximately 10%

Thesis Overview. -From the Appalachian State Honor s College website (

Probability Paradoxes

Author(s): Hope Phillips

CS188: Section Handout 1, Uninformed Search SOLUTIONS

The Top Five Interview Questions You Need to Know

Cellular Concept. Cell structure

Administrivia. CS 188: Artificial Intelligence Spring Agents and Environments. Today. Vacuum-Cleaner World. A Reflex Vacuum-Cleaner

Capacity Analysis and Call Admission Control in Distributed Cognitive Radio Networks

Comparing Exponential and Logarithmic Rules

Make better decisions. Learn the rules of the game before you play.

Performance Tuning of Failure Detectors in Wireless Ad-Hoc Networks: Modelling and Experiments

Lectures 8 & 9. M/G/1 Queues

Module 3: Physical Layer

Data Flow Modelling. Fault Tolerant Systems Research Group. Budapest University of Technology and Economics

Cognitive Radio Spectrum Access with Prioritized Secondary Users

The topic for the third and final major portion of the course is Probability. We will aim to make sense of statements such as the following:

Machine Translation - Decoding

PERFORMANCE MODELLING OF RECONFIGURABLE ASSEMBLY LINE

Foundations of AI. 3. Solving Problems by Searching. Problem-Solving Agents, Formulating Problems, Search Strategies

ICT 5305 Mobile Communications. Lecture - 4 April Dr. Hossen Asiful Mustafa

Simulation Modeling C H A P T E R boo 2005/8/ page 140

Global State and Gossip

Chapter 3: Cellular concept

Statistical Measures

A Study on Basic VTS Guideline based on Ship s Operator s Consciousness

College of Engineering

Say hello. Age UK My Phone. to the. Connecting you instantly to the people you need to talk to most and that s it.

Flightboard. Service Provider Handbook

CS 540: Introduction to Artificial Intelligence

Simple Search Algorithms

IEOR 130 Methods of Manufacturing Improvement Fall, 2017, Prof. Leachman Solutions to Homework Assignment 8

Downloaded by MASSACHUSETTS INST OF TECHNOLOGY (MIT-CAMBRIDGE) on October 10, DOI: /1.G μ 1 X.

History and Perspective of Simulation in Manufacturing.

EKT 450 Mobile Communication System

Stats: Modeling the World. Chapter 11: Sample Surveys

LEAD CALL SHEET A. Everyone I know wants to book with me- I am a master booker! NAME NUMBER WHERE MET Text Call Text Call 10) 11) 12) 13) 14) 15) 16)

Computer Science. Using neural networks and genetic algorithms in a Pac-man game

Traffic Controller Timing Processes

Transcription:

CS445: Modeling Complex Systems Travis Desell! Averill M. Law, Simulation Modeling & Analysis, Chapter 2!!

Time-Shared Computer Model

Time Shared Computer Model Terminals Computer Unfinished s 2 2... Active CPU. Queue n A company (or university) has a computer system consisting of a single central processing unit (CPU) and n terminals. This was a standard model for old mainframes, but is still applicable currently, as it is very similar as to how multiple processes are executed on a CPU by an operating system, or how multiple users utilize a supercomputer or high performance computing cluster.

Time Shared Computer Model Terminals Computer Unfinished s 2 2... Active CPU. Queue n The operator of each terminal will think for awhile (the time is an exponential random variable with mean 25 seconds) and then sends to the CPU a job having service time exponentially distributed with mean 0.8 seconds.

Time Shared Computer Model Terminals Computer Unfinished s 2 2... Active CPU. Queue n The jobs arriving at the CPU join a single but are served in a round robin fashion instead of a FIFO manner. The CPU allocates each job a time slice or quantum of length q = 0. second. If you have taken Operating Systems this should be familiar. Each job is for its quantum, and if it is not finished by the end of the quantum, it is placed back into the.

Time Shared Computer Model 2 Arrival CPU Run End Simulation n. The model can be described with three events, given a minimized event-graph.! There are n initial arrival events, one per terminal. This will put the event into the or start a CPU run if there are no run.! The CPU run event will process a time slice, which will either start another arrival event after the thinking time if the job completes, or start another CPU run event when the next time slice has ended.! When the specified number of jobs have completed, this will generate an end simulation event.

Time Shared Computer Model Let Ri be the response time of the ith job to finish service. This is defined as the time elapsing between the instant the job leaves its terminal and the instant it is finished being by the CPU. We can vary the number of terminals n to evaluate a variety of information about the simulation.! Given a number of job completions (000):!. What is the expected average response time for a job? (continuous time statistic) 2. What is the time average number of jobs waiting in the? (discrete time statistic) 3. What is the utilization of the CPU? (continuous time statistic)! It is also possible to answer questions such as:. Given n users, how many terminals can it have on the system and still provide users with an average response time of no more than 30 seconds?

Required Data Structures This simulation just requires one (probably implemented as a linked list), to hold the jobs being by the CPU. It will need to have a method to push to the end of the, and pop the front of the.! c++ s has push_back and pop_front: http://www.cplusplus.com/reference///

Multi-Teller Bank with Jockeying

Time Shared Computer Model Computer Tellers 2 3 4 5 A company (or university) has a computer system consisting of a single central processing unit (CPU) and n terminals. This was a standard model for old mainframes, but is still applicable currently, as it is very similar as to how multiple processes are executed on a CPU by an operating system, or how multiple users utilize a supercomputer or high performance computing cluster.

Multiteller Bank with Jockeying Computer Tellers 2 3 4 5 Another common situation worth simulating is a multiteller bank with jockeying.! A bank with N tellers (in our case 5) opens at 9am and closes at 5pm but operates until all customers in the bank by 5pm have been served. Customers arrive determined by an IID (independent and identically distributed) exponential random variable with mean minute. Customers are serviced with time IID exponential random with mean 4.5 minutes.

Multiteller Bank with Jockeying Computer Tellers 2 3 4 5 Each teller has their own separate. When a customer arrives, they will choose the leftmost shortest to enter.

Multiteller Bank with Jockeying Computer Tellers 2 3 4 5 s process their s in order, however if a customer could move up by going into another line, they will.

Multiteller Bank with Jockeying Computer Tellers 2 3 4 5 s process their s in order, however if a customer could move up by going into another line, they will.

Multiteller Bank with Jockeying Computer Tellers 2 3 4 5 s process their s in order, however if a customer could move up by going into another line, they will.

Multiteller Bank with Jockeying Computer Tellers 2 3 4 5 The rule is formalized: If the completion of service at a teller i causes nj > ni + for some other teller j, then the customer from the tail of j jockeys to the tail of i. If there are two or more such customers, the one from the closest, leftmost jockeys. If teller i is idle, the customer begins service at teller i.

Multiteller Bank with Jockeying Computer Tellers 2 3 4 5 Some example questions that can be analyzed with this simulation are (given a number of tellers, n):!. What is the estimated time-average total number of customers in the? 2. What is the expected average delay in the? 3. What s the expected maximum delay in the?! Bonus: What s the expected average time after 5pm that the bank closes? Note, to calculate this many day-long simulations will need to be run.

Multiteller Bank with Jockeying Arrival Departure Close Doors We can specify this simulation with another simple event graph. In fact, it s identical to the event graph for the M/M/.! There are three events:. Arrival of a customer. This will handle scheduling the customer to a teller, and also generate the next customer arrival. 2. Departure of a customer. This will move the next customer up in line (if there is one) and perform the jockeying. This will also schedule the departure of any customer (the next in line or a jockeyed customer) if they are moved to the front of the line. 3. Closing of the doors at 5, which prevents any further arrivals. The simulation ends when there are no events left.

Required Data Structures A is required for each teller (which can be implemented in a ). This will hold the customers in line and the customer being served for that teller. You don t need as many s as the book specifies (2n+), if you implement things using events and classes given the in class assignment code.

Shop Model

Shop Model Station Station 2 Station 3 Station 5 Station 4 type job The Shop model is another even more complicated model, simulating jobs as they move through a shop.

Shop Model Station Station 2 Station 3 Station 5 Station 4 type job There are multiple types of jobs, each which visit each station in a different order. Type : stations 3 2 5 Type 2: stations 4 3 Type 3: stations 2 5 4 3

Shop Model Station Station 2 Station 3 Station 5 Station 4 type 2 job There are multiple types of jobs, each which visit each station in a different order. Type : stations 3 2 5 Type 2: stations 4 3 Type 3: stations 2 5 4 3

Shop Model Station Station 2 Station 3 Station 5 Station 4 type 3 job There are multiple types of jobs, each which visit each station in a different order. Type : stations 3 2 5 Type 2: stations 4 3 Type 3: stations 2 5 4 3

Shop Model Station Station 2 Station 3 Station 5 Station 4 type 3 job s arrive at the job shop with inter arrival time IID exponential random with mean 0.25 hours. There are the three types of jobs, with respective probabilities 0.3, 0.5 and 0.2

Shop Model Station Station 2 2 3 2 Station 3 2 3 4 Station 5 Station 4 2 3 type 3 job Each station has a number of machines. Station has 3, station 2 has 2, station 3 has 4, station 4 has 3 and station 5 has.! If a job arrives at a station it will enter a FIFO if the first machine in the station is in use. If not, it will start on the first machine and progress successively through them.

Shop Model Station Station 2 2 3 2 Station 3 2 3 4 Station 5 Station 4 2 3 type 3 job Here, the time to perform a task at a particular machine is generated with an IID 2-Erlang random variable, as this type of random variable has been shown to match data collected for this type of waiting. It was originally discovered by Erlang who gathered data to determine the number of telephone calls that might occur at the same time to operators of phone switching stations (see http://en.wikipedia.org/ wiki/erlang_distribution).

Shop Model Station Station 2 2 3 2 Station 3 2 3 4 Station 5 Station 4 2 3 type 3 job A 2-Erlang random variable with mean r can be calculated X = Y + Y2, where Y and Y2 are IID exponential random variables with mean r/2, alternately, X is known as a gamma random variable with shape parameter 2 and scale parameter r/2.

Shop Model Station Station 2 2 3 2 Station 3 2 3 4 Station 5 Station 4 2 3 type 3 job A 2-Erlang random variable with mean r can be calculated X = Y + Y2, where Y and Y2 are IID exponential random variables with mean r/2, alternately, X is known as a gamma random variable with shape parameter 2 and scale parameter r/2.

Shop Model Station Station 2 2 3 2 Station 3 2 3 4 Station 5 Station 4 2 3 type 3 job Each machine has a service time (in hours) generated with the 2- Erlang random variable: Station : 0.50, 0.60, 0.85, 0.50 Station 2:.0, 0.80, 0.75 Station 3:.20, 0.25, 0.70, 0.90,.00 And a job must pass through all stations to move on to the next station.

Shop Model Station Station 2 2 3 2 Station 3 2 3 4 Station 5 Station 4 2 3 type 3 job Each machine has a service time (in hours) generated with the 2- Erlang random variable: Station : 0.50, 0.60, 0.85, 0.50 Station 2:.0, 0.80, 0.75 Station 3:.20, 0.25, 0.70, 0.90,.00 And a job must pass through all stations to move on to the next station.

Shop Model Station Station 2 2 3 2 Station 3 2 3 4 Station 5 Station 4 2 3 type 3 job Using this simulation, we can determine things like:. The average expected number in the for each station. 2. The expected utilization of each station. 3.The expected average delay in for each station. We could then use this information and simulation to determine which machines to purchase given a certain amount of money to best increase production, etc.

Shop Model arrival of departure from station End simulation The event graph again looks similar!! There are three events:. Arrival of a job to the system. This will handle scheduling the job to its given first station, and also generate the next job arrival. 2. Departure of a job from a station. This will move the next job up in the FIFO (if there is one) and start processing of then next job at the station. This will also put the job in the next stations, or schedule it s departure. 3. Ending of the simulation.

Required Data Structures For this, a is required at each station, to hold the. When a job starts being we can calculate the time for the next one to begin processing, moving things through the machines. We will also need data structures for each station, and the machines within it to keep track of what is where.

Conclusions

Conclusions This lecture went over various more complicated simulations, to get an idea of how these can be described. Interestingly, they all can boil down to quite simple event graphs, however the actions of each event get progressively more complex. You ll have to implement one of these for your next assignment.