12/7/2015© 2008 raymond p. jefferis iii1 simulation of computer systems
TRANSCRIPT
![Page 1: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/1.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 1
Simulation of Computer Systems
![Page 2: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/2.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 2
Overview of Simulation
• Fundamentals of discrete system simulation
• Building a system model
• Gathering system data
• Fitting the model
• Simulating the system
• Evaluating what-if conditions
• Using simulation in training
![Page 3: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/3.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 3
Available Tools
• Commercial simulation packages - CACI– SIMPROCESS– SIMSCRIPT
• Student versions of commercial packages– Arena (Systems Modeling Corporation)– ProModel (Promodel Corporation)
• Network monitor to gather data files
![Page 4: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/4.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 4
Introduction to Simulation
System types
Definition
Reasons for simulation
Simulation components
Development of a simulation --from model to verified results
![Page 5: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/5.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 5
System Types• Continuous
– Variables take on quasi-continuous values– Described by ordinary differential equations– Example: Motion of objects
• Discrete– Variables take on discrete values– Described by difference equations– Example: Queuing systems and networks
![Page 6: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/6.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 6
Definition
Simulation is the study of a process through observation of the behavior of a model over time in response to a pattern of inputs.
![Page 7: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/7.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 7
Keywords
• process
• model
• pattern of inputs
• response - behavior over time
• observations
• study
![Page 8: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/8.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 8
Process
• system to be simulated - aspect of whole
• exists as a physical object or system
• obeys natural (possibly known) laws
• responds predictably to inputs (controllable)
• responds over time
• may be observed (observable)
![Page 9: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/9.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 9
Model
• mathematical representation of the process
• based upon natural laws
• usually built by engineering scientist
• based upon experimental data
• must be verified
• predicts behavior for known inputs
![Page 10: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/10.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 10
Pattern of Inputs
• inputs affect system
• may be a time sequence
• may be statistically distributed– time is random variable– magnitude is random variable
![Page 11: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/11.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 11
Response
• behavior over time– Example: queue length
• may be statistical– Examples: arrival time, service time
![Page 12: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/12.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 12
Observations
• Inputs– Examples: packets, frames and their lengths,
arrival times
• Outputs– Examples: packets, frames and their lengths,
service times, queue lengths
![Page 13: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/13.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 13
Study
• network monitor (“SnifferTM”)
• “smart” switches, routers, & hubs
• modeling of distribution functions• verification of traffic rates and queues
TM Trademark of Network Associates, Inc.
![Page 14: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/14.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 14
Why simulate?
• Mathematical intractability
• Process independence needed
• Change of time scale needed
• Design tool
• Training tool
• Inference tool
![Page 15: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/15.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 15
Mathematical Intractability
• nonlinear models (queuing problems)
• models too complex (combinatorics)
• microscopic details wanted (distributions)
• analytical methods inadequate
• non-steady state solutions desired
![Page 16: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/16.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 16
Process Independence
• high testing costs - many alternatives
• parametric studies - many variations
• inaccessible processes - scale issues
• measurements alter the process - monitors
• hazards
![Page 17: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/17.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 17
Time Scale Change
• very short times - expand (microscopic)
• very long times - compress (macroscopic)
![Page 18: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/18.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 18
Design
• Model– reduction of time and cost to develop model
• Process– reduction of time and cost to optimize process– performance by some criterion
![Page 19: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/19.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 19
Training
• reduction of time and cost to train operator
• elimination of off-spec production that would otherwise occur during training
• elimination of costly “crashes” that would otherwise occur during training
• preparation for events not yet experienced
![Page 20: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/20.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 20
Inference
• Learning about possible relationships in system from external behavior
• model-reference diagnostics (possibly on-line using validated model)
![Page 21: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/21.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 21
Simulation Components
• Queuing system model
• Probability distributions
• Random numbers (generators)
• Random variable distributions
• Experiments - system data
![Page 22: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/22.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 22
Model System
![Page 23: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/23.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 23
Model Development (scientist)
• Fixed input/output data sets
• Adjust model & parameters to give best fit
![Page 24: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/24.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 24
Process Development (engineer)
• Fixed model & parameters
• Vary inputs to give best output performance
![Page 25: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/25.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 25
Optimization (process mgmt.)
• Fixed model and input data
• Adjust some parameters
• Review simulation results
• Repeat parameter adjustment to optimize
• Hill-climbing method
![Page 26: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/26.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 26
Scenarios (What-ifs)
• Fixed model
• Adjust some parameters or inputs (what-if)
• Review simulation results
• Repeat adjustment to get desired performance
• Evolutionary algorithm approach
![Page 27: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/27.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 27
Inputs
• assumed known
• assumed to influence process
• time/event bases
• form a sequence
• may be affected by sampling effects
![Page 28: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/28.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 28
Time-based Inputs
• have time-to-go
• triggered by clock
![Page 29: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/29.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 29
Event-based Inputs
• have condition of occurrence(based on process variables)
• triggered by process (model) conditions or state
![Page 30: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/30.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 30
Generalized Events
• time can be an event
• all events queued in linked list
![Page 31: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/31.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 31
Other Forms
• State machine– events– actions
• Expert system– if– then
![Page 32: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/32.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 32
Responses
• process must be observable
• observation must not disturb process
• state variables (observable)(saving state allows rerun from halt)
• assumed predictable and stable
• may be affected by sampling rate
• have time course for each input
![Page 33: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/33.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 33
Observations
• must not affect the process
• suffer from sampling effects - aliasing
• used to validate the model
• used historically to diagnose process faults
• used currently to filter process data
• used predictively to optimize performance
![Page 34: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/34.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 34
Process Study by Simulation
generation of inference about process from observations of model behavior in response to known inputs
![Page 35: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/35.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 35
Implications (Problem Formulation)
• What is the process?– What aspect is to be simulated?– What laws govern its behavior?
• What form should simulation take?– Discrete?– Continuous?
![Page 36: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/36.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 36
Related Issues
• user interface
• data capture interface
• data storage (often large files)
• fitting of distributions & models
• data presentation
• programming requirements
![Page 37: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/37.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 37
Implications (Study Objectives)
• What should be the result?
• What will be the expected benefits?
• Who will be the users of the results?
![Page 38: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/38.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 38
Implications (Model)
• What natural laws are represented?
• What assumptions, goals, measures?
• What boundary (limiting) conditions?
• What form (package, language)?
• How is it to be validated?
![Page 39: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/39.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 39
Implications (Data Collection)
• What data (how much, what type)?
• How often?
• How executed?
• What conditions?
• How processed?
• What precision?
• What format?
![Page 40: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/40.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 40
Implications (Coding)
• Package or language?
• What speed desired?
• Graphical effects?
• Object oriented?
• What interfaces?– User– Network monitor
![Page 41: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/41.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 41
Implications (Verification)
• How will this be accomplished?
• Testing of random number generator?
• Testing of time function inputs?
• Testing of traffic generation model?
• Testing of network monitor?
• Check physical units?
• Verification of predicted values?
![Page 42: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/42.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 42
Implications (Experimental Design)
• For observability
• To validate the model
• To validate the simulation
![Page 43: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/43.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 43
Implications (Analysis of Results)
• Do results make sense?
• Is time/physical scale (detail) appropriate?
• What inferences can be drawn?
• Are further studies needed?
![Page 44: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/44.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 44
Implications (Documentation)
• How will models be documented?
• How will results be presented?
• Save all for further studies?
![Page 45: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/45.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 45
Validation of Simulation
Validation is the determination that the simulated system closely approximates the real system for the given scope.
![Page 46: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/46.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 46
Validation (Functional Approach)
Operate in linear and nonlinear regions and confirm conformity with real system behavior. Operations outside the validated region should be “flagged” with warning messages for the user.
![Page 47: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/47.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 47
Validation (Distribution Issues)
Real-world probability distributions do not always conform to ideal models. Determine the degree of approximation and the resultant error.
Determine what traffic can be ignored, to remove statistical “outliers”
![Page 48: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/48.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 48
Validation (Independence Issues)
Verify statistical independence - does the model assume independence? Lack of it can invalidate such a model.
![Page 49: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/49.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 49
Validation (Aggregation of Effects )
Can effects that are separate be lumped together - time, space, etc. Determine if the degree of aggregation is too great.
![Page 50: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/50.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 50
Validation (Stationarity Issues)
Validate the stationarity of parameters and probability distributions - are there variations and are they significant to the accuracy of the simulation results?
![Page 51: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/51.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 51
Verification
Verification is the determination that the model and simulation are operating in the manner intended - that the logic of the simulation program is correct and is correctly implemented.
![Page 52: 12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems](https://reader035.vdocuments.site/reader035/viewer/2022062423/5697bf7b1a28abf838c83bce/html5/thumbnails/52.jpg)
04/21/23 © 2008 Raymond P. Jefferis III 52
Verification Steps
• Logic “walkthrough”
• Modular testing for correct I/O relationships
• Comparison with known results(Possibly compare with reduced system)
• Sensitivity testing (parameters output)
• Limit checking (inputs and parameters)