design and performance analysis of buffers: a constructive approach

35
Design and Performance Analysis of Buffers: a Constructive Approach Rudolf H. Mak Dept. of Mathematics and Computer Science Technische Universiteit Eindhoven P.O. Box 513, 5600 MB Eindhoven, The Netherlands E-mail: [email protected]

Upload: akamu

Post on 06-Feb-2016

31 views

Category:

Documents


0 download

DESCRIPTION

Design and Performance Analysis of Buffers: a Constructive Approach. Rudolf H. Mak Dept. of Mathematics and Computer Science Technische Universiteit Eindhoven P.O. Box 513, 5600 MB Eindhoven, The Netherlands E-mail: [email protected]. Baroque Buffer. Design issues. Functional correctness - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Design and Performance Analysis of Buffers: a Constructive Approach

Design and Performance Analysis of Buffers:a Constructive Approach

Rudolf H. Mak

Dept. of Mathematics and Computer Science

Technische Universiteit Eindhoven

P.O. Box 513, 5600 MB Eindhoven, The Netherlands

E-mail: [email protected]

Page 2: Design and Performance Analysis of Buffers: a Constructive Approach

2R.H.Mak

Baroque Buffer

Page 3: Design and Performance Analysis of Buffers: a Constructive Approach

3R.H.Mak

Design issues

• Functional correctness• Preservation of order

• Behavioral correctness• Absence of deadlock

• Performance• Cycle time, throughput• Latency• Occupancy

Page 4: Design and Performance Analysis of Buffers: a Constructive Approach

4R.H.Mak

Constructive Approach

• Basic building blocks• 1-place buffer• 2-way split • 2-way merge

• Construction methods• Serial composition• Wagging composition• Multi-wagging

Page 5: Design and Performance Analysis of Buffers: a Constructive Approach

5R.H.Mak

Functional Specification

A functional specification of a system spe-cifies each output stream as a transforma-tion of (a combination of) its input streams.

• Basic stream transformers• Take operator• Drop operator

• Stream transformer calculus• Computation rules

Page 6: Design and Performance Analysis of Buffers: a Constructive Approach

6R.H.Mak

Baroque Buffer (functional spec)

Page 7: Design and Performance Analysis of Buffers: a Constructive Approach

7R.H.Mak

Sequence Functions

• map the events of a system onto discrete time-slots

• are used to:• establish absence of deadlock• analyze system performance

• are constructed using:• a fixed set of basic sequence functions• a set of sequence function transformers

Page 8: Design and Performance Analysis of Buffers: a Constructive Approach

8R.H.Mak

Baroque Buffer (sequence function)

Page 9: Design and Performance Analysis of Buffers: a Constructive Approach

9R.H.Mak

Capacity and I/O-distance

• The capacity of a buffer is the sum of the number of variables of each of its compo-nents

• The i/o-distance of a buffer is the minimal number of variables visited by any value on its passage through the buffer

Page 10: Design and Performance Analysis of Buffers: a Constructive Approach

10R.H.Mak

Cycle Time

Given a sequence function we define

• The individual cycle time by

• The average cycle time by

Page 11: Design and Performance Analysis of Buffers: a Constructive Approach

11R.H.Mak

Latency

Given a sequence function we define

• The individual latency by

• The average latency by

Page 12: Design and Performance Analysis of Buffers: a Constructive Approach

12R.H.Mak

Occupancy

Given a sequence function we define

• The instantaneous occupancy by

• The average occupancy by

Page 13: Design and Performance Analysis of Buffers: a Constructive Approach

13R.H.Mak

Queuing Formula (Little)

Let be a sequence function of a buffer with finite average latency, occupancy, and cycle time. Then

Page 14: Design and Performance Analysis of Buffers: a Constructive Approach

14R.H.Mak

-bounds

Let X be a buffer with capacity and i/o-distance . Then for every sequence function for X with average cycle time , the average occupancy is bounded by

Page 15: Design and Performance Analysis of Buffers: a Constructive Approach

15R.H.Mak

Optimality Problem

Given a pair of values (, ), design the optimal buffer with capacity and i/o-distance , where optimal means that the occupancy can attain both bounds.

Page 16: Design and Performance Analysis of Buffers: a Constructive Approach

16R.H.Mak

Optimal Buffer Families

• Linear buffers

• Tree-like buffers

• Rectangular buffers• Square buffers

Page 17: Design and Performance Analysis of Buffers: a Constructive Approach

17R.H.Mak

Rectangular Buffer (5x3)

Page 18: Design and Performance Analysis of Buffers: a Constructive Approach

18R.H.Mak

Ebergen’s Square FIFO

J. Ebergen, Squaring the FIFO in GasP, Async 2001

Page 19: Design and Performance Analysis of Buffers: a Constructive Approach

19R.H.Mak

Ebergen’s Ring Experiment

• Capacity: 74• I/o-distance: 34• Theoretical bounds:

17 57

• Experimental bounds:23 63

Page 20: Design and Performance Analysis of Buffers: a Constructive Approach

20R.H.Mak

Conclusions

• Simple calculus to verify functional correctness

• Accurate performance analysis based on sequence functions

• Rectangular buffers are (, )-optimal

Page 21: Design and Performance Analysis of Buffers: a Constructive Approach

21R.H.Mak

Page 22: Design and Performance Analysis of Buffers: a Constructive Approach

22R.H.Mak

1-place Buffer

Page 23: Design and Performance Analysis of Buffers: a Constructive Approach

23R.H.Mak

2-way Split

Page 24: Design and Performance Analysis of Buffers: a Constructive Approach

24R.H.Mak

2-way Merge

Page 25: Design and Performance Analysis of Buffers: a Constructive Approach

25R.H.Mak

Serial Composition

Page 26: Design and Performance Analysis of Buffers: a Constructive Approach

26R.H.Mak

Wagging Composition

Page 27: Design and Performance Analysis of Buffers: a Constructive Approach

27R.H.Mak

Multi-wagging

Page 28: Design and Performance Analysis of Buffers: a Constructive Approach

28R.H.Mak

Take Operator

For integers and l, 0 k l, and an infinite stream of values A, we define the postfix-operator by

“from A take every k-th out of l values”

Page 29: Design and Performance Analysis of Buffers: a Constructive Approach

29R.H.Mak

Drop Operator

For integers and l, 0 k l, and an infinite stream of values A, we define the postfix-operator by

“from A drop every k-th out of l values”

Page 30: Design and Performance Analysis of Buffers: a Constructive Approach

30R.H.Mak

• Drop-take rule

• Take-take rule

• Complement rule

Computation Rules

Page 31: Design and Performance Analysis of Buffers: a Constructive Approach

31R.H.Mak

Linear Buffers

• Capacity

= n

• I/o-distance

= n

Page 32: Design and Performance Analysis of Buffers: a Constructive Approach

32R.H.Mak

Tree-like Buffers

• Capacity

= 32n-1 2

• I/o-distance

= 2n 1

Page 33: Design and Performance Analysis of Buffers: a Constructive Approach

33R.H.Mak

Rectangular Buffers

• Capacity

= mn

• I/o-distance

= m + n 1

Page 34: Design and Performance Analysis of Buffers: a Constructive Approach

34R.H.Mak

SF-construction

0 a#0

1 b#0

2 a#1

3 b#1

4 a#2

5 b#2

6 a#3

7 b#3

a#0

b#0

a#1

b#1

a#0

b#0

a#1

b#1

2 2,4

Page 35: Design and Performance Analysis of Buffers: a Constructive Approach

35R.H.Mak

Multi-split and Multi-merge