360 likes | 477 Vues
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: R.H.Mak@tue.nl. Baroque Buffer. Design issues. Functional correctness
E N D
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: R.H.Mak@tue.nl
Design issues • Functional correctness • Preservation of order • Behavioral correctness • Absence of deadlock • Performance • Cycle time, throughput • Latency • Occupancy
Constructive Approach • Basic building blocks • 1-place buffer • 2-way split • 2-way merge • Construction methods • Serial composition • Wagging composition • Multi-wagging
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
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
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
Cycle Time Given a sequence function s we define • The individual cycle time by • The average cycle time by
Latency Given a sequence function s we define • The individual latency by • The average latency by
Occupancy Given a sequence function s we define • The instantaneous occupancy by • The average occupancy by
Queuing Formula (Little) Let s be a sequence function of a buffer with finite average latency, occupancy, and cycle time. Then
-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
Optimality Problem Given a pair of values (k, d), design the optimal buffer with capacity k and i/o-distance d, where optimal means that the occupancy can attain both bounds.
Optimal Buffer Families • Linear buffers • Tree-like buffers • Rectangular buffers • Square buffers
Ebergen’s Square FIFO J. Ebergen, Squaring the FIFO in GasP, Async 2001
Ebergen’s Ring Experiment • Capacity: 74 • I/o-distance: 34 • Theoretical bounds: 17 57 • Experimental bounds: 23 63
Conclusions • Simple calculus to verify functional correctness • Accurate performance analysis based on sequence functions • Rectangular buffers are (, )-optimal
Take Operator For integers and l, 0kl, and an infinite stream of values A, we define the postfix-operator by “from A take every k-th out of l values”
Drop Operator For integers and l, 0kl, and an infinite stream of values A, we define the postfix-operator by “from A drop every k-th out of l values”
Computation Rules • Drop-take rule • Take-take rule • Complement rule
Linear Buffers • Capacity = n • I/o-distance = n
Capacity = 32n-1 2 I/o-distance = 2n 1 Tree-like Buffers
Rectangular Buffers • Capacity = mn • I/o-distance = m + n 1
SF-construction 2 2,4