204
SPA — From Individuals to Populations Stochastic Process Algebras — From Individuals to Populations Jane Hillston Laboratory for Foundations of Computer Science University of Edinburgh 24th February 2011

Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Stochastic Process Algebras — From Individualsto Populations

Jane Hillston

Laboratory for Foundations of Computer ScienceUniversity of Edinburgh

24th February 2011

Page 2: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Outline

1 IntroductionStochastic Process Algebra

2 Interpreting SPA for performance modellingIdentity and IndividualityCollective Dynamics

3 Continuous ApproximationNumerical illustration

4 ExampleModelModel Evaluation

5 ConclusionsAlternative interpretations

Page 3: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Outline

1 IntroductionStochastic Process Algebra

2 Interpreting SPA for performance modellingIdentity and IndividualityCollective Dynamics

3 Continuous ApproximationNumerical illustration

4 ExampleModelModel Evaluation

5 ConclusionsAlternative interpretations

Page 4: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Process Algebra

Models consist of agents which engage in actions.

α.P���*

HHHY

action typeor name

agent/component

c

b

a

The structured operational (interleaving) semantics of thelanguage is used to generate a labelled transition system.

Process algebramodel

Labelled transitionsystem

-SOS rules

Page 5: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Process Algebra

Models consist of agents which engage in actions.

α.P���*

HHHY

action typeor name

agent/component

c

b

a

The structured operational (interleaving) semantics of thelanguage is used to generate a labelled transition system.

Process algebramodel

Labelled transitionsystem

-SOS rules

Page 6: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Process Algebra

Models consist of agents which engage in actions.

α.P���*

HHHY

action typeor name

agent/component

c

b

a

The structured operational (interleaving) semantics of thelanguage is used to generate a labelled transition system.

Process algebramodel

Labelled transitionsystem

-SOS rules

Page 7: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Process Algebra

Models consist of agents which engage in actions.

α.P���*

HHHY

action typeor name

agent/component

c

b

a

The structured operational (interleaving) semantics of thelanguage is used to generate a labelled transition system.

Process algebramodel

Labelled transitionsystem

-SOS rules

Page 8: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Process Algebra

Models consist of agents which engage in actions.

α.P���*

HHHY

action typeor name

agent/component

c

b

a

The structured operational (interleaving) semantics of thelanguage is used to generate a labelled transition system.

Process algebramodel

Labelled transitionsystem

-SOS rules

Page 9: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Process Algebra

Models consist of agents which engage in actions.

α.P���*

HHHY

action typeor name

agent/component

c

b

a

The structured operational (interleaving) semantics of thelanguage is used to generate a labelled transition system.

Process algebramodel

Labelled transitionsystem

-SOS rules

Page 10: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Process Algebra

Models consist of agents which engage in actions.

α.P���*

HHHY

action typeor name

agent/component

c

b

a

The structured operational (interleaving) semantics of thelanguage is used to generate a labelled transition system.

Process algebramodel

Labelled transitionsystem

-SOS rules

Page 11: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Process Algebra

Models consist of agents which engage in actions.

α.P���*

HHHY

action typeor name

agent/component

c

b

a

The structured operational (interleaving) semantics of thelanguage is used to generate a labelled transition system.

Process algebramodel

Labelled transitionsystem

-SOS rules

Page 12: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Process Algebra

Models consist of agents which engage in actions.

α.P���*

HHHY

action typeor name

agent/component

c

b

a

The structured operational (interleaving) semantics of thelanguage is used to generate a labelled transition system.

Process algebramodel

Labelled transitionsystem

-SOS rules

Page 13: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Process Algebra

Models consist of agents which engage in actions.

α.P���*

HHHY

action typeor name

agent/component

c

b

a

The structured operational (interleaving) semantics of thelanguage is used to generate a labelled transition system.

Process algebramodel

Labelled transitionsystem

-SOS rules

b

c

a

b

Page 14: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

A simple example: processors and resources

Proc0def= task1.Proc1

Proc1def= task2.Proc0

Res0def= task1.Res1

Res1def= reset.Res0

Proc0 ‖task1 Res0

Proc0 ‖task1 Res0

?task1

Proc1 ‖task1 Res1

���

reset@@@Rtask2

Proc1 ‖task1 Res0��������

task2

Proc0 ‖task1 Res1AAAAAAAK

reset

Page 15: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

A simple example: processors and resources

Proc0def= task1.Proc1

Proc1def= task2.Proc0

Res0def= task1.Res1

Res1def= reset.Res0

Proc0 ‖task1 Res0

Proc0 ‖task1 Res0

?task1

Proc1 ‖task1 Res1

���

reset@@@Rtask2

Proc1 ‖task1 Res0��������

task2

Proc0 ‖task1 Res1AAAAAAAK

reset

Page 16: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Stochastic process algebras

Process algebras where models are decorated with quantitativeinformation used to generate a stochastic process are stochasticprocess algebras (SPA).

This extension was motivated by a desire to bring this formal andcompositional approach to modelling to bear in performanceanalysis supporting the derivation of measures such as throughput,utlisation and response time.

Page 17: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Stochastic process algebras

Process algebras where models are decorated with quantitativeinformation used to generate a stochastic process are stochasticprocess algebras (SPA).

This extension was motivated by a desire to bring this formal andcompositional approach to modelling to bear in performanceanalysis supporting the derivation of measures such as throughput,utlisation and response time.

Page 18: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

SPA Languages

SPA

SPA ����

@@@@@

integrated timeintegrated time

orthogonal timeorthogonal timeorthogonal time

����

@@@@

����

QQQQ

exponential onlyexponential onlyPEPA, Stochastic π-calculusPEPA

exponential + instantaneousexponential + instantaneousexponential + instantaneousEMPA, Markovian TIPP

general distributionsgeneral distributionsgeneral distributionsTIPP, SPADES, GSMPA

exponential onlyexponential onlyexponential onlyIMC

general distributionsgeneral distributionsgeneral distributionsIGSMP, Modest

Page 19: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

SPA Languages

SPA

SPA ����

@@@@@

integrated time

integrated time

orthogonal time

orthogonal timeorthogonal time

����

@@@@

����

QQQQ

exponential onlyexponential onlyPEPA, Stochastic π-calculusPEPA

exponential + instantaneousexponential + instantaneousexponential + instantaneousEMPA, Markovian TIPP

general distributionsgeneral distributionsgeneral distributionsTIPP, SPADES, GSMPA

exponential onlyexponential onlyexponential onlyIMC

general distributionsgeneral distributionsgeneral distributionsIGSMP, Modest

Page 20: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

SPA Languages

SPA

SPA ����

@@@@@

integrated time

integrated time

orthogonal time

orthogonal timeorthogonal time

����

@@@@

����

QQQQ

exponential only

exponential onlyPEPA, Stochastic π-calculusPEPA

exponential + instantaneous

exponential + instantaneousexponential + instantaneousEMPA, Markovian TIPP

general distributions

general distributionsgeneral distributionsTIPP, SPADES, GSMPA

exponential onlyexponential onlyexponential onlyIMC

general distributionsgeneral distributionsgeneral distributionsIGSMP, Modest

Page 21: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

SPA Languages

SPA

SPA ����

@@@@@

integrated time

integrated time

orthogonal time

orthogonal time

orthogonal time

����

@@@@

����

QQQQ

exponential only

exponential onlyPEPA, Stochastic π-calculusPEPA

exponential + instantaneous

exponential + instantaneousexponential + instantaneousEMPA, Markovian TIPP

general distributions

general distributionsgeneral distributionsTIPP, SPADES, GSMPA

exponential only

exponential onlyexponential onlyIMC

general distributions

general distributionsgeneral distributionsIGSMP, Modest

Page 22: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

SPA Languages

SPA

SPA ����

@@@@@

integrated time

integrated time

orthogonal time

orthogonal time

orthogonal time

����

@@@@

����

QQQQ

exponential only

exponential onlyPEPA, Stochastic π-calculus

PEPA

exponential + instantaneous

exponential + instantaneous

exponential + instantaneous

EMPA, Markovian TIPP

general distributions

general distributions

general distributions

TIPP, SPADES, GSMPA

exponential only

exponential only

exponential only

IMC

general distributions

general distributions

general distributions

IGSMP, Modest

Page 23: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

SPA Languages

SPA

SPA ����

@@@@@

integrated time

integrated time

orthogonal timeorthogonal time

orthogonal time

����

@@@@

����

QQQQ

exponential only

exponential only

PEPA, Stochastic π-calculus

PEPA

exponential + instantaneousexponential + instantaneous

exponential + instantaneous

EMPA, Markovian TIPP

general distributionsgeneral distributions

general distributions

TIPP, SPADES, GSMPA

exponential onlyexponential only

exponential only

IMC

general distributionsgeneral distributions

general distributions

IGSMP, Modest

Page 24: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

Models are constructed from components which engage inactivities.

(α, r).P���* 6 HH

HY

action typeor name

activity rate(parameter of an

exponential distribution)

component/derivative

The language is used to generate a Continuous Time MarkovChain (CTMC) for performance modelling.

PEPAMODEL

LABELLEDMULTI-

TRANSITIONSYSTEM

CTMC Q- -SOS rules state transition

diagram

Page 25: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

Models are constructed from components which engage inactivities.

(α, r).P���* 6 HH

HY

action typeor name

activity rate(parameter of an

exponential distribution)

component/derivative

The language is used to generate a Continuous Time MarkovChain (CTMC) for performance modelling.

PEPAMODEL

LABELLEDMULTI-

TRANSITIONSYSTEM

CTMC Q- -SOS rules state transition

diagram

Page 26: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

Models are constructed from components which engage inactivities.

(α, r).P���* 6 HH

HY

action typeor name

activity rate(parameter of an

exponential distribution)

component/derivative

The language is used to generate a Continuous Time MarkovChain (CTMC) for performance modelling.

PEPAMODEL

LABELLEDMULTI-

TRANSITIONSYSTEM

CTMC Q- -SOS rules state transition

diagram

Page 27: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

Models are constructed from components which engage inactivities.

(α, r).P���* 6 HH

HY

action typeor name

activity rate(parameter of an

exponential distribution)

component/derivative

The language is used to generate a Continuous Time MarkovChain (CTMC) for performance modelling.

PEPAMODEL

LABELLEDMULTI-

TRANSITIONSYSTEM

CTMC Q

-

-

SOS rules

state transition

diagram

Page 28: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

Models are constructed from components which engage inactivities.

(α, r).P���* 6 HH

HY

action typeor name

activity rate(parameter of an

exponential distribution)

component/derivative

The language is used to generate a Continuous Time MarkovChain (CTMC) for performance modelling.

PEPAMODEL

LABELLEDMULTI-

TRANSITIONSYSTEM

CTMC Q

-

-

SOS rules

state transition

diagram

Page 29: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

Models are constructed from components which engage inactivities.

(α, r).P���* 6 HH

HY

action typeor name

activity rate(parameter of an

exponential distribution)

component/derivative

The language is used to generate a Continuous Time MarkovChain (CTMC) for performance modelling.

PEPAMODEL

LABELLEDMULTI-

TRANSITIONSYSTEM

CTMC Q

- -SOS rules state transition

diagram

Page 30: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

Models are constructed from components which engage inactivities.

(α, r).P���* 6 HH

HY

action typeor name

activity rate(parameter of an

exponential distribution)

component/derivative

The language is used to generate a Continuous Time MarkovChain (CTMC) for performance modelling.

PEPAMODEL

LABELLEDMULTI-

TRANSITIONSYSTEM

CTMC Q- -SOS rules state transition

diagram

Page 31: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Integrated analysis

Qualitative verification can now be complemented by quantitativeverification.

Reachability analysisModel checking

How long will it takefor the system to arrive

in a particular state?

e ee e e eiee e- - -

?����

���

-

���Does a given property φhold within the system

with a given probability?

For a given starting statehow long is it until

a given property φ holds?φ �

����

���

PPPPPPPP

e ee e e eee e- - -

?����

���

-

���

Page 32: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Integrated analysis

Qualitative verification can now be complemented by quantitativeverification.

Reachability analysis

Model checking

How long will it takefor the system to arrive

in a particular state?

e ee e e eiee e- - -

?����

���

-

���

Does a given property φhold within the system

with a given probability?

For a given starting statehow long is it until

a given property φ holds?φ �

����

���

PPPPPPPP

e ee e e eee e- - -

?����

���

-

���

Page 33: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Integrated analysis

Qualitative verification can now be complemented by quantitativeverification.

Reachability analysis

Model checking

How long will it takefor the system to arrive

in a particular state?

e ee e e eiee e- - -

?����

���

-

���

Does a given property φhold within the system

with a given probability?

For a given starting statehow long is it until

a given property φ holds?

φ ���

�����

PPPPPPPP

e ee e e eee e- - -

?����

���

-

���

Page 34: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Integrated analysis

Qualitative verification can now be complemented by quantitativeverification.

Reachability analysis

Model checking

How long will it takefor the system to arrive

in a particular state?

e ee e e eiee e- - -

?����

���

-

���Does a given property φhold within the system

with a given probability?

For a given starting statehow long is it until

a given property φ holds?φ �

����

���

PPPPPPPP

e ee e e eee e- - -

?����

���

-

���

Page 35: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

PEPA components perform activities either independently or inco-operation with other components.

(α, f ).P PrefixP1 + P2 ChoiceP1 ��

LP2 Co-operation

P/L HidingC Constant

P1 ‖ P2 is a derived form for P1 ��∅ P2.

When working with large numbers of entities, we write P[n] todenote an array of n copies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

Page 36: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

PEPA components perform activities either independently or inco-operation with other components.

(α, f ).P PrefixP1 + P2 ChoiceP1 ��

LP2 Co-operation

P/L HidingC Constant

P1 ‖ P2 is a derived form for P1 ��∅ P2.

When working with large numbers of entities, we write P[n] todenote an array of n copies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

Page 37: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

PEPA components perform activities either independently or inco-operation with other components.

(α, f ).P PrefixP1 + P2 ChoiceP1 ��

LP2 Co-operation

P/L HidingC Constant

P1 ‖ P2 is a derived form for P1 ��∅ P2.

When working with large numbers of entities, we write P[n] todenote an array of n copies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

Page 38: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

PEPA components perform activities either independently or inco-operation with other components.

(α, f ).P PrefixP1 + P2 ChoiceP1 ��

LP2 Co-operation

P/L HidingC Constant

P1 ‖ P2 is a derived form for P1 ��∅ P2.

When working with large numbers of entities, we write P[n] todenote an array of n copies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

Page 39: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

PEPA components perform activities either independently or inco-operation with other components.

(α, f ).P PrefixP1 + P2 ChoiceP1 ��

LP2 Co-operation

P/L HidingC Constant

P1 ‖ P2 is a derived form for P1 ��∅ P2.

When working with large numbers of entities, we write P[n] todenote an array of n copies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

Page 40: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

PEPA components perform activities either independently or inco-operation with other components.

(α, f ).P PrefixP1 + P2 ChoiceP1 ��

LP2 Co-operation

P/L HidingC Constant

P1 ‖ P2 is a derived form for P1 ��∅ P2.

When working with large numbers of entities, we write P[n] todenote an array of n copies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

Page 41: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

PEPA components perform activities either independently or inco-operation with other components.

(α, f ).P PrefixP1 + P2 ChoiceP1 ��

LP2 Co-operation

P/L HidingC Constant

P1 ‖ P2 is a derived form for P1 ��∅ P2.

When working with large numbers of entities, we write P[n] todenote an array of n copies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

Page 42: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

PEPA components perform activities either independently or inco-operation with other components.

(α, f ).P PrefixP1 + P2 ChoiceP1 ��

LP2 Co-operation

P/L HidingC Constant

P1 ‖ P2 is a derived form for P1 ��∅ P2.

When working with large numbers of entities, we write P[n] todenote an array of n copies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

Page 43: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

PEPA components perform activities either independently or inco-operation with other components.

(α, f ).P PrefixP1 + P2 ChoiceP1 ��

LP2 Co-operation

P/L HidingC Constant

P1 ‖ P2 is a derived form for P1 ��∅ P2.

When working with large numbers of entities, we write P[n] todenote an array of n copies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

Page 44: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Performance Evaluation Process Algebra

PEPA components perform activities either independently or inco-operation with other components.

(α, f ).P PrefixP1 + P2 ChoiceP1 ��

LP2 Co-operation

P/L HidingC Constant

P1 ‖ P2 is a derived form for P1 ��∅ P2.

When working with large numbers of entities, we write P[n] todenote an array of n copies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

Page 45: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Rates of interaction: bounded capacity

Stochastic process algebras differ in how they define the rate ofsynchronised actions. In PEPA cooperation between componentsgives rise to shared actions, the rate of which are governed by theassumption of bounded capacity.

Bounded capacity

No component can be made to carry out an action in cooperationfaster than its own defined rate for the action.

Thus shared actions proceed at the minimum of the rates in theparticipating components.

In contrast independent actions do not constrain each other and ifthere are multiple copies of a action enabled in independentconcurrent components their rates are summed.

Page 46: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Rates of interaction: bounded capacity

Stochastic process algebras differ in how they define the rate ofsynchronised actions. In PEPA cooperation between componentsgives rise to shared actions, the rate of which are governed by theassumption of bounded capacity.

Bounded capacity

No component can be made to carry out an action in cooperationfaster than its own defined rate for the action.

Thus shared actions proceed at the minimum of the rates in theparticipating components.

In contrast independent actions do not constrain each other and ifthere are multiple copies of a action enabled in independentconcurrent components their rates are summed.

Page 47: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Rates of interaction: bounded capacity

Stochastic process algebras differ in how they define the rate ofsynchronised actions. In PEPA cooperation between componentsgives rise to shared actions, the rate of which are governed by theassumption of bounded capacity.

Bounded capacity

No component can be made to carry out an action in cooperationfaster than its own defined rate for the action.

Thus shared actions proceed at the minimum of the rates in theparticipating components.

In contrast independent actions do not constrain each other and ifthere are multiple copies of a action enabled in independentconcurrent components their rates are summed.

Page 48: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

Rates of interaction: bounded capacity

Stochastic process algebras differ in how they define the rate ofsynchronised actions. In PEPA cooperation between componentsgives rise to shared actions, the rate of which are governed by theassumption of bounded capacity.

Bounded capacity

No component can be made to carry out an action in cooperationfaster than its own defined rate for the action.

Thus shared actions proceed at the minimum of the rates in theparticipating components.

In contrast independent actions do not constrain each other and ifthere are multiple copies of a action enabled in independentconcurrent components their rates are summed.

Page 49: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

A simple example: processors and resources

Proc0def= (task1, r1).Proc1

Proc1def= (task2, r2).Proc0

Res0def= (task1, r3).Res1

Res1def= (reset, r4).Res0

Proc0 ��{task1}

Res0

Proc0 ��{task1}

Res0

?(task1, R)

Proc1 ��{task1}

Res1

���

(reset, r4)@@@R(task2, r2)

Proc1 ��{task1}

Res0��������(task2, r2)

Proc0 ��{task1}

Res1AAAAAAAK (reset, r4)

R = min(r1, r3)

Q =

−R R 0 0

0 −(r2 + r4) r4 r2r2 0 −r2 0r4 0 0 −r4

Page 50: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

A simple example: processors and resources

Proc0def= (task1, r1).Proc1

Proc1def= (task2, r2).Proc0

Res0def= (task1, r3).Res1

Res1def= (reset, r4).Res0

Proc0 ��{task1}

Res0

Proc0 ��{task1}

Res0

?(task1, R)

Proc1 ��{task1}

Res1

���

(reset, r4)@@@R(task2, r2)

Proc1 ��{task1}

Res0��������(task2, r2)

Proc0 ��{task1}

Res1AAAAAAAK (reset, r4)

R = min(r1, r3)

Q =

−R R 0 0

0 −(r2 + r4) r4 r2r2 0 −r2 0r4 0 0 −r4

Page 51: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

A simple example: processors and resources

Proc0def= (task1, r1).Proc1

Proc1def= (task2, r2).Proc0

Res0def= (task1, r3).Res1

Res1def= (reset, r4).Res0

Proc0 ��{task1}

Res0

Proc0 ��{task1}

Res0

?(task1, R)

Proc1 ��{task1}

Res1

���

(reset, r4)@@@R(task2, r2)

Proc1 ��{task1}

Res0��������(task2, r2)

Proc0 ��{task1}

Res1AAAAAAAK (reset, r4)

R = min(r1, r3)

Q =

−R R 0 0

0 −(r2 + r4) r4 r2r2 0 −r2 0r4 0 0 −r4

Page 52: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Introduction

Stochastic Process Algebra

A simple example: processors and resources

Proc0def= (task1, r1).Proc1

Proc1def= (task2, r2).Proc0

Res0def= (task1, r3).Res1

Res1def= (reset, r4).Res0

Proc0 ��{task1}

Res0

Proc0 ��{task1}

Res0

?(task1, R)

Proc1 ��{task1}

Res1

���

(reset, r4)@@@R(task2, r2)

Proc1 ��{task1}

Res0��������(task2, r2)

Proc0 ��{task1}

Res1AAAAAAAK (reset, r4)

R = min(r1, r3)

Q =

−R R 0 0

0 −(r2 + r4) r4 r2r2 0 −r2 0r4 0 0 −r4

Page 53: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Outline

1 IntroductionStochastic Process Algebra

2 Interpreting SPA for performance modellingIdentity and IndividualityCollective Dynamics

3 Continuous ApproximationNumerical illustration

4 ExampleModelModel Evaluation

5 ConclusionsAlternative interpretations

Page 54: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Solving discrete state models

Under the SOS semantics aSPA model is mapped to aCTMC with global statesdetermined by the local statesof all the participatingcomponents.

c

b

a

c

b

a

c

b

a

Page 55: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Solving discrete state models

Under the SOS semantics aSPA model is mapped to aCTMC with global statesdetermined by the local statesof all the participatingcomponents.

c

b

a

c

b

a

c

b

a

Page 56: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Modelling at the level of individuals

(P0 ‖ P0 ‖ P0 ) ��{task1}

(R0 ‖ R0 )

(P1 ‖ P0 ‖ P0 ) ��{task1}

(R1 ‖ R0 )

(P1 ‖ P0 ‖ P0 ) ��{task1}

(R0 ‖ R1 )

(P0 ‖ P1 ‖ P0 ) ��{task1}

(R1 ‖ R0 )

(P0 ‖ P1 ‖ P0 ) ��{task1}

(R0 ‖ R1 )

(P0 ‖ P0 ‖ P1 ) ��{task1}

(R1 ‖ R0 )

(P0 ‖ P0 ‖ P1 ) ��{task1}

(R0 ‖ R1 )

���������7r

������>

r

������:

r

XXXXXXzrZ

ZZZZZ~

r

SSSSSSSSw

r

r = r13r1

r32r3

min(3r1, 2r3) = 16 min(3r1, 2r3)

Page 57: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Modelling at the level of individuals

(P0 ‖ P0 ‖ P0 ) ��{task1}

(R0 ‖ R0 )

(P1 ‖ P0 ‖ P0 ) ��{task1}

(R1 ‖ R0 )

(P1 ‖ P0 ‖ P0 ) ��{task1}

(R0 ‖ R1 )

(P0 ‖ P1 ‖ P0 ) ��{task1}

(R1 ‖ R0 )

(P0 ‖ P1 ‖ P0 ) ��{task1}

(R0 ‖ R1 )

(P0 ‖ P0 ‖ P1 ) ��{task1}

(R1 ‖ R0 )

(P0 ‖ P0 ‖ P1 ) ��{task1}

(R0 ‖ R1 )

���������7r

������>

r

������:

r

XXXXXXzrZ

ZZZZZ~

r

SSSSSSSSw

r

r = r13r1

r32r3

min(3r1, 2r3) = 16 min(3r1, 2r3)

Page 58: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Solving discrete state models

When the size of the statespace is not too large they areamenable to numerical solution(linear algebra) to determine asteady state or transientprobability distribution.

Q =

q1,1 q1,2 · · · q1,N

q2,1 q2,2 · · · q2,N

......

...qN,1 qN,2 · · · qN,N

π(t) = (π1(t), π2(t), . . . , πN (t))

Page 59: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Solving discrete state models

When the size of the statespace is not too large they areamenable to numerical solution(linear algebra) to determine asteady state or transientprobability distribution.

Q =

q1,1 q1,2 · · · q1,N

q2,1 q2,2 · · · q2,N

......

...qN,1 qN,2 · · · qN,N

π(t) = (π1(t), π2(t), . . . , πN (t))

Page 60: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Solving discrete state models

When the size of the statespace is not too large they areamenable to numerical solution(linear algebra) to determine asteady state or transientprobability distribution.

Q =

q1,1 q1,2 · · · q1,N

q2,1 q2,2 · · · q2,N

......

...qN,1 qN,2 · · · qN,N

π(t) = (π1(t), π2(t), . . . , πN (t))

Page 61: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

State space explosion

As the number of components, or the complexity of behaviourwithin components, grows the state space may become so largethat it is infeasible to solve the underlying CTMC.

Proc0def= (task1, r1).Proc1

Proc1def= (task2, r2).Proc0

Res0def= (task1, r3).Res1

Res1def= (reset, r4).Res0

Proc0[NP ] ��{task1}

Res0[NR ]

Page 62: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

State space explosion

As the number of components, or the complexity of behaviourwithin components, grows the state space may become so largethat it is infeasible to solve the underlying CTMC.

Proc0def= (task1, r1).Proc1

Proc1def= (task2, r2).Proc0

Res0def= (task1, r3).Res1

Res1def= (reset, r4).Res0

Proc0[NP ] ��{task1}

Res0[NR ]

CTMC interpretationProcessors (NP ) Resources (NR ) States (2NP+NR )1 1 42 1 82 2 163 2 323 3 644 3 1284 4 2565 4 5125 5 10246 5 20486 6 40967 6 81927 7 163848 7 327688 8 655369 8 1310729 9 26214410 9 52428810 10 1048576

Page 63: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Achieving aggregration

If we sacrifice looking at the identity of each component wecan often achieve substantial state space reduction byaggregation.

This is supported by a shift in how we view the state of amodel, based on a counting abstraction.

The syntactic nature of PEPA (and other SPAs) makesmodels easily understood by humans, but not so convenientfor computers to directly apply these tools and approaches.

By shifting to a numerical state representation we can morereadily exploit results such as aggregation and access toalternative mathematical interpretations (i.e. fluidapproximation).

Page 64: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Achieving aggregration

If we sacrifice looking at the identity of each component wecan often achieve substantial state space reduction byaggregation.

This is supported by a shift in how we view the state of amodel, based on a counting abstraction.

The syntactic nature of PEPA (and other SPAs) makesmodels easily understood by humans, but not so convenientfor computers to directly apply these tools and approaches.

By shifting to a numerical state representation we can morereadily exploit results such as aggregation and access toalternative mathematical interpretations (i.e. fluidapproximation).

Page 65: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Achieving aggregration

If we sacrifice looking at the identity of each component wecan often achieve substantial state space reduction byaggregation.

This is supported by a shift in how we view the state of amodel, based on a counting abstraction.

The syntactic nature of PEPA (and other SPAs) makesmodels easily understood by humans, but not so convenientfor computers to directly apply these tools and approaches.

By shifting to a numerical state representation we can morereadily exploit results such as aggregation and access toalternative mathematical interpretations (i.e. fluidapproximation).

Page 66: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Achieving aggregration

If we sacrifice looking at the identity of each component wecan often achieve substantial state space reduction byaggregation.

This is supported by a shift in how we view the state of amodel, based on a counting abstraction.

The syntactic nature of PEPA (and other SPAs) makesmodels easily understood by humans, but not so convenientfor computers to directly apply these tools and approaches.

By shifting to a numerical state representation we can morereadily exploit results such as aggregation and access toalternative mathematical interpretations (i.e. fluidapproximation).

Page 67: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Counting abstraction to generate the Lumped CTMC

(P0 ‖ P0 ‖ P0 ) ��{task1}

(R0 ‖ R0 )

(P1 ‖ P0 ‖ P0 ) ��{task1}

R1 ‖ R0 )

(P1 ‖ P0 ‖ P0 ) ��{task1}

(R0 ‖ R1 )

(P0 ‖ P1 ‖ P0 ) ��{task1}

(R1 ‖ R0 )

(P0 ‖ P1 ‖ P0 ) ��{task1}

(R0 ‖ R1 )

(P0 ‖ P0 ‖ P1 ) ��{task1}

(R1 ‖ R0 )

(P0 ‖ P0 ‖ P1 ) ��{task1}

(R0 ‖ R1 )

���������7

������>

������:

XXXXXXzZZZZZZ~

SSSSSSSSw

Page 68: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Counting abstraction to generate the Lumped CTMC

(P0 ‖ P0 ‖ P0 ) ��{task1}

(R0 ‖ R0 )

(P1 ‖ P0 ‖ P0 ) ��{task1}

R1 ‖ R0 )

(P1 ‖ P0 ‖ P0 ) ��{task1}

(R0 ‖ R1 )

(P0 ‖ P1 ‖ P0 ) ��{task1}

(R1 ‖ R0 )

(P0 ‖ P1 ‖ P0 ) ��{task1}

(R0 ‖ R1 )

(P0 ‖ P0 ‖ P1 ) ��{task1}

(R1 ‖ R0 )

(P0 ‖ P0 ‖ P1 ) ��{task1}

(R0 ‖ R1 )

���������7

������>

������:

XXXXXXzZZZZZZ~

SSSSSSSSw

Page 69: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Counting abstraction to generate the Lumped CTMC

(P0 ‖ P0 ‖ P0 ) ��{task1}

(R0 ‖ R0 )

(P1 ‖ P0 ‖ P0 ) ��{task1}

(R1 ‖ R0 )

(P1 ‖ P0 ‖ P0 ) ��{task1}

(R0 ‖ R1 )

(P0 ‖ P1 ‖ P0 ) ��{task1}

(R1 ‖ R0 )

(P0 ‖ P1 ‖ P0 ) ��{task1}

(R0 ‖ R1 )

(P0 ‖ P0 ‖ P1 ) ��{task1}

(R1 ‖ R0 )

(P0 ‖ P0 ‖ P1 ) ��{task1}

(R0 ‖ R1 )

���������7

������>

������:

XXXXXXzZZZZZZ~

SSSSSSSSw

(3, 0, 2, 0) -min(3r1, 2r3)(2, 1, 1, 1)(3, 0, 2, 0) -min(3r1, 2r3)(2, 1, 1, 1)

Page 70: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Using this result in practice

There are well-known algorithms such as Paige and Tarjan forfinding the maximal partition of a graph according to someequivalence.

However in practice we would much rather construct theaggregated state space directly.

The first approach to this used canonical forms but still workedsyntactically to identify states. [Gilmore, Hillston and Ribaudo,IEEE TSE 2001].

A more recent approaches shift to a counting abstraction and anumerical representation of states and transitions.

Page 71: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Using this result in practice

There are well-known algorithms such as Paige and Tarjan forfinding the maximal partition of a graph according to someequivalence.

However in practice we would much rather construct theaggregated state space directly.

The first approach to this used canonical forms but still workedsyntactically to identify states. [Gilmore, Hillston and Ribaudo,IEEE TSE 2001].

A more recent approaches shift to a counting abstraction and anumerical representation of states and transitions.

Page 72: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Using this result in practice

There are well-known algorithms such as Paige and Tarjan forfinding the maximal partition of a graph according to someequivalence.

However in practice we would much rather construct theaggregated state space directly.

The first approach to this used canonical forms but still workedsyntactically to identify states. [Gilmore, Hillston and Ribaudo,IEEE TSE 2001].

A more recent approaches shift to a counting abstraction and anumerical representation of states and transitions.

Page 73: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Using this result in practice

There are well-known algorithms such as Paige and Tarjan forfinding the maximal partition of a graph according to someequivalence.

However in practice we would much rather construct theaggregated state space directly.

The first approach to this used canonical forms but still workedsyntactically to identify states. [Gilmore, Hillston and Ribaudo,IEEE TSE 2001].

A more recent approaches shift to a counting abstraction and anumerical representation of states and transitions.

Page 74: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Solving discrete state models

Even with aggregation modelsmay become too large to solvethe underlying CTMC. As analternative they may bestudied using stochasticsimulation. Each run generatesa single trajectory through thestate space. Many runs areneeded in order to obtainaverage behaviours.

Page 75: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Discrete Event Simulation

The numerical solution of the CTMC is seen as being the exactresult.

Analysing a model via discrete event simulation can also produceuseful results, often with some measure of confidence in theresults. This is achieved by repeatedly taking random walksthrough the state space and observing the results, which can bevery computationally intensive.

Page 76: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Discrete Event Simulation

The numerical solution of the CTMC is seen as being the exactresult.

Analysing a model via discrete event simulation can also produceuseful results, often with some measure of confidence in theresults. This is achieved by repeatedly taking random walksthrough the state space and observing the results, which can bevery computationally intensive.

Page 77: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

100 processors and 80 resources (simulation run A)

Page 78: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

100 processors and 80 resources (simulation run B)

Page 79: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

100 processors and 80 resources (simulation run C)

Page 80: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

100 processors and 80 resources (simulation run D)

Page 81: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

100 processors and 80 resources (average of 10 runs)

Page 82: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Collective dynamics

For some SPA models we can make considerable gains in efficiencywhen solving the model if we take a collective dynamics view ofthe system.

Collective dynamics considers the behaviour of populations ofsimilar entities which can interactive with each other in seeminglysimple ways to produce phenomena at the population level.

In this case we lose the identity of components and evenindividuality, but for many models this is an approximation we arewilling to make for the efficiency, or even tractability, of themodels.

Page 83: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Collective dynamics

For some SPA models we can make considerable gains in efficiencywhen solving the model if we take a collective dynamics view ofthe system.

Collective dynamics considers the behaviour of populations ofsimilar entities which can interactive with each other in seeminglysimple ways to produce phenomena at the population level.

In this case we lose the identity of components and evenindividuality, but for many models this is an approximation we arewilling to make for the efficiency, or even tractability, of themodels.

Page 84: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Identity and Individuality

Collective dynamics

For some SPA models we can make considerable gains in efficiencywhen solving the model if we take a collective dynamics view ofthe system.

Collective dynamics considers the behaviour of populations ofsimilar entities which can interactive with each other in seeminglysimple ways to produce phenomena at the population level.

In this case we lose the identity of components and evenindividuality, but for many models this is an approximation we arewilling to make for the efficiency, or even tractability, of themodels.

Page 85: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Collective BehaviourIn the natural world there are many instances of collectivebehaviour and its consequences:

Page 86: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Collective BehaviourIn the natural world there are many instances of collectivebehaviour and its consequences:

Page 87: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Collective Behaviour

In the natural world there are many instances of collectivebehaviour and its consequences:

Page 88: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Collective Dynamics

This is also true in the man-made and engineered world:

Spread of H1N1 virus in 2009

Page 89: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Collective Dynamics

This is also true in the man-made and engineered world:

Love Parade, Germany 2006

Page 90: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Collective Dynamics

This is also true in the man-made and engineered world:

Self assessment tax returns 31st January each year

Page 91: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Process Algebra and Collective Dynamics

Some large process algebra models can be considered to exhibitcollective dynamics

Each component type captures the behaviour of one type ofindividual;

The compositional structure of the model makes explicitinteraction between component types;

When there are many instances of the individual componenttypes these may be regarded as a population;

Through the interactions of these populations group orcomplex behaviours may emerge at the population level.

Page 92: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Process Algebra and Collective Dynamics

Some large process algebra models can be considered to exhibitcollective dynamics

Each component type captures the behaviour of one type ofindividual;

The compositional structure of the model makes explicitinteraction between component types;

When there are many instances of the individual componenttypes these may be regarded as a population;

Through the interactions of these populations group orcomplex behaviours may emerge at the population level.

Page 93: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Process Algebra and Collective Dynamics

Some large process algebra models can be considered to exhibitcollective dynamics

Each component type captures the behaviour of one type ofindividual;

The compositional structure of the model makes explicitinteraction between component types;

When there are many instances of the individual componenttypes these may be regarded as a population;

Through the interactions of these populations group orcomplex behaviours may emerge at the population level.

Page 94: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Process Algebra and Collective Dynamics

Some large process algebra models can be considered to exhibitcollective dynamics

Each component type captures the behaviour of one type ofindividual;

The compositional structure of the model makes explicitinteraction between component types;

When there are many instances of the individual componenttypes these may be regarded as a population;

Through the interactions of these populations group orcomplex behaviours may emerge at the population level.

Page 95: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Process Algebra and Collective Dynamics

Some large process algebra models can be considered to exhibitcollective dynamics

Each component type captures the behaviour of one type ofindividual;

The compositional structure of the model makes explicitinteraction between component types;

When there are many instances of the individual componenttypes these may be regarded as a population;

Through the interactions of these populations group orcomplex behaviours may emerge at the population level.

Page 96: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Population statistics: emergent behaviour

A shift in perspective allows us to model the interactions betweenindividual components but then only consider the system as awhole as an interaction of populations.

This allows us to model much larger systems than previouslypossible but in making the shift we are no longer able to collectany information about individuals in the system.

To characterise the behaviour of a population we count thenumber of individuals within the population that are exhibitingcertain behaviours rather than tracking individuals directly.

Furthermore we make a continuous approximation of how thecounts vary over time.

Page 97: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Population statistics: emergent behaviour

A shift in perspective allows us to model the interactions betweenindividual components but then only consider the system as awhole as an interaction of populations.

This allows us to model much larger systems than previouslypossible but in making the shift we are no longer able to collectany information about individuals in the system.

To characterise the behaviour of a population we count thenumber of individuals within the population that are exhibitingcertain behaviours rather than tracking individuals directly.

Furthermore we make a continuous approximation of how thecounts vary over time.

Page 98: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Population statistics: emergent behaviour

A shift in perspective allows us to model the interactions betweenindividual components but then only consider the system as awhole as an interaction of populations.

This allows us to model much larger systems than previouslypossible but in making the shift we are no longer able to collectany information about individuals in the system.

To characterise the behaviour of a population we count thenumber of individuals within the population that are exhibitingcertain behaviours rather than tracking individuals directly.

Furthermore we make a continuous approximation of how thecounts vary over time.

Page 99: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Population statistics: emergent behaviour

A shift in perspective allows us to model the interactions betweenindividual components but then only consider the system as awhole as an interaction of populations.

This allows us to model much larger systems than previouslypossible but in making the shift we are no longer able to collectany information about individuals in the system.

To characterise the behaviour of a population we count thenumber of individuals within the population that are exhibitingcertain behaviours rather than tracking individuals directly.

Furthermore we make a continuous approximation of how thecounts vary over time.

Page 100: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Performance as an emergent behaviour

In this framework we must think about the performance of asystem from the collective point of view. Service providers oftenwant to do this in any case. For example making contracts interms of service level agreements.

Example Service Level Agreement

90% of requests receive a response within 3 seconds.

Qualitative Service Level Agreement

Less than 1% of the responses received within 3 seconds will read“System is overloaded, try again later”.

Page 101: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Performance as an emergent behaviour

In this framework we must think about the performance of asystem from the collective point of view. Service providers oftenwant to do this in any case. For example making contracts interms of service level agreements.

Example Service Level Agreement

90% of requests receive a response within 3 seconds.

Qualitative Service Level Agreement

Less than 1% of the responses received within 3 seconds will read“System is overloaded, try again later”.

Page 102: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Interpreting SPA for performance modelling

Collective Dynamics

Performance as an emergent behaviour

In this framework we must think about the performance of asystem from the collective point of view. Service providers oftenwant to do this in any case. For example making contracts interms of service level agreements.

Example Service Level Agreement

90% of requests receive a response within 3 seconds.

Qualitative Service Level Agreement

Less than 1% of the responses received within 3 seconds will read“System is overloaded, try again later”.

Page 103: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Outline

1 IntroductionStochastic Process Algebra

2 Interpreting SPA for performance modellingIdentity and IndividualityCollective Dynamics

3 Continuous ApproximationNumerical illustration

4 ExampleModelModel Evaluation

5 ConclusionsAlternative interpretations

Page 104: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Continuous Approximation

Use continuous state variables to approximate the discrete statespace.

d ddd dd-� � -d dd d-� -� -� -�d d d dd d d d-� -� -� -� -� -� -� -�d d d d d d d dd d d d d d d d-� -� -� -� -� -� -� -� -� -� -� -� -� -� -� -�d d d d d d d d d d d d d d d dd d d d d d d d d d d d d d d dUse ordinary differential equations to represent the evolution ofthose variables over time.

Page 105: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Continuous Approximation

Use continuous state variables to approximate the discrete statespace.

d dd

d dd-� � -d dd d-� -� -� -�d d d dd d d d-� -� -� -� -� -� -� -�d d d d d d d dd d d d d d d d-� -� -� -� -� -� -� -� -� -� -� -� -� -� -� -�d d d d d d d d d d d d d d d dd d d d d d d d d d d d d d d dUse ordinary differential equations to represent the evolution ofthose variables over time.

Page 106: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Continuous Approximation

Use continuous state variables to approximate the discrete statespace.

d dd

d dd

-� � -

d dd d-� -� -� -�d d d dd d d d-� -� -� -� -� -� -� -�d d d d d d d dd d d d d d d d-� -� -� -� -� -� -� -� -� -� -� -� -� -� -� -�d d d d d d d d d d d d d d d dd d d d d d d d d d d d d d d dUse ordinary differential equations to represent the evolution ofthose variables over time.

Page 107: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Continuous Approximation

Use continuous state variables to approximate the discrete statespace.

d dd

d dd-� � -

d d

d d-� -� -� -�d d d dd d d d-� -� -� -� -� -� -� -�d d d d d d d dd d d d d d d d-� -� -� -� -� -� -� -� -� -� -� -� -� -� -� -�d d d d d d d d d d d d d d d dd d d d d d d d d d d d d d d dUse ordinary differential equations to represent the evolution ofthose variables over time.

Page 108: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Continuous Approximation

Use continuous state variables to approximate the discrete statespace.

d dd

d dd-� � -

d d

d d

-� -� -� -�

d d d dd d d d-� -� -� -� -� -� -� -�d d d d d d d dd d d d d d d d-� -� -� -� -� -� -� -� -� -� -� -� -� -� -� -�d d d d d d d d d d d d d d d dd d d d d d d d d d d d d d d dUse ordinary differential equations to represent the evolution ofthose variables over time.

Page 109: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Continuous Approximation

Use continuous state variables to approximate the discrete statespace.

d dd

d dd-� � -

d d

d d-� -� -� -�

d d d d

d d d d-� -� -� -� -� -� -� -�d d d d d d d dd d d d d d d d-� -� -� -� -� -� -� -� -� -� -� -� -� -� -� -�d d d d d d d d d d d d d d d dd d d d d d d d d d d d d d d dUse ordinary differential equations to represent the evolution ofthose variables over time.

Page 110: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Continuous Approximation

Use continuous state variables to approximate the discrete statespace.

d dd

d dd-� � -

d d

d d-� -� -� -�

d d d d

d d d d

-� -� -� -� -� -� -� -�

d d d d d d d dd d d d d d d d-� -� -� -� -� -� -� -� -� -� -� -� -� -� -� -�d d d d d d d d d d d d d d d dd d d d d d d d d d d d d d d dUse ordinary differential equations to represent the evolution ofthose variables over time.

Page 111: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Continuous Approximation

Use continuous state variables to approximate the discrete statespace.

d dd

d dd-� � -

d d

d d-� -� -� -�

d d d d

d d d d-� -� -� -� -� -� -� -�

d d d d d d d d

d d d d d d d d-� -� -� -� -� -� -� -� -� -� -� -� -� -� -� -�d d d d d d d d d d d d d d d dd d d d d d d d d d d d d d d dUse ordinary differential equations to represent the evolution ofthose variables over time.

Page 112: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Continuous Approximation

Use continuous state variables to approximate the discrete statespace.

d dd

d dd-� � -

d d

d d-� -� -� -�

d d d d

d d d d-� -� -� -� -� -� -� -�

d d d d d d d d

d d d d d d d d

-� -� -� -� -� -� -� -� -� -� -� -� -� -� -� -�

d d d d d d d d d d d d d d d dd d d d d d d d d d d d d d d dUse ordinary differential equations to represent the evolution ofthose variables over time.

Page 113: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Continuous Approximation

Use continuous state variables to approximate the discrete statespace.

d dd

d dd-� � -

d d

d d-� -� -� -�

d d d d

d d d d-� -� -� -� -� -� -� -�

d d d d d d d d

d d d d d d d d-� -� -� -� -� -� -� -� -� -� -� -� -� -� -� -�

d d d d d d d d d d d d d d d d

d d d d d d d d d d d d d d d dUse ordinary differential equations to represent the evolution ofthose variables over time.

Page 114: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Continuous Approximation

Use continuous state variables to approximate the discrete statespace.

d dd

d dd

-� � -d d

d d

-� -� -� -�d d d d

d d d d

-� -� -� -� -� -� -� -�d d d d d d d d

d d d d d d d d

-� -� -� -� -� -� -� -� -� -� -� -� -� -� -� -�d d d d d d d d d d d d d d d d

d d d d d d d d d d d d d d d d

Use ordinary differential equations to represent the evolution ofthose variables over time.

Page 115: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Continuous Approximation

Use continuous state variables to approximate the discrete statespace.

d dd

d dd

-� � -d d

d d

-� -� -� -�d d d d

d d d d

-� -� -� -� -� -� -� -�d d d d d d d d

d d d d d d d d

-� -� -� -� -� -� -� -� -� -� -� -� -� -� -� -�d d d d d d d d d d d d d d d d

d d d d d d d d d d d d d d d dUse ordinary differential equations to represent the evolution ofthose variables over time.

Page 116: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

New mathematical structures: differential equations

1 Use a counting abstraction rather than the CTMC completestate space.

2 Assume that these state variables are subject to continuousrather than discrete change.

3 No longer aim to calculate the probability distribution overthe entire state space of the model.

4 Instead the trajectory of the ODEs estimates the expectedbehaviour of the CTMC.

Page 117: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

New mathematical structures: differential equations

1 Use a counting abstraction rather than the CTMC completestate space.

2 Assume that these state variables are subject to continuousrather than discrete change.

3 No longer aim to calculate the probability distribution overthe entire state space of the model.

4 Instead the trajectory of the ODEs estimates the expectedbehaviour of the CTMC.

Page 118: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

New mathematical structures: differential equations

1 Use a counting abstraction rather than the CTMC completestate space.

2 Assume that these state variables are subject to continuousrather than discrete change.

3 No longer aim to calculate the probability distribution overthe entire state space of the model.

4 Instead the trajectory of the ODEs estimates the expectedbehaviour of the CTMC.

Page 119: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

New mathematical structures: differential equations

1 Use a counting abstraction rather than the CTMC completestate space.

2 Assume that these state variables are subject to continuousrather than discrete change.

3 No longer aim to calculate the probability distribution overthe entire state space of the model.

4 Instead the trajectory of the ODEs estimates the expectedbehaviour of the CTMC.

Page 120: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Models suitable for counting abstraction

In the PEPA language multiple instances of components arerepresented explicitly — we write P[n] to denote an array of ncopies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

The impact of an action on a counting variable is

decrease by 1 if the component participates in the actionincrease by 1 if the component is the result of the actionzero if the component is not involved in the action.

Page 121: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Models suitable for counting abstraction

In the PEPA language multiple instances of components arerepresented explicitly — we write P[n] to denote an array of ncopies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

The impact of an action on a counting variable is

decrease by 1 if the component participates in the actionincrease by 1 if the component is the result of the actionzero if the component is not involved in the action.

Page 122: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Models suitable for counting abstraction

In the PEPA language multiple instances of components arerepresented explicitly — we write P[n] to denote an array of ncopies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

The impact of an action on a counting variable is

decrease by 1 if the component participates in the action

increase by 1 if the component is the result of the actionzero if the component is not involved in the action.

Page 123: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Models suitable for counting abstraction

In the PEPA language multiple instances of components arerepresented explicitly — we write P[n] to denote an array of ncopies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

The impact of an action on a counting variable is

decrease by 1 if the component participates in the actionincrease by 1 if the component is the result of the action

zero if the component is not involved in the action.

Page 124: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Models suitable for counting abstraction

In the PEPA language multiple instances of components arerepresented explicitly — we write P[n] to denote an array of ncopies of P executing in parallel.

P[5] ≡ (P ‖ P ‖ P ‖ P ‖ P)

The impact of an action on a counting variable is

decrease by 1 if the component participates in the actionincrease by 1 if the component is the result of the actionzero if the component is not involved in the action.

Page 125: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

Simple example revisited

Proc0def= (task1, r1).Proc1

Proc1def= (task2, r2).Proc0

Res0def= (task1, r3).Res1

Res1def= (reset, r4).Res0

Proc0[NP ] ��{task1}

Res0[NR ]

Page 126: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

Simple example revisited

Proc0def= (task1, r1).Proc1

Proc1def= (task2, r2).Proc0

Res0def= (task1, r3).Res1

Res1def= (reset, r4).Res0

Proc0[NP ] ��{task1}

Res0[NR ]

CTMC interpretationProcessors (NP ) Resources (NR ) States (2NP+NR )1 1 42 1 82 2 163 2 323 3 644 3 1284 4 2565 4 5125 5 10246 5 20486 6 40967 6 81927 7 163848 7 327688 8 655369 8 1310729 9 26214410 9 52428810 10 1048576

Page 127: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

Simple example revisited

Proc0def= (task1, r1).Proc1

Proc1def= (task2, r2).Proc0

Res0def= (task1, r3).Res1

Res1def= (reset, r4).Res0

Proc0[NP ] ��{task1}

Res0[NR ]

task1 decreases Proc0 and Res0

task1 increases Proc1 and Res1

task2 decreases Proc1

task2 increases Proc0

reset decreases Res1

reset increases Res0

Page 128: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

Simple example revisited

Proc0def= (task1, r1).Proc1

Proc1def= (task2, r2).Proc0

Res0def= (task1, r3).Res1

Res1def= (reset, r4).Res0

Proc0[NP ] ��{task1}

Res0[NR ]

dx1dt = −min(r1 x1, r3 x3) + r2 x2

x1 = no. of Proc1

task1 decreases Proc0

task1 is performed by Proc0

and Res0

task2 increases Proc0

task2 is performed by Proc1

Page 129: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

Simple example revisited

Proc0def= (task1, r1).Proc1

Proc1def= (task2, r2).Proc0

Res0def= (task1, r3).Res1

Res1def= (reset, r4).Res0

Proc0[NP ] ��{task1}

Res0[NR ]

ODE interpretationdx1dt = −min(r1 x1, r3 x3) + r2 x2

x1 = no. of Proc1dx2dt = min(r1 x1, r3 x3)− r2 x2

x2 = no. of Proc2dx3dt = −min(r1 x1, r3 x3) + r4 x4

x3 = no. of Res0dx4dt = min(r1 x1, r3 x3)− r4 x4

x4 = no. of Res1

Page 130: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

100 processors and 80 resources (simulation run A)

Page 131: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

100 processors and 80 resources (simulation run B)

Page 132: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

100 processors and 80 resources (simulation run C)

Page 133: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

100 processors and 80 resources (simulation run D)

Page 134: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

100 processors and 80 resources (average of 10 runs)

Page 135: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

100 Processors and 80 resources (average of 100 runs)

Page 136: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

100 processors and 80 resources (average of 1000 runs)

Page 137: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Continuous Approximation

Numerical illustration

100 processors and 80 resources (ODE solution)

Page 138: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Outline

1 IntroductionStochastic Process Algebra

2 Interpreting SPA for performance modellingIdentity and IndividualityCollective Dynamics

3 Continuous ApproximationNumerical illustration

4 ExampleModelModel Evaluation

5 ConclusionsAlternative interpretations

Page 139: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Case study: A Virtual University

Page 140: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Location, Time, and Size

Page 141: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Case study: e-University Course Selection

The e-University was one of the case studies considered in therecently completed SENSORIA project, an EU project focussed onservice-oriented computing.

In the Course Selection scenario students obtain information aboutthe courses available at their education establishment and mayenrol in those for which specific requirements are satisfied.

The model will not consider other services which may be deployedin an actual application (e.g. authentication services) because theirimpact on performance is assumed to be negligible.

We assume a constant population of students e.g. the applicationis only accessible after the university’s matriculation process iscomplete.

Page 142: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Case study: e-University Course Selection

The e-University was one of the case studies considered in therecently completed SENSORIA project, an EU project focussed onservice-oriented computing.

In the Course Selection scenario students obtain information aboutthe courses available at their education establishment and mayenrol in those for which specific requirements are satisfied.

The model will not consider other services which may be deployedin an actual application (e.g. authentication services) because theirimpact on performance is assumed to be negligible.

We assume a constant population of students e.g. the applicationis only accessible after the university’s matriculation process iscomplete.

Page 143: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Case study: e-University Course Selection

The e-University was one of the case studies considered in therecently completed SENSORIA project, an EU project focussed onservice-oriented computing.

In the Course Selection scenario students obtain information aboutthe courses available at their education establishment and mayenrol in those for which specific requirements are satisfied.

The model will not consider other services which may be deployedin an actual application (e.g. authentication services) because theirimpact on performance is assumed to be negligible.

We assume a constant population of students e.g. the applicationis only accessible after the university’s matriculation process iscomplete.

Page 144: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Case study: e-University Course Selection

The e-University was one of the case studies considered in therecently completed SENSORIA project, an EU project focussed onservice-oriented computing.

In the Course Selection scenario students obtain information aboutthe courses available at their education establishment and mayenrol in those for which specific requirements are satisfied.

The model will not consider other services which may be deployedin an actual application (e.g. authentication services) because theirimpact on performance is assumed to be negligible.

We assume a constant population of students e.g. the applicationis only accessible after the university’s matriculation process iscomplete.

Page 145: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: services

Access to the system is through the University Portal. There arefour services in this model:

Course Browsing allows the user to navigate through theUniversity’s course offerings;

Course Selection allows the user to submit a tentative course planwhich will be validated against the University’srequirements and the student’s curriculum;

Student Confirmation will enforce the student to check relevantpersonal details;

Course Registration will confirm the student’s selection.

These components make use of a Database service, which in turnmaintains an event log through a Logger service.

Page 146: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: services

Access to the system is through the University Portal. There arefour services in this model:

Course Browsing allows the user to navigate through theUniversity’s course offerings;

Course Selection allows the user to submit a tentative course planwhich will be validated against the University’srequirements and the student’s curriculum;

Student Confirmation will enforce the student to check relevantpersonal details;

Course Registration will confirm the student’s selection.

These components make use of a Database service, which in turnmaintains an event log through a Logger service.

Page 147: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: deployment diagram

Solid lines show request/response pairings whilst dashed lines showdeployment on processors.

Page 148: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: multi-threading

The University Portal instantiates a pool of threads.

Each thread deals with one request from one student for oneof the services offered.

During processing the thread is locked in the sense that itcannot be acquired by further incoming requests.

When the request is fulfilled the thread clears its state andbecomes available again.

Analogous multi-threaded behaviour will be given to Database andLogger.

If all threads are busy requests are queued. There will also becontention with many threads running on the same processor.

Page 149: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: multi-threading

The University Portal instantiates a pool of threads.

Each thread deals with one request from one student for oneof the services offered.

During processing the thread is locked in the sense that itcannot be acquired by further incoming requests.

When the request is fulfilled the thread clears its state andbecomes available again.

Analogous multi-threaded behaviour will be given to Database andLogger.

If all threads are busy requests are queued. There will also becontention with many threads running on the same processor.

Page 150: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: multi-threading

The University Portal instantiates a pool of threads.

Each thread deals with one request from one student for oneof the services offered.

During processing the thread is locked in the sense that itcannot be acquired by further incoming requests.

When the request is fulfilled the thread clears its state andbecomes available again.

Analogous multi-threaded behaviour will be given to Database andLogger.

If all threads are busy requests are queued. There will also becontention with many threads running on the same processor.

Page 151: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: modelling processors and services

Processor1def= (acq, racq).Processor2

Processor2def= (type1 , r1 ).Processor1

+ (type2 , r2 ).Processor1

+ . . .+ (typen, rn).Processor1

Adef= (reqA,B , rreqA).(replyA,B , rrepA).A′

Bdef= (reqA,B , rreqB).(execute, r).(replyA,B , rrepB).B ′

The communication between A and B will be expressed by meansof the cooperation operator A ��

LB, L = {reqA,B , replyA,B}.

Page 152: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: modelling processors and services

Processor1def= (acq, racq).Processor2

Processor2def= (type1 , r1 ).Processor1

+ (type2 , r2 ).Processor1

+ . . .+ (typen, rn).Processor1

Adef= (reqA,B , rreqA).(replyA,B , rrepA).A′

Bdef= (reqA,B , rreqB).(execute, r).(replyA,B , rrepB).B ′

The communication between A and B will be expressed by meansof the cooperation operator A ��

LB, L = {reqA,B , replyA,B}.

Page 153: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: modelling processors and services

Processor1def= (acq, racq).Processor2

Processor2def= (type1 , r1 ).Processor1

+ (type2 , r2 ).Processor1

+ . . .+ (typen, rn).Processor1

Adef= (reqA,B , rreqA).(replyA,B , rrepA).A′

Bdef= (reqA,B , rreqB).(execute, r).(replyA,B , rrepB).B ′

The communication between A and B will be expressed by meansof the cooperation operator A ��

LB, L = {reqA,B , replyA,B}.

Page 154: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: University Portal

A single thread of execution for the application layer UniversityPortal is implemented as a sequential component which initiallyaccepts requests for any of the services provided:

Portaldef= (reqstudent,browse , ν).Browse+ (reqstudent,select , ν).Select+ (reqstudent,confirm, ν).Confirm+ (reqstudent,register , ν).Register

The rate ν is used throughout this model in all the request/replyactivities.

Page 155: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: Course Browsing (example service)

The action type acqps is used to obtain exclusive access toprocessor PS .

Browsedef= (acqps , ν).Cache

Cachedef= (cache, 0.95rcache).Internal

+ (cache, 0.05rcache).External

Internaldef= (acqps , ν).(internal , rint).BrowseRep

Externaldef= (reqexternal ,read , ν).(replyexternal ,read , ν).

(acqps , ν).(external , rext).BrowseRep

BrowseRepdef= (replystudent,browse , ν).Portal

The other services, Course Selection, Student Confirmation andCourse Registration are modelled analogously.

Page 156: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: Course Browsing (example service)

The action type acqps is used to obtain exclusive access toprocessor PS .

Browsedef= (acqps , ν).Cache

Cachedef= (cache, 0.95rcache).Internal

+ (cache, 0.05rcache).External

Internaldef= (acqps , ν).(internal , rint).BrowseRep

Externaldef= (reqexternal ,read , ν).(replyexternal ,read , ν).

(acqps , ν).(external , rext).BrowseRep

BrowseRepdef= (replystudent,browse , ν).Portal

The other services, Course Selection, Student Confirmation andCourse Registration are modelled analogously.

Page 157: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: the database

The Database offers two functions: reading and writing.

Databasedef= (reqexternal ,read , ν).Read+ (reqregister ,write , ν).Write

Readdef= (acqpd , ν).(read , rread ).ReadReply

ReadReplydef= (replyexternal ,read , ν).Database

Writedef= (acqpd , ν).(write, rwrite).LogWrite

LogWritedef= (reqdatabase,log , ν).

(replydatabase,log , ν).WriteReply

WriteReplydef= (replyregister ,write , ν).Database

Reading is a purely local computation.Writing additionally uses the Logger service.

Page 158: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: the database

The Database offers two functions: reading and writing.

Databasedef= (reqexternal ,read , ν).Read+ (reqregister ,write , ν).Write

Readdef= (acqpd , ν).(read , rread ).ReadReply

ReadReplydef= (replyexternal ,read , ν).Database

Writedef= (acqpd , ν).(write, rwrite).LogWrite

LogWritedef= (reqdatabase,log , ν).

(replydatabase,log , ν).WriteReply

WriteReplydef= (replyregister ,write , ν).Database

Reading is a purely local computation.Writing additionally uses the Logger service.

Page 159: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: the database

The Database offers two functions: reading and writing.

Databasedef= (reqexternal ,read , ν).Read+ (reqregister ,write , ν).Write

Readdef= (acqpd , ν).(read , rread ).ReadReply

ReadReplydef= (replyexternal ,read , ν).Database

Writedef= (acqpd , ν).(write, rwrite).LogWrite

LogWritedef= (reqdatabase,log , ν).

(replydatabase,log , ν).WriteReply

WriteReplydef= (replyregister ,write , ν).Database

Reading is a purely local computation.Writing additionally uses the Logger service.

Page 160: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: the Logger

The Logger service accepts requests from Student Confirmationand Database respectively. It is deployed on the same processor asDatabase, (processor PD) so one thread execution may bemodelled as:

Loggerdef= (reqconfirm,log , ν).LogConfirm+ (reqdatabase,log , ν).LogDatabase

LogConfirmdef= (acqpd , ν).

(logconf , rlgc).ReplyConfirm

ReplyConfirmdef= (replyconfirm,log , ν).Logger

LogDatabasedef= (acqpd , ν).

(logdb, rlgd ).ReplyDatabase

ReplyDatabasedef= (replydatabase,log , ν).Logger

Page 161: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: The processor PD

PD1def= (acqpd , ν).PD2

PD2def= (read , rread ).PD1 + (write, rwrite).PD1

+ (logconf , rlgc).PD1 + (logdb, rlgd ).PD1

Page 162: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: Student Workload

A student is modelled as a sequential component which interactswith the university portal and accesses all of the services available.The behaviour is cyclic and the student interposes some think timebetween successive requests.

StdThinkdef= (think, rthink ).StdBrowse

StdBrowsedef= (reqstudent,browse , ν).(replystudent,browse , ν).StdSelect

StdSelectdef= (reqstudent,select , ν).(replystudent,select , ν).StdConfirm

StdConfirmdef= (reqstudent,confirm, ν).(replystudent,confirm, ν).StdRegister

StdRegisterdef= (reqstudent,register , ν).(replystudent,register , ν).StdThink

Page 163: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: Student Workload

A student is modelled as a sequential component which interactswith the university portal and accesses all of the services available.The behaviour is cyclic and the student interposes some think timebetween successive requests.

StdThinkdef= (think, rthink ).StdBrowse

StdBrowsedef= (reqstudent,browse , ν).(replystudent,browse , ν).StdSelect

StdSelectdef= (reqstudent,select , ν).(replystudent,select , ν).StdConfirm

StdConfirmdef= (reqstudent,confirm, ν).(replystudent,confirm, ν).StdRegister

StdRegisterdef= (reqstudent,register , ν).(replystudent,register , ν).StdThink

Page 164: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model

The model: System Equation

The system equation captures the multiplicity of threads andprocessors.

StdThink[NS ] ��∗

((Portal [NP ] ��

M1ValUni [NP ] ��

M1ValCur [NP ]

)��M2

Database[ND ] ��M3

Logger [NL])��∗

(PS1 [NPS ] ��

∅PD1 [NPD ]

)where

M1 = {fork , join}M2 = {reqexternal ,read , replyexternal ,read , reqregister ,write , replyregister ,write}M3 = {reqconfirm,log , replyconfirm,log , reqdatabase,log , replydatabase,log}

The separate validating threads ValUni and ValCur inherit themultiplicity levels of the thread Portal which spawns them.

Page 165: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Qualitative Analysis

The state space size for this model grows very rapidly — forexample, adding one portal thread can result in an increase in statespace size by a factor of ten.

NS NP ND NL NPS NPD Size

1 any any any 1 any 481 any any any ≥ 2 any 492 1 1 1 1 1 2303 1 1 1 1 1 6803 2 2 2 2 2 5540

10 2 2 2 2 2 51211610 3 2 2 2 2 5075026

Page 166: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Qualitative Analysis

The state space size for this model grows very rapidly — forexample, adding one portal thread can result in an increase in statespace size by a factor of ten.

Analysis based on the explicit representation of the state space isnevertheless a valuable tool for validating the correctness of themodel.

When there is only one student the state space is fairly smallregardless of the multiplicity levels of threads and processorsbecause at most only one of them will be used.

Another form of qualitative analysis can be based on visualinspection of the reachability graph, which can be walked throughto generate possible trajectories of the system.

Page 167: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Qualitative Analysis

The state space size for this model grows very rapidly — forexample, adding one portal thread can result in an increase in statespace size by a factor of ten.

Analysis based on the explicit representation of the state space isnevertheless a valuable tool for validating the correctness of themodel.

When there is only one student the state space is fairly smallregardless of the multiplicity levels of threads and processorsbecause at most only one of them will be used.

Another form of qualitative analysis can be based on visualinspection of the reachability graph, which can be walked throughto generate possible trajectories of the system.

Page 168: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Qualitative Analysis

The state space size for this model grows very rapidly — forexample, adding one portal thread can result in an increase in statespace size by a factor of ten.

Analysis based on the explicit representation of the state space isnevertheless a valuable tool for validating the correctness of themodel.

When there is only one student the state space is fairly smallregardless of the multiplicity levels of threads and processorsbecause at most only one of them will be used.

Another form of qualitative analysis can be based on visualinspection of the reachability graph, which can be walked throughto generate possible trajectories of the system.

Page 169: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Model Verification

We may verify that the model respects policies of exclusive accessto threads and processors by direct inspection of the state space.

Student Portal Portal PSAction type cache

(replystudent,browse , ν).StdSelect Cache Portal PS2(replystudent,browse , ν).StdSelect Portal Cache PS2

Action type prepare(replystudent,select , ν).StdConfirm Portal (prepare, rprep).ForkPrepare PS2(replystudent,select , ν).StdConfirm (prepare, rprep).ForkPrepare Portal PS2

Action type confirm(replystudent,confirm, ν).StdRegister Portal (confirm, rcon).LogStudent PS2(replystudent,confirm, ν).StdRegister (confirm, rcon).LogStudent Portal PS2

Action type register(replystudent,register , ν).StdThink (register , rreg ).Store Portal PS2(replystudent,register , ν).StdThink Portal (register , rreg ).Store PS2

This fragment of the state space when there are two threads forthe portal and one instance of all other components.

A necessary condition for correctness is that if one thread isengaged in an activity the other is idle.

Page 170: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Model Verification

We may verify that the model respects policies of exclusive accessto threads and processors by direct inspection of the state space.

Student Portal Portal PSAction type cache

(replystudent,browse , ν).StdSelect Cache Portal PS2(replystudent,browse , ν).StdSelect Portal Cache PS2

Action type prepare(replystudent,select , ν).StdConfirm Portal (prepare, rprep).ForkPrepare PS2(replystudent,select , ν).StdConfirm (prepare, rprep).ForkPrepare Portal PS2

Action type confirm(replystudent,confirm, ν).StdRegister Portal (confirm, rcon).LogStudent PS2(replystudent,confirm, ν).StdRegister (confirm, rcon).LogStudent Portal PS2

Action type register(replystudent,register , ν).StdThink (register , rreg ).Store Portal PS2(replystudent,register , ν).StdThink Portal (register , rreg ).Store PS2

This fragment of the state space when there are two threads forthe portal and one instance of all other components.

A necessary condition for correctness is that if one thread isengaged in an activity the other is idle.

Page 171: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Model Verification

In general we do not wish to conduct such verification by hand butit may be readily undertaken using automatic tools such as theprobabilistic model checker, PRISM.

Indeed PRISM supports PEPA as one of its input languages.

Page 172: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Model Verification

In general we do not wish to conduct such verification by hand butit may be readily undertaken using automatic tools such as theprobabilistic model checker, PRISM.

Indeed PRISM supports PEPA as one of its input languages.

Page 173: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Markovian Analysis: Performance Bounds

Since exact Markovian analysis relies on an explicit enumeration ofthe state space it is limited to relatively small-scale systems.

But performance analysis of even these small scale systems canoffer valuable insight into the behaviour of the system — for thee-University system it may be used to derive performance boundestimates.

If we consider the system with only one student, the performancein terms of response time perceived by the user will be optimalbecause there is no contention for resources — the response timefor larger populations of students can only get worse.

Page 174: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Markovian Analysis: Performance Bounds

Since exact Markovian analysis relies on an explicit enumeration ofthe state space it is limited to relatively small-scale systems.

But performance analysis of even these small scale systems canoffer valuable insight into the behaviour of the system — for thee-University system it may be used to derive performance boundestimates.

If we consider the system with only one student, the performancein terms of response time perceived by the user will be optimalbecause there is no contention for resources — the response timefor larger populations of students can only get worse.

Page 175: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Markovian Analysis: Performance Bounds

Since exact Markovian analysis relies on an explicit enumeration ofthe state space it is limited to relatively small-scale systems.

But performance analysis of even these small scale systems canoffer valuable insight into the behaviour of the system — for thee-University system it may be used to derive performance boundestimates.

If we consider the system with only one student, the performancein terms of response time perceived by the user will be optimalbecause there is no contention for resources — the response timefor larger populations of students can only get worse.

Page 176: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Average response times

With only one student the state space is kept manageable andbounds can be computed quickly and accurately.

System ConfigurationNP ND NL NPD NPS NS =1 NS =2 NS =3 NS = 4

1 1 1 1 1 3.195 3.694 4.390 5.3571 1 1 1 2 3.064 3.522 4.155 5.0323 3 3 3 3 3.064 3.065 3.066 3.074

Page 177: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Calculating average response time

Page 178: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Scalability and Optimisation

To study the system under realistically sized user workloads manymore instances of the components need to be considered.

This gives rise to a model whose state space would far exceed thesize that can be handled via explicit state space techniques such asMarkovian analysis.

Fortunately, as multiple instances of components are involved wecan consider this as a system exhibiting collective behaviour andresort to fluid approximation.

The model gives rise to a set of 63 coupled ODEs which can besolved, for example using a fifth-order Runge-Kutta numericalintegrator.

Of course an alternative would be to use stochastic simulation.

Page 179: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Scalability and Optimisation

To study the system under realistically sized user workloads manymore instances of the components need to be considered.

This gives rise to a model whose state space would far exceed thesize that can be handled via explicit state space techniques such asMarkovian analysis.

Fortunately, as multiple instances of components are involved wecan consider this as a system exhibiting collective behaviour andresort to fluid approximation.

The model gives rise to a set of 63 coupled ODEs which can besolved, for example using a fifth-order Runge-Kutta numericalintegrator.

Of course an alternative would be to use stochastic simulation.

Page 180: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Scalability and Optimisation

To study the system under realistically sized user workloads manymore instances of the components need to be considered.

This gives rise to a model whose state space would far exceed thesize that can be handled via explicit state space techniques such asMarkovian analysis.

Fortunately, as multiple instances of components are involved wecan consider this as a system exhibiting collective behaviour andresort to fluid approximation.

The model gives rise to a set of 63 coupled ODEs which can besolved, for example using a fifth-order Runge-Kutta numericalintegrator.

Of course an alternative would be to use stochastic simulation.

Page 181: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Scalability and Optimisation

To study the system under realistically sized user workloads manymore instances of the components need to be considered.

This gives rise to a model whose state space would far exceed thesize that can be handled via explicit state space techniques such asMarkovian analysis.

Fortunately, as multiple instances of components are involved wecan consider this as a system exhibiting collective behaviour andresort to fluid approximation.

The model gives rise to a set of 63 coupled ODEs which can besolved, for example using a fifth-order Runge-Kutta numericalintegrator.

Of course an alternative would be to use stochastic simulation.

Page 182: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Scalability and Optimisation

To study the system under realistically sized user workloads manymore instances of the components need to be considered.

This gives rise to a model whose state space would far exceed thesize that can be handled via explicit state space techniques such asMarkovian analysis.

Fortunately, as multiple instances of components are involved wecan consider this as a system exhibiting collective behaviour andresort to fluid approximation.

The model gives rise to a set of 63 coupled ODEs which can besolved, for example using a fifth-order Runge-Kutta numericalintegrator.

Of course an alternative would be to use stochastic simulation.

Page 183: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Scalability analysis

NP = ND = NL = 80,NPD = 40,NPS = 40.

NS ODE Runtime CTMC Runtime Error

1 2.975 2.7 s 3.091 436 s 3.74%300 2.975 2.7 s 3.105 2656 s 4.17%325 2.975 2.6 s 3.329 3017 s 10.62%350 3.686 2.9 s 3.863 6505 s 4.57%400 5.999 7.3 s 5.993 4465 s 0.10%500 10.623 6.6 s 10.534 3845 s 0.84%600 15.248 6.6 s 15.233 2985 s 0.10%

Stochastic simulation was conducted using the method of batchmeans, terminated when the 95% confidence interval was ≤ 1% ofthe average.

Page 184: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Optimisation

In addition to the workload parameter NS there are 20 otherparameters in the model: 15 rate parameters and 5 concurrencylevels for threads and processors.

A typical scenario may be that the rate parameters arehardware-dependent and cannot be revised, and the workload isfixed, determined by the student population.

The modeller’s role is then to determine an optimal configurationfor the concurrency levels of the system with respect touser-perceived performance, e.g. average response time.

Let us assume a workload population of 350 students and assumethat the response time previously found for this workload isacceptable.

Page 185: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Optimisation

In addition to the workload parameter NS there are 20 otherparameters in the model: 15 rate parameters and 5 concurrencylevels for threads and processors.

A typical scenario may be that the rate parameters arehardware-dependent and cannot be revised, and the workload isfixed, determined by the student population.

The modeller’s role is then to determine an optimal configurationfor the concurrency levels of the system with respect touser-perceived performance, e.g. average response time.

Let us assume a workload population of 350 students and assumethat the response time previously found for this workload isacceptable.

Page 186: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Optimisation

In addition to the workload parameter NS there are 20 otherparameters in the model: 15 rate parameters and 5 concurrencylevels for threads and processors.

A typical scenario may be that the rate parameters arehardware-dependent and cannot be revised, and the workload isfixed, determined by the student population.

The modeller’s role is then to determine an optimal configurationfor the concurrency levels of the system with respect touser-perceived performance, e.g. average response time.

Let us assume a workload population of 350 students and assumethat the response time previously found for this workload isacceptable.

Page 187: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Optimisation

In addition to the workload parameter NS there are 20 otherparameters in the model: 15 rate parameters and 5 concurrencylevels for threads and processors.

A typical scenario may be that the rate parameters arehardware-dependent and cannot be revised, and the workload isfixed, determined by the student population.

The modeller’s role is then to determine an optimal configurationfor the concurrency levels of the system with respect touser-perceived performance, e.g. average response time.

Let us assume a workload population of 350 students and assumethat the response time previously found for this workload isacceptable.

Page 188: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Optimisation

The table shows the response times calculated with differentsystem configurations of similar size.

Conf. NP ND NL NPS NPD Response time

A 80 80 80 40 40 3.686B 70 70 70 40 40 3.686C 60 60 60 40 40 4.506D 70 70 70 35 35 5.998E 70 50 50 40 40 3.686F 70 20 20 40 40 3.686G 70 20 15 40 40 4.278H 70 15 20 40 40 5.024

Page 189: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Optimisation

The table shows the response times calculated with differentsystem configurations of similar size.

Conf. NP ND NL NPS NPD Response time

A 80 80 80 40 40 3.686B 70 70 70 40 40 3.686C 60 60 60 40 40 4.506D 70 70 70 35 35 5.998E 70 50 50 40 40 3.686F 70 20 20 40 40 3.686G 70 20 15 40 40 4.278H 70 15 20 40 40 5.024

Page 190: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Example

Model Evaluation

Optimisation

The table shows the response times calculated with differentsystem configurations of similar size.

Conf. NP ND NL NPS NPD Response time

A 80 80 80 40 40 3.686B 70 70 70 40 40 3.686C 60 60 60 40 40 4.506D 70 70 70 35 35 5.998E 70 50 50 40 40 3.686F 70 20 20 40 40 3.686G 70 20 15 40 40 4.278H 70 15 20 40 40 5.024

Page 191: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Outline

1 IntroductionStochastic Process Algebra

2 Interpreting SPA for performance modellingIdentity and IndividualityCollective Dynamics

3 Continuous ApproximationNumerical illustration

4 ExampleModelModel Evaluation

5 ConclusionsAlternative interpretations

Page 192: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Scalable Representations

Continuousapproximationof CTMC

set of ODEsfluid abstraction

AggregatedCTMC

reducedgenerator matrixcounting abstraction

Explicit stateCTMC

fullgenerator matrixindividual view

PEPA model -����

���

���

���

��*

HHHH

HHHHHH

HHHHHj

Page 193: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Scalable Representations

Continuousapproximationof CTMC

set of ODEs

fluid abstraction

AggregatedCTMC

reducedgenerator matrix

counting abstraction

Explicit stateCTMC

fullgenerator matrix

individual view

PEPA model -����

���

���

���

��*

HHHH

HHHHHH

HHHHHj

Page 194: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Scalable Representations

Continuousapproximationof CTMC

set of ODEs

fluid abstraction

AggregatedCTMC

reducedgenerator matrix

counting abstraction

Explicit stateCTMC

fullgenerator matrix

individual view

PEPA model -����

���

���

���

��*

HHHH

HHHHHH

HHHHHj

Page 195: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Eclipse Plug-in for PEPA

Robust tool support is essential to make develop techniquespractical.

Page 196: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Other applications

PEPA, and the associated analysis techniques, were originallydeveloped with the objective of studying computer systems.

However, it has also be adopted by modelling a wide-range ofother types of system:

Locks and movable bridges in inland shipping in Belgium(Knapen, Hasselt)

Automotive on-board diagnostics expert systems (Console,Picardi and Ribaudo)

Biological cell signalling pathways (Calder, Duguid, Gilmoreand Hillston)

Crowd dynamics in informatic environments (Harrison, Latellaand Massink)

Page 197: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Conclusions

Many interesting and important systems can be regarded asexamples of collective dynamics and emergent behaviour.

Process algebras, such as PEPA, are well-suited to modellingthe behaviour of such systems in terms of the individuals andtheir interactions.

Continuous approximation allows a rigorous mathematicalanalysis of the average behaviour of such systems.

This alternative view of systems has opened up many andexciting new research directions.

Page 198: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Conclusions

Many interesting and important systems can be regarded asexamples of collective dynamics and emergent behaviour.

Process algebras, such as PEPA, are well-suited to modellingthe behaviour of such systems in terms of the individuals andtheir interactions.

Continuous approximation allows a rigorous mathematicalanalysis of the average behaviour of such systems.

This alternative view of systems has opened up many andexciting new research directions.

Page 199: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Conclusions

Many interesting and important systems can be regarded asexamples of collective dynamics and emergent behaviour.

Process algebras, such as PEPA, are well-suited to modellingthe behaviour of such systems in terms of the individuals andtheir interactions.

Continuous approximation allows a rigorous mathematicalanalysis of the average behaviour of such systems.

This alternative view of systems has opened up many andexciting new research directions.

Page 200: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Conclusions

Many interesting and important systems can be regarded asexamples of collective dynamics and emergent behaviour.

Process algebras, such as PEPA, are well-suited to modellingthe behaviour of such systems in terms of the individuals andtheir interactions.

Continuous approximation allows a rigorous mathematicalanalysis of the average behaviour of such systems.

This alternative view of systems has opened up many andexciting new research directions.

Page 201: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Thanks!

Acknowledgements: collaboratorsThanks to many co-authors and collaborators: Jeremy Bradley,Luca Bortolussi, Allan Clark, Graham Clark, Adam Duguid, VashtiGalpin, Nil Gesweiller, Stephen Gilmore, Marco Stenico, NigelThomas, Mirco Tribastone, and others.

Acknowledgements: fundingThe PEPA project has received funding from the EPRSC,BBSRC, the Royal Society and the CEC IST-FET programme.

More information:http://www.dcs.ed.ac.uk/pepa

Page 202: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Thanks!

Acknowledgements: collaboratorsThanks to many co-authors and collaborators: Jeremy Bradley,Luca Bortolussi, Allan Clark, Graham Clark, Adam Duguid, VashtiGalpin, Nil Gesweiller, Stephen Gilmore, Marco Stenico, NigelThomas, Mirco Tribastone, and others.

Acknowledgements: fundingThe PEPA project has received funding from the EPRSC,BBSRC, the Royal Society and the CEC IST-FET programme.

More information:http://www.dcs.ed.ac.uk/pepa

Page 203: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Thanks!

Acknowledgements: collaboratorsThanks to many co-authors and collaborators: Jeremy Bradley,Luca Bortolussi, Allan Clark, Graham Clark, Adam Duguid, VashtiGalpin, Nil Gesweiller, Stephen Gilmore, Marco Stenico, NigelThomas, Mirco Tribastone, and others.

Acknowledgements: fundingThe PEPA project has received funding from the EPRSC,BBSRC, the Royal Society and the CEC IST-FET programme.

More information:http://www.dcs.ed.ac.uk/pepa

Page 204: Stochastic Process Algebras From Individuals to Populationshomepages.inf.ed.ac.uk/jeh/TALKS/CJlecture.pdf · SPA | From Individuals to Populations Outline 1 Introduction Stochastic

SPA — From Individuals to Populations

Conclusions

Alternative interpretations

Thanks!

Acknowledgements: collaboratorsThanks to many co-authors and collaborators: Jeremy Bradley,Luca Bortolussi, Allan Clark, Graham Clark, Adam Duguid, VashtiGalpin, Nil Gesweiller, Stephen Gilmore, Marco Stenico, NigelThomas, Mirco Tribastone, and others.

Acknowledgements: fundingThe PEPA project has received funding from the EPRSC,BBSRC, the Royal Society and the CEC IST-FET programme.

More information:http://www.dcs.ed.ac.uk/pepa