Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic...

102
Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University, Brno Technische Universität München MFCS 2009 Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Transcript of Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic...

Page 1: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Stochastic process creation

T. Brázdil J. Esparza S. Kiefer M. Luttenberger

Masaryk University, Brno

Technische Universität München

MFCS 2009

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 2: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Back in victorian Britain . . .

There was concern amongst the Victorians that aristocraticfamilies were becoming extinct.

Francis Galton (1822-1911), anthropologist and polymath:Are families of English peers more likely to die out than thefamilies of ordinary men?

Let p0,p1, . . . ,pn be the respective probabilities that a manhas 0, 1, 2, . . . n sons, let each son have the sameprobability for sons of his own, and so on. What is theprobability that the male line goes extinct?

Henry William Watson (1827-1903), vicar and mathematician:The probability that the line goes extinct is the least solution of

x = p0 + p1x + p2x2 + . . .+ pnxn

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 3: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Back in victorian Britain . . .

There was concern amongst the Victorians that aristocraticfamilies were becoming extinct.

Francis Galton (1822-1911), anthropologist and polymath:Are families of English peers more likely to die out than thefamilies of ordinary men?

Let p0,p1, . . . ,pn be the respective probabilities that a manhas 0, 1, 2, . . . n sons, let each son have the sameprobability for sons of his own, and so on. What is theprobability that the male line goes extinct?

Henry William Watson (1827-1903), vicar and mathematician:The probability that the line goes extinct is the least solution of

x = p0 + p1x + p2x2 + . . .+ pnxn

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 4: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Back in victorian Britain . . .

There was concern amongst the Victorians that aristocraticfamilies were becoming extinct.

Francis Galton (1822-1911), anthropologist and polymath:Are families of English peers more likely to die out than thefamilies of ordinary men?

Let p0,p1, . . . ,pn be the respective probabilities that a manhas 0, 1, 2, . . . n sons, let each son have the sameprobability for sons of his own, and so on. What is theprobability that the male line goes extinct?

Henry William Watson (1827-1903), vicar and mathematician:The probability that the line goes extinct is the least solution of

x = p0 + p1x + p2x2 + . . .+ pnxn

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 5: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Stochastic branching theory

Stochastic branching processes (SBPs)

Stochastic processes for the behaviour of populations whoseindividuals die and reproduce.

Used as models of reproduction of biological species, evolutionof gene pools, chemical and nuclear reactions.

Very well studied by mathematicians (several standardtextbooks).

Our work in the last months (and ongoing)

Investigate SBPs as models for the stochastic analysis of CSsystems with process creation:

multi-threaded programs, OStasks, computer viruses, dynamic data structures,divide-and-conquer algorithms . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 6: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Stochastic branching theory

Stochastic branching processes (SBPs)

Stochastic processes for the behaviour of populations whoseindividuals die and reproduce.

Used as models of reproduction of biological species, evolutionof gene pools, chemical and nuclear reactions.

Very well studied by mathematicians (several standardtextbooks).

Our work in the last months (and ongoing)

Investigate SBPs as models for the stochastic analysis of CSsystems with process creation:

multi-threaded programs, OStasks, computer viruses, dynamic data structures,divide-and-conquer algorithms . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 7: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Stochastic branching theory

Stochastic branching processes (SBPs)

Stochastic processes for the behaviour of populations whoseindividuals die and reproduce.

Used as models of reproduction of biological species, evolutionof gene pools, chemical and nuclear reactions.

Very well studied by mathematicians (several standardtextbooks).

Our work in the last months (and ongoing)

Investigate SBPs as models for the stochastic analysis of CSsystems with process creation: multi-threaded programs,

OStasks, computer viruses, dynamic data structures,divide-and-conquer algorithms . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 8: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Stochastic branching theory

Stochastic branching processes (SBPs)

Stochastic processes for the behaviour of populations whoseindividuals die and reproduce.

Used as models of reproduction of biological species, evolutionof gene pools, chemical and nuclear reactions.

Very well studied by mathematicians (several standardtextbooks).

Our work in the last months (and ongoing)

Investigate SBPs as models for the stochastic analysis of CSsystems with process creation: multi-threaded programs, OStasks,

computer viruses, dynamic data structures,divide-and-conquer algorithms . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 9: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Stochastic branching theory

Stochastic branching processes (SBPs)

Stochastic processes for the behaviour of populations whoseindividuals die and reproduce.

Used as models of reproduction of biological species, evolutionof gene pools, chemical and nuclear reactions.

Very well studied by mathematicians (several standardtextbooks).

Our work in the last months (and ongoing)

Investigate SBPs as models for the stochastic analysis of CSsystems with process creation: multi-threaded programs, OStasks, computer viruses,

dynamic data structures,divide-and-conquer algorithms . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 10: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Stochastic branching theory

Stochastic branching processes (SBPs)

Stochastic processes for the behaviour of populations whoseindividuals die and reproduce.

Used as models of reproduction of biological species, evolutionof gene pools, chemical and nuclear reactions.

Very well studied by mathematicians (several standardtextbooks).

Our work in the last months (and ongoing)

Investigate SBPs as models for the stochastic analysis of CSsystems with process creation: multi-threaded programs, OStasks, computer viruses, dynamic data structures,

divide-and-conquer algorithms . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 11: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Stochastic branching theory

Stochastic branching processes (SBPs)

Stochastic processes for the behaviour of populations whoseindividuals die and reproduce.

Used as models of reproduction of biological species, evolutionof gene pools, chemical and nuclear reactions.

Very well studied by mathematicians (several standardtextbooks).

Our work in the last months (and ongoing)

Investigate SBPs as models for the stochastic analysis of CSsystems with process creation: multi-threaded programs, OStasks, computer viruses, dynamic data structures,divide-and-conquer algorithms . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 12: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

A classification of SBPs

Two classical dimensionsSingle-type/Multi-type(one/several “subspecies” with different offspring probabilities).

Untimed/Timed

A new dimension for CS systemsDistinction between processes and processors

Unboundedly many processors(new processes immediately allocated to fresh processors)All research on SBPs has only considered this model.

Single processor

K -processors, variable number of processors . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 13: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

A classification of SBPs

Two classical dimensionsSingle-type/Multi-type(one/several “subspecies” with different offspring probabilities).

Untimed/Timed

A new dimension for CS systemsDistinction between processes and processors

Unboundedly many processors(new processes immediately allocated to fresh processors)All research on SBPs has only considered this model.

Single processor

K -processors, variable number of processors . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 14: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

A classification of SBPs

Two classical dimensionsSingle-type/Multi-type(one/several “subspecies” with different offspring probabilities).

Untimed/Timed

A new dimension for CS systemsDistinction between processes and processors

Unboundedly many processors(new processes immediately allocated to fresh processors)All research on SBPs has only considered this model.

Single processor

K -processors, variable number of processors . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 15: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

A classification of SBPs

Two classical dimensionsSingle-type/Multi-type(one/several “subspecies” with different offspring probabilities).

Untimed/Timed

A new dimension for CS systemsDistinction between processes and processors

Unboundedly many processors(new processes immediately allocated to fresh processors)All research on SBPs has only considered this model.

Single processor

K -processors, variable number of processors . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 16: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

A classification of SBPs

Two classical dimensionsSingle-type/Multi-type(one/several “subspecies” with different offspring probabilities).

Untimed/Timed

A new dimension for CS systemsDistinction between processes and processors

Unboundedly many processors(new processes immediately allocated to fresh processors)All research on SBPs has only considered this model.

Single processor

K -processors, variable number of processors . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 17: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

In this talk . . .

. . . single-typed, untimed systems, with either unboundedlymany or a single processor.

restriction to single-type only for expository reasonsdeterministic lifetimes can be modelled within the untimedmodelextensions to stochastic lifetimes and k -processors arefuture work.

Mix of survey and new results

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 18: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

In this talk . . .

. . . single-typed, untimed systems, with either unboundedlymany or a single processor.

restriction to single-type only for expository reasons

deterministic lifetimes can be modelled within the untimedmodelextensions to stochastic lifetimes and k -processors arefuture work.

Mix of survey and new results

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 19: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

In this talk . . .

. . . single-typed, untimed systems, with either unboundedlymany or a single processor.

restriction to single-type only for expository reasonsdeterministic lifetimes can be modelled within the untimedmodel

extensions to stochastic lifetimes and k -processors arefuture work.

Mix of survey and new results

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 20: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

In this talk . . .

. . . single-typed, untimed systems, with either unboundedlymany or a single processor.

restriction to single-type only for expository reasonsdeterministic lifetimes can be modelled within the untimedmodelextensions to stochastic lifetimes and k -processors arefuture work.

Mix of survey and new results

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 21: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

In this talk . . .

. . . single-typed, untimed systems, with either unboundedlymany or a single processor.

restriction to single-type only for expository reasonsdeterministic lifetimes can be modelled within the untimedmodelextensions to stochastic lifetimes and k -processors arefuture work.

Mix of survey and new results

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 22: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Describing systems

A process “dies” when it generates its children.Thread creation is simulated by assuming that one child isthe continuation of the parent.

Our running example:

X0.1−−−→ 〈X ,X ,X 〉 X

0.2−−−→ 〈X ,X 〉 X

0.1−−−→ X X

0.6−−−→ ε

Probability generating function f (x)

f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 23: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Describing systems

A process “dies” when it generates its children.Thread creation is simulated by assuming that one child isthe continuation of the parent.Our running example:

X0.1−−−→ 〈X ,X ,X 〉 X

0.2−−−→ 〈X ,X 〉 X

0.1−−−→ X X

0.6−−−→ ε

Probability generating function f (x)

f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 24: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Describing systems

A process “dies” when it generates its children.Thread creation is simulated by assuming that one child isthe continuation of the parent.Our running example:

X0.1−−−→ 〈X ,X ,X 〉 X

0.2−−−→ 〈X ,X 〉 X

0.1−−−→ X X

0.6−−−→ ε

Probability generating function f (x)

f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 25: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Describing executions: family trees

0.6

0.6

0.10.6 0.6 0.6

0.20.2

0.1

Executing a family tree∞-processors: generation-wise1-processor: scheduler (system det. by pgf and scheduler)

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 26: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Describing executions: family trees

0.6

0.6

0.10.6 0.6 0.6

0.20.2

0.1

Executing a family tree∞-processors: generation-wise1-processor: scheduler (system det. by pgf and scheduler)

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 27: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Probability of termination (extinction)

ObserveThe probability of extinction is independent of the number ofprocessors. (More processors accelerate a computation, butdon’t change it.)

Theorem (well known)The probability of extinction of the process types is the leastnonnegative fixed point of the pgf, i.e., the smallest nonnegativesolution of x = f (x).

The least solution for f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6 is 1.

The least solution for f (x) = 2/3x2 + 1/3 is 1/2.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 28: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Probability of termination (extinction)

ObserveThe probability of extinction is independent of the number ofprocessors. (More processors accelerate a computation, butdon’t change it.)

Theorem (well known)The probability of extinction of the process types is the leastnonnegative fixed point of the pgf, i.e., the smallest nonnegativesolution of x = f (x).

The least solution for f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6 is 1.

The least solution for f (x) = 2/3x2 + 1/3 is 1/2.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 29: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Probability of termination (extinction)

ObserveThe probability of extinction is independent of the number ofprocessors. (More processors accelerate a computation, butdon’t change it.)

Theorem (well known)The probability of extinction of the process types is the leastnonnegative fixed point of the pgf, i.e., the smallest nonnegativesolution of x = f (x).

The least solution for f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6 is 1.

The least solution for f (x) = 2/3x2 + 1/3 is 1/2.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 30: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Probability of termination (extinction)

ObserveThe probability of extinction is independent of the number ofprocessors. (More processors accelerate a computation, butdon’t change it.)

Theorem (well known)The probability of extinction of the process types is the leastnonnegative fixed point of the pgf, i.e., the smallest nonnegativesolution of x = f (x).

The least solution for f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6 is 1.

The least solution for f (x) = 2/3x2 + 1/3 is 1/2.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 31: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Critical and subcritical systems

We consider systems that terminate with probability 1.

Further classified into:

Critical: expected number of children is 1.Subcritical: expected number of children smaller than 1.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 32: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Probability space

Elementary events: family trees.Probability of a family tree: product of the probabilities ofits nodes.

0.6

0.6

0.10.6 0.6 0.6

0.20.2

0.1

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 33: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Probability space

Elementary events: family trees.Probability of a family tree: product of the probabilities ofits nodes.

0.6

0.6

0.10.6 0.6 0.6

0.20.2

0.1

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 34: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

The∞-processor case: random variables

Completion time (time to extinction)Random variable T that assigns to a family tree its number ofgenerations.

Processor numberRandom variable N that assigns to a family tree the maximalsize of a generation.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 35: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

An example

0.6

0.6

0.10.6 0.6 0.6

0.20.2

0.1

Completion time = 4 (four generations)Processor number = 4 (size of the 3rd generation)

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 36: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

Proposition

The probabilities Pr(T ≤ 1) , Pr(T ≤ 2) , Pr(T ≤ 3) , . . . oftermination in at most 1,2,3, . . . generations are equal to

f (0) , f (f (0)) = f 2(0) , f (f (f (0))) = f 3(0) , . . .

Proof by example.

Let f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.

Let pk+1 be the probability of termination in at mostk + 1-generations. We have

pk+1 = 0.1 · p3k + 0.2 · p2

k + 0.1 · pk + 0.6

= f (pk )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 37: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

Proposition

The probabilities Pr(T ≤ 1) , Pr(T ≤ 2) , Pr(T ≤ 3) , . . . oftermination in at most 1,2,3, . . . generations are equal to

f (0) , f (f (0)) = f 2(0) , f (f (f (0))) = f 3(0) , . . .

Proof by example.

Let f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.

Let pk+1 be the probability of termination in at mostk + 1-generations. We have

pk+1 = 0.1 · p3k + 0.2 · p2

k + 0.1 · pk + 0.6

= f (pk )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 38: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

Proposition

The probabilities Pr(T ≤ 1) , Pr(T ≤ 2) , Pr(T ≤ 3) , . . . oftermination in at most 1,2,3, . . . generations are equal to

f (0) , f (f (0)) = f 2(0) , f (f (f (0))) = f 3(0) , . . .

Proof by example.

Let f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.Let pk+1 be the probability of termination in at mostk + 1-generations. We have

pk+1 = 0.1 · p3k + 0.2 · p2

k + 0.1 · pk + 0.6

= f (pk )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 39: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

Proposition

The probabilities Pr(T ≤ 1) , Pr(T ≤ 2) , Pr(T ≤ 3) , . . . oftermination in at most 1,2,3, . . . generations are equal to

f (0) , f (f (0)) = f 2(0) , f (f (f (0))) = f 3(0) , . . .

Proof by example.

Let f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.Let pk+1 be the probability of termination in at mostk + 1-generations. We have

pk+1 = 0.1 · p3k + 0.2 · p2

k + 0.1 · pk + 0.6

= f (pk )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 40: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

Proposition

The probabilities Pr(T ≤ 1) , Pr(T ≤ 2) , Pr(T ≤ 3) , . . . oftermination in at most 1,2,3, . . . generations are equal to

f (0) , f (f (0)) = f 2(0) , f (f (f (0))) = f 3(0) , . . .

Proof by example.

Let f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.Let pk+1 be the probability of termination in at mostk + 1-generations. We have

pk+1 = 0.1 · p3k + 0.2 · p2

k + 0.1 · pk + 0.6= f (pk )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 41: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

By Kleene’s theorem, the least fixed point of f (x) is the limit off (0), f 2(0), f 3(0) . . .

Least fixed point of f (x) = probability of termination.

k -th Kleene approximant to the least fixed point=

probability of termination after at most k generations.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 42: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

By Kleene’s theorem, the least fixed point of f (x) is the limit off (0), f 2(0), f 3(0) . . .

Least fixed point of f (x) = probability of termination.

k -th Kleene approximant to the least fixed point=

probability of termination after at most k generations.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 43: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

By Kleene’s theorem, the least fixed point of f (x) is the limit off (0), f 2(0), f 3(0) . . .

Least fixed point of f (x) = probability of termination.

k -th Kleene approximant to the least fixed point=

probability of termination after at most k generations.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 44: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the process number

Much harder problem, studied in the 70s by Lindvall andNerman for one-type systems.

FactThe pgf of a subcritical system has exactly two fixed points.

Theorem (Lindvall 76,Nerman 77)Let a > 1 be the greatest fixed point of the pgf. For all n ≥ 1

Pr[N > n] <a− 1an − 1

and Pr[N > n] ∈ Θ

(1

nan

).

For f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6 we have a ≈ 1.3722.For instance, Pr[N > n] ≤ 0.01 for n ≥ 12.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 45: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the process number

Much harder problem, studied in the 70s by Lindvall andNerman for one-type systems.

FactThe pgf of a subcritical system has exactly two fixed points.

Theorem (Lindvall 76,Nerman 77)Let a > 1 be the greatest fixed point of the pgf. For all n ≥ 1

Pr[N > n] <a− 1an − 1

and Pr[N > n] ∈ Θ

(1

nan

).

For f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6 we have a ≈ 1.3722.For instance, Pr[N > n] ≤ 0.01 for n ≥ 12.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 46: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the process number

Much harder problem, studied in the 70s by Lindvall andNerman for one-type systems.

FactThe pgf of a subcritical system has exactly two fixed points.

Theorem (Lindvall 76,Nerman 77)Let a > 1 be the greatest fixed point of the pgf. For all n ≥ 1

Pr[N > n] <a− 1an − 1

and Pr[N > n] ∈ Θ

(1

nan

).

For f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6 we have a ≈ 1.3722.For instance, Pr[N > n] ≤ 0.01 for n ≥ 12.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 47: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the process number

Much harder problem, studied in the 70s by Lindvall andNerman for one-type systems.

FactThe pgf of a subcritical system has exactly two fixed points.

Theorem (Lindvall 76,Nerman 77)Let a > 1 be the greatest fixed point of the pgf. For all n ≥ 1

Pr[N > n] <a− 1an − 1

and Pr[N > n] ∈ Θ

(1

nan

).

For f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6 we have a ≈ 1.3722.For instance, Pr[N > n] ≤ 0.01 for n ≥ 12.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 48: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

The single processor case: random variables

Recall: a scheduler repeatedly chooses a process from fromthe pool of current processes awaiting execution.

Time to termination (time to extinction)Random variable T that assigns to a family tree its size.Independent of the scheduler.

Completion spaceRandom variable Sσ that assigns to a family tree the maximalsize reached by the pool during the execution of the tree by thescheduler σ.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 49: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

The single processor case: random variables

Recall: a scheduler repeatedly chooses a process from fromthe pool of current processes awaiting execution.

Time to termination (time to extinction)Random variable T that assigns to a family tree its size.Independent of the scheduler.

Completion spaceRandom variable Sσ that assigns to a family tree the maximalsize reached by the pool during the execution of the tree by thescheduler σ.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 50: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

The single processor case: random variables

Recall: a scheduler repeatedly chooses a process from fromthe pool of current processes awaiting execution.

Time to termination (time to extinction)Random variable T that assigns to a family tree its size.Independent of the scheduler.

Completion spaceRandom variable Sσ that assigns to a family tree the maximalsize reached by the pool during the execution of the tree by thescheduler σ.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 51: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

An example

0.6

0.6

0.10.6 0.6 0.6

0.20.2

0.1

Completion time = 9, completion space between 3 and 5

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 52: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

PropositionThe expected value of T is the solution of a linear equation.

Proof by example.

Consider f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.

E [T ] = 0.6 · 1+ 0.1 · ( 1 + E [T ] )+ 0.2 · ( 1 + 2E [T ] )+ 0.1 · ( 1 + 3E [T ] )

= 1 + 0.8 · E [T ]

and so E [T ] = 5.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 53: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

PropositionThe expected value of T is the solution of a linear equation.

Proof by example.

Consider f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.

E [T ] = 0.6 · 1+ 0.1 · ( 1 + E [T ] )+ 0.2 · ( 1 + 2E [T ] )+ 0.1 · ( 1 + 3E [T ] )

= 1 + 0.8 · E [T ]

and so E [T ] = 5.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 54: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

PropositionThe expected value of T is the solution of a linear equation.

Proof by example.

Consider f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.

E [T ] = 0.6 · 1

+ 0.1 · ( 1 + E [T ] )+ 0.2 · ( 1 + 2E [T ] )+ 0.1 · ( 1 + 3E [T ] )

= 1 + 0.8 · E [T ]

and so E [T ] = 5.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 55: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

PropositionThe expected value of T is the solution of a linear equation.

Proof by example.

Consider f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.

E [T ] = 0.6 · 1+ 0.1 · ( 1 + E [T ] )

+ 0.2 · ( 1 + 2E [T ] )+ 0.1 · ( 1 + 3E [T ] )

= 1 + 0.8 · E [T ]

and so E [T ] = 5.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 56: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

PropositionThe expected value of T is the solution of a linear equation.

Proof by example.

Consider f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.

E [T ] = 0.6 · 1+ 0.1 · ( 1 + E [T ] )+ 0.2 · ( 1 + 2E [T ] )

+ 0.1 · ( 1 + 3E [T ] )= 1 + 0.8 · E [T ]

and so E [T ] = 5.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 57: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

PropositionThe expected value of T is the solution of a linear equation.

Proof by example.

Consider f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.

E [T ] = 0.6 · 1+ 0.1 · ( 1 + E [T ] )+ 0.2 · ( 1 + 2E [T ] )+ 0.1 · ( 1 + 3E [T ] )

= 1 + 0.8 · E [T ]

and so E [T ] = 5.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 58: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

PropositionThe expected value of T is the solution of a linear equation.

Proof by example.

Consider f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.

E [T ] = 0.6 · 1+ 0.1 · ( 1 + E [T ] )+ 0.2 · ( 1 + 2E [T ] )+ 0.1 · ( 1 + 3E [T ] )

= 1 + 0.8 · E [T ]

and so E [T ] = 5.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 59: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion time

PropositionThe expected value of T is the solution of a linear equation.

Proof by example.

Consider f (x) = 0.1x3 + 0.2x2 + 0.1x + 0.6.

E [T ] = 0.6 · 1+ 0.1 · ( 1 + E [T ] )+ 0.2 · ( 1 + 2E [T ] )+ 0.1 · ( 1 + 3E [T ] )

= 1 + 0.8 · E [T ]

and so E [T ] = 5.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 60: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

A theorem by Dwass

Theorem (Dwass69)If p0 > 0 then

Pr[T = j] =1j

pj,j−1

for every j ≥ 0, where pj,j−1 denotes the probability that ageneration has j − 1 processes under the condition that theparent generation has j processes.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 61: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion space

SchedulerFunction that assigns to a family tree one of its executions.

Offline schedulersKnow the complete family tree in advance.

Online schedulersOnly know the part of the family tree executed so far.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 62: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion space

SchedulerFunction that assigns to a family tree one of its executions.

Offline schedulersKnow the complete family tree in advance.

Online schedulersOnly know the part of the family tree executed so far.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 63: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Analyzing the completion space

SchedulerFunction that assigns to a family tree one of its executions.

Offline schedulersKnow the complete family tree in advance.

Online schedulersOnly know the part of the family tree executed so far.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 64: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

An example

0.6

0.6

0.10.6 0.6 0.6

0.20.2

0.1

Goal: obtain bounds valid for all online schedulers, andcompare them with the optimal offline scheduler

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 65: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

An example

0.6

0.6

0.10.6 0.6 0.6

0.20.2

0.1

Goal: obtain bounds valid for all online schedulers, andcompare them with the optimal offline scheduler

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 66: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Kleene Iteration

Consider f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 67: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Kleene Iteration

Consider f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 68: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Kleene Iteration

Consider f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 69: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Kleene Iteration

Consider f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 70: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Kleene Iteration

Consider f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 71: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Kleene Iteration

Consider f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 72: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Kleene Iteration

Consider f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 73: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Kleene Iteration

Consider f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 74: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Newton’s method

Consider x = f (x) with f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 75: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Newton’s method

Consider x = f (x) with f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 76: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Newton’s method

Consider x = f (x) with f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 77: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Newton’s method

Consider x = f (x) with f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 78: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Newton’s method

Consider x = f (x) with f (x) = 38x2 + 1

4x + 38

0 0.2

0.2

0.4

0.4

0.6

0.6

0.8

0.8

1

1

1.2

1.2

µf

f (X )

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 79: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Mathematical formulation of Newton’s method

The Newton approximants to the least fixed point of f (x) aregiven by:

ν(0) = 0

ν(i+1) = ν(i) +f(ν(i))− ν(i)

1− f ′(ν(i)

)

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 80: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Completion space of the optimal scheduler

Proposition

The probability Pr(Sop ≤ k) of completing execution withinspace at most k is equal to the k-th Newton approximant ν(k) ofthe least fixed point of f (x).

Proof idea.

Show that {Pr(Sop ≤ k)}k ≥0 and {νk}k≥0 satisfy the samerecurrence equation.

Least fixed point of f (x) = probability of termination

k -th Newton approximant to the least fixed point=

probability of termination within space at most k

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 81: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Completion space of the optimal scheduler

Proposition

The probability Pr(Sop ≤ k) of completing execution withinspace at most k is equal to the k-th Newton approximant ν(k) ofthe least fixed point of f (x).

Proof idea.

Show that {Pr(Sop ≤ k)}k ≥0 and {νk}k≥0 satisfy the samerecurrence equation.

Least fixed point of f (x) = probability of termination

k -th Newton approximant to the least fixed point=

probability of termination within space at most k

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 82: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Completion space of the optimal scheduler

Proposition

The probability Pr(Sop ≤ k) of completing execution withinspace at most k is equal to the k-th Newton approximant ν(k) ofthe least fixed point of f (x).

Proof idea.

Show that {Pr(Sop ≤ k)}k ≥0 and {νk}k≥0 satisfy the samerecurrence equation.

Least fixed point of f (x) = probability of termination

k -th Newton approximant to the least fixed point=

probability of termination within space at most k

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 83: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Completion space of the optimal scheduler

Proposition

The probability Pr(Sop ≤ k) of completing execution withinspace at most k is equal to the k-th Newton approximant ν(k) ofthe least fixed point of f (x).

Proof idea.

Show that {Pr(Sop ≤ k)}k ≥0 and {νk}k≥0 satisfy the samerecurrence equation.

Least fixed point of f (x) = probability of termination

k -th Newton approximant to the least fixed point=

probability of termination within space at most k

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 84: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Exploiting the result

Applying our recent results on the convergence speed ofNewton’s method [STOC’07 and STACS’08EKL08]:

TheoremFor a subcritical system there are c > 0 and 0 < d < 1 suchthat Pr[Sop ≥ k ] ≤ c · d2k

for every k ∈ N.

Consequence: the optimal scheduler always has finiteexpected completion space

TheoremFor a critical system there are c > 0 and 0 < d < 1 such thatPr[Sop ≥ k ] ≤ c · dk for every k ∈ N.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 85: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Online schedulers

TheoremLet a > 1 be the greatest fixed point of the pgf of a subcriticalsystem (in a certain normal form). Then

Pr[Sσ ≥ n] =a− 1an − 1

for every online scheduler σ and for every n ≥ 1.

All online schedulers have the same distribution.(No longer true for multitype systems!!)Gap between online and offline schedulers:

Pr[Sop ≥ k ] ≤ c · d2kfor the optimal scheduler.

Pr[Sσ ≥ n] = a−1an−1 for any online scheduler σ.

The optimal scheduler always has finite expected space,online schedulers may not.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 86: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Online schedulers

TheoremLet a > 1 be the greatest fixed point of the pgf of a subcriticalsystem (in a certain normal form). Then

Pr[Sσ ≥ n] =a− 1an − 1

for every online scheduler σ and for every n ≥ 1.

All online schedulers have the same distribution.(No longer true for multitype systems!!)

Gap between online and offline schedulers:Pr[Sop ≥ k ] ≤ c · d2k

for the optimal scheduler.Pr[Sσ ≥ n] = a−1

an−1 for any online scheduler σ.

The optimal scheduler always has finite expected space,online schedulers may not.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 87: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Online schedulers

TheoremLet a > 1 be the greatest fixed point of the pgf of a subcriticalsystem (in a certain normal form). Then

Pr[Sσ ≥ n] =a− 1an − 1

for every online scheduler σ and for every n ≥ 1.

All online schedulers have the same distribution.(No longer true for multitype systems!!)Gap between online and offline schedulers:

Pr[Sop ≥ k ] ≤ c · d2kfor the optimal scheduler.

Pr[Sσ ≥ n] = a−1an−1 for any online scheduler σ.

The optimal scheduler always has finite expected space,online schedulers may not.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 88: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Online schedulers

TheoremLet a > 1 be the greatest fixed point of the pgf of a subcriticalsystem (in a certain normal form). Then

Pr[Sσ ≥ n] =a− 1an − 1

for every online scheduler σ and for every n ≥ 1.

All online schedulers have the same distribution.(No longer true for multitype systems!!)Gap between online and offline schedulers:

Pr[Sop ≥ k ] ≤ c · d2kfor the optimal scheduler.

Pr[Sσ ≥ n] = a−1an−1 for any online scheduler σ.

The optimal scheduler always has finite expected space,online schedulers may not.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 89: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Conclusions

Stochastic branching processes are important forcomputer science.

Mathematicians haven’t studied SBPs for computerscience yet

No distinction between processes and processors.No study of “CS random variables” like space consumption.

Beautiful theory! Surprising connectiosn betweenapproximants to fixed points and random variables ofinterest.Much to do:

k -processors, non-terminating systems,light-first schedulers . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 90: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Conclusions

Stochastic branching processes are important forcomputer science.Mathematicians haven’t studied SBPs for computerscience yet

No distinction between processes and processors.No study of “CS random variables” like space consumption.

Beautiful theory! Surprising connectiosn betweenapproximants to fixed points and random variables ofinterest.Much to do:

k -processors, non-terminating systems,light-first schedulers . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 91: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Conclusions

Stochastic branching processes are important forcomputer science.Mathematicians haven’t studied SBPs for computerscience yet

No distinction between processes and processors.

No study of “CS random variables” like space consumption.

Beautiful theory! Surprising connectiosn betweenapproximants to fixed points and random variables ofinterest.Much to do:

k -processors, non-terminating systems,light-first schedulers . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 92: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Conclusions

Stochastic branching processes are important forcomputer science.Mathematicians haven’t studied SBPs for computerscience yet

No distinction between processes and processors.No study of “CS random variables” like space consumption.

Beautiful theory! Surprising connectiosn betweenapproximants to fixed points and random variables ofinterest.Much to do:

k -processors, non-terminating systems,light-first schedulers . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 93: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Conclusions

Stochastic branching processes are important forcomputer science.Mathematicians haven’t studied SBPs for computerscience yet

No distinction between processes and processors.No study of “CS random variables” like space consumption.

Beautiful theory! Surprising connectiosn betweenapproximants to fixed points and random variables ofinterest.

Much to do:

k -processors, non-terminating systems,light-first schedulers . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 94: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Conclusions

Stochastic branching processes are important forcomputer science.Mathematicians haven’t studied SBPs for computerscience yet

No distinction between processes and processors.No study of “CS random variables” like space consumption.

Beautiful theory! Surprising connectiosn betweenapproximants to fixed points and random variables ofinterest.Much to do:

k -processors, non-terminating systems,light-first schedulers . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 95: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Conclusions

Stochastic branching processes are important forcomputer science.Mathematicians haven’t studied SBPs for computerscience yet

No distinction between processes and processors.No study of “CS random variables” like space consumption.

Beautiful theory! Surprising connectiosn betweenapproximants to fixed points and random variables ofinterest.Much to do: k -processors,

non-terminating systems,light-first schedulers . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 96: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Conclusions

Stochastic branching processes are important forcomputer science.Mathematicians haven’t studied SBPs for computerscience yet

No distinction between processes and processors.No study of “CS random variables” like space consumption.

Beautiful theory! Surprising connectiosn betweenapproximants to fixed points and random variables ofinterest.Much to do: k -processors, non-terminating systems,light-first schedulers . . .

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 97: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

Back to victorian Britain . . .

There was concern amongst the Victorians that aristocraticfamilies were becoming extinct.

Francis Galton (1822-1911), anthropologist and polymath:Are families of English peers more likely to die out than thefamilies of ordinary men?

Let p0,p1, . . . ,pn be the respective probabilities that aman has 0, 1, 2, . . . n sons, let each son have thesame probability for sons of his own, and so on. Whatis the probability that the male line goes extinct?

Henry William Watson (1827-1903), vicar and mathematician:The probability is the least solution of

X = p0 + p1X + p2X 2 + . . .+ pnX n

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 98: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

English peers again . . .

Due to an algebraic error, Watson concluded wrongly that allfamilies eventually die out.

But Galton found a fact, that, with hindsight, provides a possibleexplanation for the observed data:

English peers tended to marry heiresses(daughters without brothers)Heiresses come from families with lower fertility rates(lower probabilities p1, p2, p3, . . . ).. . . which increases the probability of the family dying out.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 99: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

English peers again . . .

Due to an algebraic error, Watson concluded wrongly that allfamilies eventually die out.

But Galton found a fact, that, with hindsight, provides a possibleexplanation for the observed data:

English peers tended to marry heiresses(daughters without brothers)Heiresses come from families with lower fertility rates(lower probabilities p1, p2, p3, . . . ).. . . which increases the probability of the family dying out.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 100: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

English peers again . . .

Due to an algebraic error, Watson concluded wrongly that allfamilies eventually die out.

But Galton found a fact, that, with hindsight, provides a possibleexplanation for the observed data:

English peers tended to marry heiresses(daughters without brothers)

Heiresses come from families with lower fertility rates(lower probabilities p1, p2, p3, . . . ).. . . which increases the probability of the family dying out.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 101: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

English peers again . . .

Due to an algebraic error, Watson concluded wrongly that allfamilies eventually die out.

But Galton found a fact, that, with hindsight, provides a possibleexplanation for the observed data:

English peers tended to marry heiresses(daughters without brothers)Heiresses come from families with lower fertility rates(lower probabilities p1, p2, p3, . . . ).

. . . which increases the probability of the family dying out.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation

Page 102: Technische Universität München Masaryk University ... - TUMesparza/Talks/mfcs09.pdf · Stochastic process creation T. Brázdil J. Esparza S. Kiefer M. Luttenberger Masaryk University,

English peers again . . .

Due to an algebraic error, Watson concluded wrongly that allfamilies eventually die out.

But Galton found a fact, that, with hindsight, provides a possibleexplanation for the observed data:

English peers tended to marry heiresses(daughters without brothers)Heiresses come from families with lower fertility rates(lower probabilities p1, p2, p3, . . . ).. . . which increases the probability of the family dying out.

Brázdil, E., Kiefer, Luttenberger Stochastic process creation