• 沒有找到結果。

Queueing Queueing Systems Systems Modeling and Performance Evaluation Modeling and Performance Evaluation with Computer Science

N/A
N/A
Protected

Academic year: 2021

Share "Queueing Queueing Systems Systems Modeling and Performance Evaluation Modeling and Performance Evaluation with Computer Science"

Copied!
43
0
0

加載中.... (立即查看全文)

全文

(1)

Queueing

Queueing

Systems

Systems

Modeling and Performance Evaluation

Modeling and Performance Evaluation

with Computer Science

with Computer Science

Spring, 2003 Spring, 2003 Dr. Eric Hsiao

Dr. Eric Hsiao--kuangkuang WuWu http://

(2)

What is going to be covered?

What is going to be covered?

(

(3)

Course Outline

Course Outline

• ProbabilityProbability

– Discrete/Continuous random variableDiscrete/Continuous random variable –

– Conditional ProbabilityConditional Probability

• Queuing ModelingQueuing Modeling

– M/M/1/kM/M/1/k –

– Bulk Service, Bulk ArrivalBulk Service, Bulk Arrival –

– M/G/1M/G/1 –

– G/G/1G/G/1

• Case Studies:Case Studies:

(4)

Lecture Progress

Lecture Progress

(February, 2003)

(February, 2003)

• QueueingQueueing SystemsSystems

– System FlowSystem Flow –

– Specification and Measure of Specification and Measure of QueueingQueueing System

System

• Notation and Structure for Basic Notation and Structure for Basic Queueing

Queueing SystemsSystems •

• Probability Z transformProbability Z transform •

(5)

Daily Experiences

Daily Experiences

• Waiting in Line:Waiting in Line:

– Waiting for breakfastWaiting for breakfast –

– Stopped at a traffic lightStopped at a traffic light –

– Slowed down on the freewaysSlowed down on the freeways –

– Delayed at the entrance to parking facilityDelayed at the entrance to parking facility –

– Queued for access to an elevatorQueued for access to an elevator –

(6)

Systems of Flow

Systems of Flow

• QueueingQueueing Systems Systems

– Systems of flowSystems of flow

• A flow system is one in which some A flow system is one in which some

commodity flows, moves, or is transferred

commodity flows, moves, or is transferred

through one or more finite

through one or more finite--capacity channels capacity channels in order to go from one point to another

in order to go from one point to another

• Commodity: (produce the demand)Commodity: (produce the demand)

– Such as packet massage, telephone message, Such as packet massage, telephone message, automobiles

automobiles

• Channel: (provide the service)Channel: (provide the service)

(7)

Service and Demand

Service and Demand

the arrival rate R the service rate (or capacity) C

(8)

Steady and Unsteady Flow

Steady and Unsteady Flow

• Whether the flow is steady or Whether the flow is steady or unsteady?

unsteady?

– Steady: those systems in which the flow Steady: those systems in which the flow proceeds in a predictable fashion

proceeds in a predictable fashion

– If R<C, a reliable and smooth fashionIf R<C, a reliable and smooth fashion –

– If R>C, the mean capacity is less than the If R>C, the mean capacity is less than the average flow requirements, chaotic

average flow requirements, chaotic

congestion occur

(9)

History of Computer Using

History of Computer Using

• Single UserSingle User •

• BatchBatch •

• TimeTime--SharingSharing •

• Sharing Communication lineSharing Communication line •

(10)

Modeling

Modeling

Mathematical Model of Real World Real World Verification Approximate solution Solution to the Model

(11)

Resource Sharing

Resource Sharing

• A resource is a device that can do A resource is a device that can do works for you at a finite time

works for you at a finite time

– e.g. A communication Channele.g. A communication Channel –

– e.g. A computere.g. A computer

• A demand requires work from resourceA demand requires work from resource

– e.g. message e.g. message –

(12)

User Behavior

User Behavior

(13)

Bursty

Bursty

Asynchronous

Asynchronous

Demands

Demands

• You cannot predict exactly You cannot predict exactly whenwhen they they will demand access

will demand access

• You cannot predict exactly You cannot predict exactly how muchhow much they will demand access

they will demand access

• Most of timeMost of time they do not need access to they do not need access to resource

resource

• When they ask for it, they want When they ask for it, they want immediate

(14)

Typical Traffic

Typical Traffic

Interactive Traffic

Short Response time Reliable Transmit

Real Time traffic

(15)

Resource Sharing

Resource Sharing

• Type1: Everyone use his resource Type1: Everyone use his resource singlely

singlely (not efficient).(not efficient). •

• Type2: Using Pool of resource sharing Type2: Using Pool of resource sharing those resources (by switching) plus the

those resources (by switching) plus the

cost of switch

cost of switch

• Type3: Using a large resource (as an Type3: Using a large resource (as an unit).

(16)

Law of Large Number

Law of Large Number

• The first resource sharing principleThe first resource sharing principle •

• Although each member of a Large population Although each member of a Large population may behave in a Random fashion, the

may behave in a Random fashion, the

population as a whole behave in a

population as a whole behave in a

predictable fashion.

predictable fashion.

– This is the This is the ““smoothing smoothing ““ effect of large populationeffect of large population –

– The predictable The predictable fahsionfahsion presents a total demand presents a total demand equal to the sum of the average demands of each

equal to the sum of the average demands of each

member

(17)

Conflict Resolution

Conflict Resolution

• QueueingQueueing: one gets severed, others : one gets severed, others wait

wait

• Splitting: Each get a piece of resourceSplitting: Each get a piece of resource •

• Blocking: One get served, all others are Blocking: One get served, all others are refused

refused

(18)

Response Time

Response Time

• When the throughput and capacity go When the throughput and capacity go up, the response time will go down

up, the response time will go down

• Economy of ScaleEconomy of Scale

– The second resource sharing principleThe second resource sharing principle –

– if you scale up throughput and capacity by if you scale up throughput and capacity by some factor F, then you reduce response

some factor F, then you reduce response

time by the factor

(19)

Economy of Scale

Economy of Scale

DATA

Original: B Block/sec Cbit/sec Scale: NB Block/sec NC bit/sec

(20)

Throughput, Efficiency,

Throughput, Efficiency,

Response time

Response time

• If you scale the capacity more slowly If you scale the capacity more slowly

than throughput while holding response

than throughput while holding response

time constant, then efficiency will

time constant, then efficiency will

increase

increase

• Key tradeoff among:Key tradeoff among:

(21)

System of Flow

System of Flow

• Flow of a commodity (demand) through Flow of a commodity (demand) through a finite

a finite--capacity channel (resource)capacity channel (resource)

– Steady FlowSteady Flow –

(22)

Steady Flow

Steady Flow

• Demand are known, constant smooth: Demand are known, constant smooth: predictable

predictable

• Single Channel:Single Channel:

– R = Arrival Rate (Cans/Sec)R = Arrival Rate (Cans/Sec) –

– C = Capacity (Cans/Sec)C = Capacity (Cans/Sec) –

– if R <= C Fineif R <= C Fine –

(23)

Network of Channels

Network of Channels

• MaxMax--Flow MinFlow Min--Cut TheoremCut Theorem

• R < C for each channelR < C for each channel •

• MaxmumMaxmum Flow , label the node, find a Flow , label the node, find a path

path Taipei

(24)

Unsteady Flow(I)

Unsteady Flow(I)

• Arrival time of Demand: Arrival time of Demand: UnpredicatbleUnpredicatble •

• SiseSise (Service time) of Demand: (Service time) of Demand: Unpredictable

Unpredictable

• Single Channel:Single Channel:

– Queue LengthQueue Length –

– Waiting TimeWaiting Time –

– Sever UtilizationSever Utilization –

– Throughput Throughput –

(25)

Unsteady Flow(II)

Unsteady Flow(II)

• Network of ChannelNetwork of Channel

– capacitycapacity –

– throughputthroughput –

– Response TimeResponse Time –

– EfficiencyEfficiency –

– design

Combinatonics and probablities kill you

(26)

General

General

Queueing

Queueing

System

System

Queueing System

• How to improve the system How to improve the system performance

(27)

Review of

Review of

Queueing

Queueing

• QueueingQueueing SystemsSystems

– NotationNotation –

– MarkovianMarkovian Queue, BirthQueue, Birth--andand--deathdeath –

– M/M/1 M/M/1 --> M/M/k/m> M/M/k/m –

– Stage Stage --> > ErlangianErlangian distributiondistribution –

– ParallelParallel –

– Network of QueueNetwork of Queue –

(28)

limited resouce (fixed number of queue size buffer N

(29)

How often they arrive

how long they will stay

(30)

What we are interested ?

What we are interested ?

• How long we are going to wait ?How long we are going to wait ? •

• How big the queue size should How big the queue size should be ?

(31)

Observation 1

Observation 1

• Each customer could be Each customer could be

characterized as the following:

characterized as the following:

– how often the traffic produced ?how often the traffic produced ? –

– how many service it may require ?how many service it may require ?

(32)

Observation 2

Observation 2

• Some users might be in the queue ?Some users might be in the queue ?

(33)

Observation

Observation

• Current State depends on Previous Current State depends on Previous State

State

Ν(τ)

(34)

Computer Queue System

Computer Queue System

• MarkovianMarkovian Chain:Chain:

– current state depends on previous one current state depends on previous one state only

state only

– time domaintime domain

• discretediscrete •

• continuouscontinuous

– state domain:state domain:

• dsicretedsicrete •

(35)

Birth

Birth

-

-

Death Process

Death Process

• Transitions are Transitions are allowdallowd between between neighbors:

neighbors:

– P(k) to P(k+1) P(k) to P(k+1)

• birth happen (arrival)birth happen (arrival)

– P(k) to P(kP(k) to P(k--1)1)

• death happen (death)death happen (death) •

• PossionPossion and and ExponetialExponetial Distributions Distributions are

(36)

Μ/Μ/1 0 1 2 3 4 λ λ λ λ µ µ µ µ µ

Number of buffers <-> Number of Customers

(37)

Format

Format

• M / M / 1 / 2M / M / 1 / 2

number of server

Number of buffer size

Amount of service a customer require B(x) = P[service time <=x]

Arrival Time

(38)

Probability

Probability

• • Sum of P(k) = 1Sum of P(k) = 1 • • P(k) <= 1P(k) <= 1 •

• E[N] = Sum of E[N] = Sum of K P(k)K P(k) •

(39)

General

General

Queueing

Queueing

System

System

• C(n) nth customer to enter the systemC(n) nth customer to enter the system •

• N(t) number of customer in the system at N(t) number of customer in the system at time t

time t

• a(n) arrival time for C(n)a(n) arrival time for C(n) •

• t(n) t(n) interarrvalinterarrval time between C(ntime between C(n--1) and C(n)1) and C(n) •

• x(n) service time for C(n)x(n) service time for C(n) •

• w(n) waiting time for C(n)w(n) waiting time for C(n) •

(40)

Time

Time

-

-

diagram notation

diagram notation

Servicer Queue S(n) W(n) C(n) C(n-1) C(n) C(n+1) t(n) C(n)

(41)

Classical M/M/1

Classical M/M/1

Queueing

Queueing

• Single Server QueueSingle Server Queue •

• Poisson Arrival ProcessPoisson Arrival Process •

• Exponential Distribution for service timeExponential Distribution for service time •

(42)

M/M/1 Analysis

M/M/1 Analysis

• StateState--transitiontransition--rate diagramrate diagram

a a

0 1 2 n

(43)

What you should need for

What you should need for

Queueing

Queueing

modeling

modeling

• Probability (such as arrival rate, service Probability (such as arrival rate, service rate)

rate)

• Transform (zTransform (z--transform, transform, LaplaceLaplace transform)

參考文獻

相關文件

The first row shows the eyespot with white inner ring, black middle ring, and yellow outer ring in Bicyclus anynana.. The second row provides the eyespot with black inner ring

Field operators a † ↵, (q) and a ↵, (q) create or destroy a photon or exciton (note that both are bosonic excitations) with in-plane momentum q and polarization (there are

• Atomic, molecular, and optical systems provide powerful platforms to explore topological physics. • Ultracold gases are good for exploring many-particle and

List up all different types of high-sym k (points, lines, planes) 2...

Stress and energy distribution in quark-anti-quark systems using gradient flow.. Ryosuke Yanagihara

CAST: Using neural networks to improve trading systems based on technical analysis by means of the RSI financial indicator. Performance of technical analysis in growth and small

CAST: Using neural networks to improve trading systems based on technical analysis by means of the RSI financial indicator. Performance of technical analysis in growth and small

In this paper, by using Takagi and Sugeno (T-S) fuzzy dynamic model, the H 1 output feedback control design problems for nonlinear stochastic systems with state- dependent noise,