Janak Patel
Transcript of Janak Patel
-
8/10/2019 Janak Patel
1/6
I M P R O V I N G T H E T H R O U G H P U T O F A P I P E L I N E B Y I N S E R T I O N O F D E L A Y S
J a n a k H . P a t e l a n d E d w a r d S . D a v i d s o n
C o o r d i n a t e d S c i e n c e l a b
U n i v e r s i t y o f I l l i n o i s
U r b a n a , I l l i n o i s 6 1 8 0 1
S u n m ~ r y
A p i p e l i n e i s d e f i n e d t o b e a c o l l e c t i o n o f r e -
s o u r c e s , c a l l e d s e g m e n t s w h i c h c a n b e k e p t b u s y s i m u l -
t a n e o u s l y . A t a s k o n c e i n i t i a t e d , f l o w s f r o m s e g m e n t
t o s e g m e n t f o r i t s e x e c u t i o n , A c o l l i s i o n o c c u r s i f
t w o o r m o r e t a s k s a t t e m p t t o u s e t h e s a m e s e g m e n t a t
t h e s a m e t i m e .
T h e c o l l i s i o n c h a r a c t e r i s t i c s o f a p i p e l i n e w i t h
r e s p e c t t o a s c h e d u l e o f t a s k i n i t i a t i o n s a r e i n v e s t i -
g a t e d . A m e t h o d o l o g y i s p r e s e n t e d f o r m o d i f y i n g t h e
c o l l i s i o n c h a r a c t e r i s t i c s w i t h t h e i n s e r t i o n o f d e l a y s
s o a s t o i n c r e a s e t h e u t i l i z a t i o n ' o f s e g m e n t s a n d h e n c e
t h e t h r o u g h p u t u n d e r a p p r o p r i a t e s c h e d u l i n g .
I . I n t r o d u c t i o n
P i p e l i n e s a r e b e c o m i n g i n c r e a s i n g l y c o m m o n i n m a n y
c o m p u t e r s , s o m e t i m e s f o r a c h i e v i n g h i g h s p e e d c o m p u t a -
t i o n a t a l o w e r c o s t t h a n w o u l d r e s u l t f r o m s i m p l y
u s i n g h i g h e r s p e ec e l e c t r o n i c c o m p o n e n t s . H o w e v e r , i n
m o s t c a s e s i t i s u s e d b e c a u s e o f a b e t t e r p e r f o r m a n c e
p e r u n i t c o s t o V e r o th e r a r c hi t e c t u r e s . A p i p e l i n e a s
d e f i n e d h e r e i s a c o l l e c t i o n o f r e s o u r c e s c a l l e d
s e S m e n t s w h i c h c a n b e k e p t b u s y s i m u l t a n e o u s l y . A t a s k
o n c e i n i t i a t e d , f l o w s f r o m s e g m e n t t o s e g m e n t f o r it s
e x e c u t i o n , i n a p r e d e t e r m i n e d m a n n e r . T h e e f f e c t i v e -
n e s s o f t h e p i p e l i n e l i e s i n t h e f a c t t h a t a t a s k c a n
b e i n i t i a t e d b e f o r e t h e c o m p l e t i o n o f s o m e p r e v i o u s l y
i n i t i a t e d t a s k s r e s u l t i n g i n h i g h p e r f o r m a n c e a n d
s e g m e n t s c a n b e s p e c i a l r a t h e r t h a n g e n e r a l p u r p o s e
r e s u l t i n g i n l o w c o s t . W e t e r m a p i p e l i n e i n w h i c h
a l l t h e t a s k s h a v e i d e n t i c a l f l o w p a t te r n s , a s i n g l e
f u n c t i o n p i p e l i n e . I n a m u l t i f u n c t i o n p i p e l i n e t h e r e
a r e t w o o r m o r e d i s t i n c t p o s s i b l e f l o w p a t t e r n s a n d
e a c h t a s k u s e s o n e o f t h es e f l o w p a t t e r n s . E a c h f l o w
p a t t e r n i s i d e n t i f i e d b y a f u n c t i o n n a m e a n d i t c a n b e
d i s p l a y e d i n a r e s e r v a t i o n t a b l e , s u c h a s F i g u r e i a n d
6 . R o w s c o r r e s p o n d t o s e g m e n t s ' a nd c o l u m n s t o u n i t s o f
t i m e . A f u n c t i o n n a m e , d e n o t e d b y a s i n g l e c a p i t a l
l e t t e r , i s p l a c e d i n r o w i a n d c o l u m n j ( c e l l ( i , j ) ) i f
a f t e r j u n i t s o f e x e c u t i o n a t a s k w i t h that f u n c t i o n
n a m e r e q u i r e s s e g m e n t i. W e s h a l l c o n s i s t e n t l y u s e X
a s a f u n c t i o n n a m e i n s i n g l e f u n c t i o n p i p e l i n e s . F i g . 6
i s a r e s e r v a t i o n t a b l e o f a m u l t i f u n c t i o n p i p e l i n e w i t h
t w o d i s t i n c t f l o w p a t t e r n s f o r t w o f u n c t i o n s A a n d B.
I n o u r m o d e l w e a s s u m e t h a t a t a s k o n c e i n i t i a t e d
m u s t f l o w s y n c h r o n o u s l y w i t h o u t p r e e m p t i o n o r w a i t .
T h e r e i s n o r e s t r u c t l o n o n t h e f l o w p a t t e r s , h o w e v e r .
I n F i g . i , m u l t i p l e X ' s i n a r o w m a y i n d i c a t e e i t h e r a
s l o w s e g m e n t o r s e g m e n t r e u s a g e ( f e e d ba c k ) . M u l t i p l e
X ' s i n a c o l u m n i n d i c a t e p a r a l l e l c o m p u t a t i o n . I t i s
t h e r e u s a g e o f a s e g m e n t w h i c h p o s e s a p r o b l e m , n a m e l y ,
t w o o r m o r e t a s k s m a y a t t e m p t t o u s e t h e s a m e s e g m e n t
a t t h e s a m e t i m e , r e s u l t i n g i n a c o l l i s i o n . H o w e v e r ,
i n m u l t l f u n c t l o n p i p e l i n e s e v e n w i t h o u t a n y r e u s a g e , a
c o l l i s i o n m a y o c c u r b e c a u s e o f t w o o r m o r e i n d e p e n d e n t
a n d d i s t i n c t f l o w s o f t a s k s .
I n p r e v i o u s w o r k , t h e c e n t r a l p r o b l e m t r e a t e d i s
t o s c h e d u l e t h e t a s k s i n a g i v e n p i p e l i n e s o a s t o
s c h i e v e h i g h t h r o u g h p u t w i t h o u t c a u s i n g a n y c o l l i s i o n .
T h i s p r o b l e m w a s f i r s t i n v e s t i g a t e d i n [ i ]. S u b s e q u e n t
w o r k o n t h i s p r o b l e m i s r e p o r t e d i n t w o d o c t o r a l
% T h i s r e s e a r c h w a s s u p p o r t e d i n p a r t b y t h e N a t i o n a l
S c i e n c e F o u n d a t i o n u n d e r G r a n t s G J - 3 5 5 8 4 X a n d G J - 4 0 5 8 4
a n d i n p a r t b y t h e J o i n t S e r v i c e s E l e c t r o n i c s P r o g r a m
( U . S . A r m y , U . S .N a v y , a n d U . S . A i r F o r c e ) u n d e r C o n t r a c t
D A A B - 0 7 - 7 2 - 0 2 5 9 .
t h e s e s [ 2 , 3 ] . A n o v e r v i e w o f s o m e r e l a t e d r e s u l t s a nd
a m o r e c o m p r e h e n s i v e b i b l i o g r a p h y c a n b e f o u n d i n [ 4] .
O u r i n v e s t i g a t i o n i s f r o m a d i f f e r e n t p e r s p e c t i v e a n d
s e e k s a m e t h o d o l o g y f o r m o d i f y i n g t h e r e s e r v a t i o n t a b l e
o f a g i v e n p i p e l i n e s o a s t o i n c r e a s e t h e u t i l i z a t i o n
o f s e g m e n t s a n d h e n c e t h e t h r o u g h p u t u n d e r a p p r o p r i a t e
s c h e d u l i n g .
T h e p i p e l i n e u t i l i z a t i o n i s l i m i t e d b y i t s c o l l i -
s i o n c h a r a c t e r i s t i c s w h i c h a r e a r e s u l t o f t h e u s a g e
p a t t e r n s o f th e s eg m e n t s . O n e w a y o f m o d i f y i n g u s a g e
p a t t e r n i s b y s e g m e n t r e p l i c a t i o n. A n o t h e r w a y i s t o
r e m o v e o u r a s s u m p t i o n r e g a r d i n g t h e w a i t i n g o f a t a s k
b e t w e e n t w o s t e p s an d p r o v i d e i n t e r n a l s t o r a g e b u f f e r s
w h i c h a l l o w v a r i a b l e d e l a y b e t w e e n s e g m e n t s [ 4 ]. S t i l l
a n o t h e r w a y o f c h a n g i n g a u s a g e p a t t e r n i s b y i n s e r t -
i n g n o n c o m p u t e s e g m e n t s , w h i c h s i m p l y p r o v i d e a f i x e d
d e l a y b e t w e e n s o m e
c o m p u t a t i o n
s t e p s . I t i s t h e m o d i -
f i c a t i o n o f a p i p e l i n e b y t h e u s e o f n o n c o m p u t e s e g -
m e n t s w h i c h i s t h e c o n c e r n o f t h is p a pe r . I t is a s s u m -
e d t h a t a n y c o m p u t a t i o n s t e p c a n b e d e l a y e d b y i n s e r t -
i n g u s a g e o f a n o n c o m p u t e s e g m e n t , w h e r e e a c h X i n t h e
r e s e r v a t i o n t a b l e i s c o n s i d e r e d t o b e a c o m p u t a t i o n
s t e p .
W e s h a l l f i r s t c o n s i d e r s i n g l e f u n c t i o n p i p e l i n e s
f o r e a s e o f u n d e r s t a n d i n g , s i n c e t h e n o t a t i o n a l c o m -
p l e x i t y o f m u l t i f u n c t i o n P l p e l i n e s i s c o n s i d e r a b l e .
I I. S i n g l e F u n c t i o n P i p e l i n e s
W e s t a r t b y i n v e s t i g a t i n g s o m e c o l l i s i o n c h a r a c -
t e r i s t i c s o f a s i n g l e f u n c t i o n p i p e l i n e ( r e f e r r e d t o
s i m p l y a s p i p e l i n e s i n t h i s a n d t h e f o l l o w i n g s e c t i o n ) .
A u s a g e i n t e r v a l o f a s e g m e n t i s d e f i n e d t o b e a t i m e
i n t e r v a l b e t w e e n t w o r e s e r v a t i o n s ( X 's ) o f t h a t s e g -
m e n t b y a s i n g l e t a s k . F o r e x a m p l e i n F i g . i , a l l
u s a g e i n t e r v a l s o f S a r e 2 , 3 a n d 5 . L e t [ b e t h e
s e t o f a l l u s a g e i n t e r v a l s o f a p i p e l i n e ; e . g . ,
F _ =[ 1 ,2 , 3, 5 ] f o r F i g . i . C l e a r l y a n y t w o t a s k s w i l l
c a u s e a c o l l i s i o n i f a n d o n l y i f t h e y h a v e t h e s a m e
i n i t i a t i o n t i m e i n t e r v a l a s o n e o f t h e u s a g e i n t e r v al s .
A s e q u e n c e o f t a s k i n i t i a t i o n s c a n be c o m p l e t e l y
d e s c r i b e d b y a s e q u e n c e o f i n i t i a t i o n i n t e r v a l s b e -
t w e e n s u c c e s s i v e t a s k s ( a l s o k n o w n a s l a t e n cy ) . F o r
e x a m p l e , t a s k i n i t i a t i o n s a t t i m e i n s t a n t s 0 , 3 , 5, 9
a n d 1 2 c a n b e d e s c r i b e d b y t h e l a t e n c y s e q u e n c e
< 3 , 2 , 4 , 3 > . A n i n i t i a t i o n i n t er v a l o f 0 i s n o t p e r m i s -
s i b l e. L e t ~ b e t h e s e t o f a l l i n i t l a t i o n i n t e r v a l s
( n o t j u s t t h e i n t e r v a l s b e t w e e n s u c c e s s i v e i n i t i a t i o n s )
o f a l a t e n c y s e q u e n c e . T h u s G f o r t h e l a t e n c y s e q u e n c e
< 3 , 2 , 4 , 3 > i s [ 2 , 3 , 4 , 5 , 6 , 7 , 9 , 1 2 } .
I f a s u b s e q u e n c e o f l a t e n c i e s a p p e a r p e r i o d i c a l l y
i n a n i n f i n i t e s e q u e n c e , i t i s t e r m e d a n i n i t i a t i o n
c y c l e . T h u s a c y c l e ( 2 , 3 , 2 , 5 ) i m p l i e s a n i n f i n i t e
i n i t i a t i o n s e q u e n c e < 2 , 3 , 2 , 5 , 2 , 3 , 2 , 5 , 2 , 3 , 2 , 5 , 2 , . . . > . A
c o n s t a n t l a t e n c y c y c l e i s a c y c l e w i t h o n l y o n e l a t e n c y
l a t e n c y ; e . g . , c y c l e ( 4 ). L e t t h e p e r i o d , p , o f a
c y c l e b e d e f i n e d a s t h e s u m o f t h e l a t e n c l e s i n t h e
c y c l e . T h u s t h e p e r i o d p o f c y c l e ( 2 , 3 , 2 , 5 ) i s 1 2 a n d
p o f c y c l e ( 4 ) i s 4 . T h e a v e r a g e l a t e n c y , % a o f a
c y c l e i s t h e a v e r a g e o f t h e l a t e n c i e s o f t h e c y c l e .
F o r e x a m p l e , ~ a f o r c y c l e ( 2 , 3 , 2 , 5 ) i s 1 2 / 4 = 3 . T h i s
i m p l i e s a n a v e r a g e i n i t i a t i o n r a t e o f o n e t a s k e v e r y
3 t i m e u n i t s .
T h e i n i t i a t i o n i n t e r v a l s e t G o f a c y c l e i s s i m p l y
t h e s e t G o f t h e i n f i n i t e i n i t i a t i o n s e q u e n c e i m p l i e d
b y t h e c y c l e . T h u s G = [ 4 , 8 , 1 2 , 1 6 , 2 0 . . . ] f o r c y c l e ( 4 )
a n d f o r c y c l e ( 2 , 3 ,2 7 5 ) G i s { 2 , 3 , 5 , 7 , 9 , 1 0 , 1 2 , 1 4 , 1 5 ,
1 7 , 1 9 , 2 1 , 2 2 , 2 4 , 2 6 , . . . } . - - Le t G m o d p b e t h e s e t f o r m e d
159
-
8/10/2019 Janak Patel
2/6
b y t a k i n g m o d u l o p e q u i v a l e n t s b e t w e e n 0 a n d ( p -l ) o f
t h e e l e m e n t s o f ~ . F o r c y c l e ( 2 , 3 , 2 , 5 ) w i t h p = 1 2 ,
m o d 1 2 = [ 0 , 2 , 3 , 5 , 7 , 9 , 1 0 3 a n d f o r c o n s t a n t c y c l e ( 4)
w i t h p c 4 ~ m o d 4 = [ 0 } . I t c a n b e s h o w n t h a t ~ a n d
G m o d p o f a c y c l e h a v e t h e f o l l o w i n g s i m p l e p r o p e r t i e s ,
r e m e m b e r i n g t h a t 0 is n o t a p e r m i s s i b l e i n i t i a t i o n
i n t e r v a l .
P l . a . i f g # O t h e n g 6 ~ m o d p = > g + i p 6 ~ V i > _ 0
b . 0 6 ~ m o d p a n d i p E ~ V i > _ l a l w a y s .
P 2 . i f g # 0 t h e n g 6 ~ m o d p < = > ( p - g ) E ~ m o d p .
I t i s u s e f u l t o i n t r o d u c e t h e s e t H , t h e c o m p l e -
m e n t s e t o f G i n Z + ~ t h e s e t o f p o s i t i v e i n t e g e r s .
C l e a r l y _ H m o d p = Z p - G m o d p . W h e r e - ?Z i s t h e s e t o f
i n t e g e r s m o d u l o p. T h e n t h e f o l l o w i n g is a d i r e c t
c o n s e q u e n c e o f P 2.
P 3 . h 6 ~ m o d p < = > ( p - h ) 6 ~ m o d p .
A n i n i t i a t i o n i n t e r v a l b e t w e e n t w o t a s k s i s s a i d
t o b e a l l o w a b l e w i t h r e s p e c t t o a p i p e l i n e i f t h e s e
t a s k s d o n o t c o l l i d e i n t h e p i p e l i n e . A c y c l e i s a l -
l o w a b l e w i t h r e s p e c t t o a p i p e l i n e i f a l l i t s i n i t i a -
t i o n i n t e r v a l s a r e a l l o w a b l e . C o n v e r s e l y , w e a l s o s a y
t h a t a u s a g e i n t e r v a l o r a p i p e l i n e i s a l l o w a b l e w i t h
r e s p e c t t o a c y c l e i f n o c o l l i s i o n o c c u r s . A c o l l i s i o n
o c c u r s i n a p i p e l i n e w h e n a c y c l e i s f o l l o w e d i f f ( i f
a n d o n l y i f ) s o m e i n i t i a t i o n i n t e r v a l o f t h e c y c l e
e q u a l s a u s a g e i n t e r v a l o f t he p i p el i n e . T h u s a c y c l e
i s a l l o w e d b y a p i p e l i n e i f f t h e r e a r e n o e l e m e n t s c o m -
m o n b e t w e e n t h e u s a g e i n t e r v a l s e t , F , o f t he p i p e l i n e
a n d t h e i n i t i a t i o n i n t e r v a l s e t , G , o f t h e c y c l e ; i . e . ,
i f f F A G = ~ , o r e q u i v a l e n t l y , i f f F c H . T h u s H , t h e
c o m p l e m e n t s e t o f G c a n b e d e s c r i b e d a s t h e s e t o f a l -
l o w a b l e u s a g e i n t e r v a l s w i t h r e s p e c t t o t h e g i v e n c y c l e.
B y u s i n g t h e p r o p e r t y P I o f ~ , t h e a l l o w a b i l i t y c o n -
d i t i o n c a n b e r e d u c e d t o t h e f o l l o w i n g t h e o r e m .
T h e o r e m i : A c y c l e w i t h p e r i o d p a n d i n i t i a t i o n
i n t e r v a l s e t G is a l l o w e d b y a p i p e l i n e w i t h u s a g e
i n t e r v a l s e t ~ , i f f ( E m o d p ) n (G m o d p ) = . []
A c o n s t a n t l a t e n c y c y c l e ( % ) h a s p = ~ . I t s
m o d p i s a l w a y s [ 0 3 a n d h e n c e t h e f o l l o w i n g .
C o r o l l a r y i . i : A c o n s t a n t c y c l e ( ~ ) i s a l l o w e d b y a
p i p e l i n e i f f n o u s a g e i n t e r v a l i s a n i n t e g r a l m u l t i p l e
o f ~ .
I t i s h e l p f u l t o l o o k a t t h e a l l o w a b l e u s a g e i n -
t e r v a l s e t H to s e e w h a t a l l o w a b l e p i p e l i n e s c a n b e
c o n s t r u c t e d f o r a g i v e n c y c l e . L e t a r o w w h i c h h a s a n
X i n e a c h o f c o l u m n s t l , t 2 , . . . t k b e d e n o t e d a s r o w
[ t l t 2 . . . t k 3 ; e . g . , t h e 2 n d r o w o f F i g . 1 i s r o w [ i ,
2 , 4 } , A p i p e l i n e i s a l l o w e d b y a c y c l e i f a l l i t s r o w s
a r e al l o w e d . T o c o n s t r u c t a n a l l o w a b l e r o w w e c a n
s t a r t b y p l a c i n g a n X i n s o m e c o l u m n i . W e c a n p l a c e
a n o t h e r X i n s o m e c o l u m n j , o n l y i f t h e u s a g e i n t e r v a l
l J k
6 ~, and so on.
H o w e v e r , i t is c o n v e n i e n t t o r e s t r i c t t h e c o l u m n
n u m b e r s t o b e b e t w e e n 0 a n d ( p -l ) , a n d s t i l l r e t a i n a l l
t h e u s e f u l i n f o r m a t i o n . F o r t h i s , l e t u s d e f i n e t w o
e l e m e n t s i , j ~ Z , t o b e c o m p a t i b l e i f l i - j l ~ m e d p
T h e u s e o f t h e a b s o l u t e q u a n t i t y c a n b e a v o i d e d b y
u s i n g p r o p e r t y P 3 o f H m u d p . T h u s w e h a v e t h e f o l l o w -
i n g l e n m m .
L e m m a 2 . 1 : T w o i n t e g e r s i , j 6 % a r e c o m p a t i b l e i f f
(i-j) sod p 6 ~ mod p. []
U s i n g t h e d e f i n i t i o n o f c o m p a t i b i l i t y o r t h e a b o v e
l en ~n a w e c a n f o r m a l l t h e c o m p a t i b i l i t y c l a s s e s o n t h e
e l e m e n t s o f % , g i v e n a c y c l e . A c o m p a t i b i l i t y c l a s s
i s o ne i n w h i c h e a c h e l e m e n t i s c o m p a t i b l e w i t h e v e r y
o t h e r e l e m e n t i n t h e c l a s s. W e n e e d
t o
f o r m o n l y t h e
16
m a x i m a l c o m p a t i b i l i t y c l a s s e s . A m a x i m a l c o m p a t i b i l i t y
c l a s s i s no t a s u b s e t o f a n y o t h e r c o m p a t i b i l i t y c l a s s .
I f [ Z l, Z 2 , . . . Z k } i s a c o m p a t i b i l i t y c l a s s w i t h
r e s p e c t t o s o m e c y c l e t h e n t h e r o w [ Z l , Z 2 , . . . Z k ] i s a l-
l o w e d b y t h at c y c l e. T h i s i s b e c a u s e b y t he d e f i n i t i o n
o f c o m p a t i b i l i t y a l l u s a g e i n t e r v a l s ] z i- z jl a r e a l -
l o w a b le . I n t h i s w a y w e c a n p r o d u c e o n l y a l i m i t e d
n u m b e r o f a l l o w a b l e r o w s . H o w e v e r , w i t h t h e u s e o f '
p r o p e r t y P 3 a n d L e m m 2 . 1 i t i s p o s s i b l e t o c o n s t r u c t
o t h e r a l l o w a b l e r o w s a s f o l l o w s .
T h e o r e m 2 : G i v e n a c y c l e w i t h p e r i o d p , t h e f o l l o w i n g
r o w s , a n d o n l y t h o s e r o w s , a r e a l l o w e d b y t h e c y c l e :
r o w [ z l + i l P , z 2 + i 2 P , . . . } V i n t e g e r s
i l , i 2 , . . .
a n d V c o m p a t i b i l i t y c l a s s e s [ Z l , Z 2 , . . . } o f
the cycle . []
C o n s i d e r a p r o b l e m i n w h i c h a p i p e l i n e , c h a r a c t e r -
i z e d b y i t s u s a g e i n t e r v a l s e t , i s g i v e n a n d o n e h a s
c o m p l e t e f r e e d o m i n c h o o s i n g a n a l l o w a b l e i n i t i a t i o n
s e q u e n c e . B o u n d s o n t h e m i n i m u m a v e r a g e l a t e n c y o f
s u c h s e q u e n c e s a n d a b r a n c h - a n d - b o u n d a l g o r i t h m t o
d i s c o v e r a m i n i m u m a v e r a g e l a t e n c y a l l o w a b l e c y c l e a r e
r e p o r t e d i n [i ] a n d [ 4] . M i n i m u m a v e r a g e l a t e n c y
c y c l e s m a x i m i z e s e g m e n t u t i l i z a t i o n , w h e r e u t i l i z a t i o n
i s m e a s u r e d a s t h e p e r c e n t o f t i m e t h e s e g m e n t r e m a i n s
b u s y .
H e r e w e c o n s i d e r t h e r e v e r s e p r o b l e m. N a m e l y , a
c y c l e i s g i v e n a n d o n e h a s c o m p l e t e f r e e d o m i n c h o o s -
i n g a n y a l l o w a b l e u s a g e p at t e r n . W h i l e t h e s o l u t i o n
t o t h e f o r m e r p r o b l e m i s u s e f u l f o r s c h e d u l i n g a g i v e n
p i p e l i n e , t h e s o l u t i o n t o t h i s p r o b l e m i s u s e f u l f o r
d e s i g n i n g a p i p e l i n e f o r a g i v e n s c h e d u le . T h e o r e m 2
c o m p l e t e l y c h a r a c t e r i z e s t h e e n t i r e c l a s s o f a l l o w a b l e
p i p e l i n e s . W e s h a l l s o o n s e e t h a t i t i s p o s s i b l e t o
p u t a n u p p e r b o u n d o n s e g m e n t u t i l i z a t i o n w i t h t h e
h e l p o f t h e c o m p a t i b i l i t y c l a s s e s . T o a c h i e v e m a x i m u m
u t i l i z a t i o n o f a s e g m e n t f o r a g i v e n c y c l e , w e m u s t
i n c r e a s e t h e n u m b e r o f u s a g e s p e r t a s k ; i . e . , i n c r e a s e
t h e n u m b e r o f X ' s i n a r o w. T h e o r e m 2 g i v e s a l l p o s-
s i b l e a l l o w a b l e r o w s a n d i t i m p l i e s t h a t t h e m a x i m u m
n u m b e r o f X ' s i n a n y a l l o w a b l e r o w i s e q u a l t o t h e
s i z e o f t h e l a r g e s t c o m p a t i b i l i t y c l a s s . T h u s t he
m a x i m u m a c h i e v a b l e u t i l i z a t i o n o f a s e g m e n t w i t h
r e s p e c t t o a g i v e n c y c l e i s t h e r a t i o o f t h e s i z e o f
t h e l a r g e s t c o m p a t i b i l i t y c l a s s t o t h e a v e r a g e l a t e n c y
o f t h e c y c l e .
E x a m p l e i : F o r c y c l e ( 1 , 9 ) , p = 1 0 , a v e r a g e l a t e n c y
= 5 , G m o d I 0 = [ 0 , 1 , 9 } a n d h e n c e H m o d i 0 = [ 2 , 3 , 4 ,
a
5 , 6 , 7 , 8 } . T h e m a x i m a l c o m p a t i b i l i t y c l a s s e s c o n t a i n -
i n g 0 a r e [ 0 , 2 , 4 , 6 , 8 } , [ 0 , 2 , 4 , 7 } , [ 0 , 2 , 5 , 7 } , [ 0 , 3 , 5 , 7 } ,
[ 0 , 2 , 5 , 8 } , [ 0 , 3 , 5 , 8 3 , a n d [ 0 , 3 , 6 , 8 } o f w h i c h t h e l a r g -
e s t h a s s i z e e q u a l t o 5 . N o t e t h a t c l a s s e s c o n t a i n i n g
0 ar e s u f f i c i e n t t o c h a r a c t e r i z e a l l c l a s s e s s i n c e a
c o n s t a n t m a y b e a d d e d m o d u l o p t o a l l e l e m e n t s o f a
c o m p a t i b i l i t y c l a s s t o p r o d u c e a n o t h e r c o m p a t i b i l i t y
c l a s s . T h u s b y T h e o r e m 2 , n o a l l o w a b l e r ,~ w h a s m o r e
t h a n 5 X ' s . T h i s i m p l i e s t ha t t h e m a x i m u m p o s s i b l e
s e g m e n t u t i l i z a t i o n w i t h c y c l e (1 , 9) i s 5 / 5 = 1 0 0 % . O
E x a m p l e 2 : F o r c y c l e ( 2 , 3 , 7 ) , p = 1 2 , ~ a = 1 2 ~ 3 = 4 ,
m o d 1 2 = [ 0 , 2 , 3 , 5 , 7 , 9 , 1 0 } a n d h e n c e H m o d 1 2 = [ 1 , 4 , 6 , 8 ,
i i }. T h e m a x i m a l c o m p a t i b i l i t y c l a s s e s c o n t a i n i n g 0
a r e [ 0 , I } , [ 0 , 4 , 8 } , [ 0 , 6 } , a n d [ 0 , i 1 3 o f w h i c h t h e
l a r g e s t h a s 3 e l e m e n t s . T h u s t h e m a x i m u m n u m b e r o f
X ' s i n a n y a l l o w a b l e r o w i s 3 w h i c h i n t u r n i m p l i e s a
m a x i m u m s e g m e n t u t i l i z a t i o n o f 3 / 4 = 7 5 % . I n o t h e r w o r d s
n o a l l o w a b l e p i p e l i n e f o r c yc l e ( 2 , 3, 7 ) h a s a s e g m e n t
w h i c h i s b u s y m o r e t h a n 7 5 % o f t h e t i m e . []
A m o n g c y c l e s w i t h s a m e ~a ' t h o s e w h i c h a l l o w a
h i g h u t i l i z a t i o n a n d h e n c e m o r e e c o n o mi c al [ r e a l i z a t i o n
a r e c l e a r l y p r e f e r a b l e . F u r t h e r m o r e t h e y o f f e r m o r e
-
8/10/2019 Janak Patel
3/6
f l e x i b i l i t y i n p i p e l i n e d e s i g n . L e t u s d e f i n e a c y c l e
t o b e p e r f e c t, i f i t a l l o w s a 1 0 0 % s e g m e n t u t i l i z a t i o n ;
e . g . , c y c l e ( 1 , 9 ) o f E x a m p l e i . U n f o r t u n a t e l y w e c a n -
n o t t e s t t h e p e r f e c t n e s s o f a c y c l e w i t h o u t f o r m i n g
t h e c o m p a t i b i l i t y c l a s s e s . H o w e v e r , w e k n o w a s p e ci a l
c l a s s o f p e r f e c t c y c l e s w h i c h a r e o f c o n s i d e r a b l e
i n t e r e s t i n s i n g l e f u n c t i o n p i p e l i n e s .
T h e o r e m 3 : A l l c o n s t a n t l a t e n c y c yc l e s a r e p e r f e c t .
P r o o f : F o r c o n s t a n t c y c l e ( ~ ) , G m o d p = [ 0 } a n d t h u s
m o d p = [ l , 2 . . . ( ~ - l ) } . O n e c a n v e r i f y t h a t [ 0 , 1 , 2 . . .. .
( ~ -i ) } i s a c o m p a t i b i l i t y c l a s s w i t h ~ e l e m e n t s . H e n c e
t h e u p p e r b o u n d o n t h e s e g m e n t u t i l i z a t i o n i s
~
=
I 0 0 . D
I I I. N o n c o m p u t e S e s m e n t s
I n t h is s e c t i o n w e c o n s i d e r t h e a d d i t i o n o f n o n -
c o m p u t e s e g m e n t s t o a p i p e l i n e t o m a k e i t a l l o w a b l e f o r
a g i v e n c y c le . T h e ef f e c t o f d e l a y i n g s o m e c o m p u t a t i o n
s t e p c a n b e d i s p l a y e d i n a r e s e r v a t i o n t a b l e b y w r i t -
i n g a ' d ' b e f o r e t h e X w h i c h i s b e i n g d e l a y e d . E a c h d
i n d i c a t e s o n e u n i t o f d e l a y c a l l e d a n e l e m e n t a l d e l a y .
I n t he a b s e n c e o f a n y o t h e r i n f o r m a t i o n o n p r e c e d e n c e ,
w e m u s t a s s u m e t h a t a ll t h e s t e p s i n a c o l u m n m u s t b e
c o m p l e t e d b e f o r e a n y s t e p s i n t h e n e x t c o l u m n a r e
e x e c u t e d . T h e r e f o r e , i f t h e s t e p s i n c o l u m n 2 o f F i g .
i a r e u n e v e n l y d e l a y e d , w e m u s t s t o r e t h e o u t p u t o f
s o m e s t e p s s o t h a t a l l t h e o u t pu t s a r e s i m u l t a n e o u s l y
a v a i l a b l e t o t h e s t e p s i n c o l u m n 3 o f F ig . I . T h e
e f f e c t o f d e l a y i n g t h e s t e p i n r o w 0 , c o l u m n 2 ( X 0 2 )
o f F i g . i b y 2 u n i t s a n d X 2 2 b y i u n i t i s s h o w n i n
F i g . 2 . T h e e l e m e n t a l i n p u t d e l a y s d l , d 2 , a n d d 3
r e q u i r e t h e e l e m e n t a l o u t p u t d e l a y s d 4 , d 5 , a n d d 6 .
N o w g i v e n s o m e i n t e g e r i b e t w e e n 0 a n d ( p - l ) , w e a r e
i n a p o s i t i o n t o d e l a y a n y s t e p a r b i t r a r i l y s u c h t h a t
t h e s t e p o c c u r s i n a c o l u m n n u m b e r e q u i v a l e n t t o i
m o d u l o p . T h u s g i v e n a c y c l e , w e c a n m a k e a n y r o w o f
a g i v e n r e s e r v a t i o n t a b l e t o l o o k l i k e o n e o f t h e r o w s
o f T h e o r e m 2 ; p r o v i d e d o f c o u r s e , t h e r o w d o e s n o t
h a v e m o r e X ' s t h a n t h e s i z e o f t h e l a r g e s t c o m p a t i b i l -
i t y c l a s s o f t h e c y c l e. H e n c e w e h a v e t h e f o l l o w i n g
t h e o r e m .
T h e o r e m 4 : F o r a g i v e n c y c l e , a p i p e l i n e c a n b e m a d e
a l l o w a b l e b y d e l a y i n g s o m e o f t h e s t ep s , i f f t he
n u m b e r o f X ' s i n e a c h r o w o f t h e r e s e r v a t i o n t a b l e i s
l e s s t h a n o r e q u a l t o t h e s i z e o f t h e l a r g e s t c o m p a t i -
b i l i t y c l a s s o f t h e c y c l e . []
C o r o l l a r y 4 . 1 : F o r a g i v e n c o n s t a n t l a t e n c y c y c l e ( $ ),
a p i p e l i n e c a n b e m a d e a l l o w a b l e b y d e l a y i n g s o m e s t e p s ,
i f f t h e r e a r e n o m o r e t h a n % X ' s i n e a c h r o w o f t h e
table. []
A n i m p o r t a n t i m p l i c a t i o n o f C o r o l l a r y 4 . 1 i s t h at
b y a d d i n g e l e m e n t a l d e l a y s t o a p i p e l i n e o n e c a n a l w a y s
f u l l y u t i l i z e a s i n g l e f u n c t i o n p i p e l i n e w i t h t h e u s e
o f a c y cl e w i t h c o n s t a n t l a t e n c y e q u a l t o t h e m a x i m u m
n u m b e r o f X ' s o c c u r r i n g i n a n y s i n g l e r o w o f t h e r e s e r -
v a t i o n t a b le . F u l l u t i l i z a t i o n o f a p i p e l i n e h e r e ,
m e a n s t h a t a t l e a s t o n e s e g m e n t i s b u s y a l l t h e l i m e .
T h u s t h e m a x i m u m a c h i e v a b l e t h r o u g h p u t o f
t h a t
p i p e -
l i n e i s a t t a i n e d . O f c o u r s e c o m p l e t e r e d e s i g n o r
r e p l i c a t i o n o f s e l e c t e d s e g m e n t s t o r e d u c e t h e n u m b e r
o f X ' s i n a r o w m a y a l l o w h i g h e r t h r o u g h p u t .
E x a m p l e 3 : T h e r e s e r v a t i o n t a b l e o f Fi g . i i s t o b e
m a d e a l l o w a b l e w i t h r e s p e c t t o c y c l e ( 1 ,5 ) . T h e r e -
s u i t i n g t a b l e a p p e a r s i n Fi g . 3. F o r c y c l e ( 1 , 5 ) ,
p = 6 , ~ m o d 6 = [ 0 , 1 , 5 } a n d h e n c e H m o d 6 = [ 2 , 3 , 4 } . T h e
m a x i m a l c o m p a t i b i l i t y c l a s s e s c o n t a i n i n g 0 a r e :
[ 0 , 2 , 4 } a n d [ 0 , 3 3 . T h e f i r s t r o w o f F i g . 3 i s r o w
[ 0 , 2 , 1 0 3 , w h i c h r e s u l t e d f r o m th e c l a s s [ 0 , 2 , 4 } b y
c o n s t r u c t i n g r o w [ 0 , 2 , 4 + p 3 a s p e r T h e o r e m 2 . T h e
s e c o n d r o w , [ 1 , 3 , 5 } r e s u l t s f r o m c l a s s [ 0 , 2 , 4 } a n d t h e
t h i r d r o w , [ 2 , 4 } r e s u l t s f r o m c l a s s [ 2 , 4 3 c [ 0 , 2 , 4 3 .
161
T h u s a l l t h e r o w s a r e a l l o w a b l e . []
O n c e w e h a v e a m o d i f i e d t a b l e , w e n e e d t o a s s i g n
t h e e l e m e n t a l d e l a y s t o n o n c o m p u t e s e g m e n t s . N o n c o m -
p u r e s e g m e n t s a r e p h y s i c a l r e s o u r c e s l l k e a n y o t h e r
s e g m e n t a n d m a y b e s h a r e d b y v a r i o u s e l e m e n t a l d e l a y s
f o r t h e i r e f f i c i e n t u t i l i z a t i o n . T w o e l e m e n t a l d e l a y s
and d. are de fin ed to be com pat ibl e i f ..Iti-tjl
d i
3
m o d p 6 ~ m o d p . W h e r e t i a n d t j a r e l a b e l s o f t h e
c o l u m n s i n w h i c h d i a n d d . a p p e a r . C l e a r l y , i f d i a n d
3
d j a r e c o m p a t i b l e , t h e y c a n s h a r e o n e n o n c o m p u t e s e g m e n t
b e c a u s e t h e u s a g e i n t e r v a l I t i -t j l i s a l l o w a b l e . U s i n g
t h e a b o v e d e f i n i t i o n w e c a n f o r m t h e m a x i m a l c o m p a t i b i l -
i t y c l a s s e s o f a l l t h e e l e m e n t a l d e l a y s p r e s e n t i n t h e
s o l u t i on . A l l t h e e l e m e n t s o f a c o m p a t i b i l i t y c l a s s
c a n s h a re a s i n g l e n o n c o m p u t e s e g m en t . N o w t h e p r o b l e m
r e d u c e s t o t h e s t a n d a r d c o v e r i n g p r o b l em ; i . e ., f i n d i n g
t h e m i n i m u m n u m b e r o f c o m p a t i b i l i t y c l a s s e s w h i c h c o v e r
a l l t h e e l e m e n t a l d e l a y s .
E x a m p l e 4 : T h e s e t o f e l e m e n t a l d e l a y s o f F i g . 3 is
< d l , d 2 , d 3 , d 4 , d 5 , d 6, d ~ . T h e i r c o r r e s p on d i n g c o lu m n
n u m b e r s a r e < 3 , 6 , 7 , 8 , 9 , 2 , 3 > . F o r c yc l e ( 1 ,5 ) , H m o d 6
i s [ 2 , 3 , 4 3 ( f r o m E x . 3 ) . T h u s [ d l , d 2 3 , { d l , d 3 } , [ d ,
d 4 3 , [ d 2 , d 5 } , [ d 2 , d 6 3 , [ d m , d 7 } , [ d B , d 5 } , [ d 3 , d 7 3 a r e
t h e m a x i m a l c o m p a t i b i l i t y c l a s s es . N o t i n g t h a t t h e
s u b s e t s o f m a x i m a l c o m p a t i b i l i t y c l a s s e s a r e c o m p a t i -
b i l i t y c l a s s e s , o n e o f m a n y p o s s i b l e m i n i m a l c o v e r s i s
[ d l , d 2 } , [ d 4 } , [ d 5 } , [ d 6 } , [ d 3 , d T } . T h u s 5 n o n c o m p u t e
s e g m e n t s a r e r e q u i r e d . T h e a s s i g n e m e n t a b o v e i s s h o w n
i n F i g . 4 , w h e r e S t h r o u g h S 7 a r e n o n c o m p u t e s e g m e n t s ~
B e s i d e s r e d u c i n g t h e n u m b e r o f n o n c o m p u t e s e g m e n t s
i n a s o l u t i o n , i t i s a l s o i m p o r t a n t t o r e d u c e t h e a d d e d
e x e c u t i o n d e l a y . T h e e x e c u t i o n d e l a y of a t a s k i n F i g .
i is 6 u n i t s w h i l e i n t h e m o d i f i e d t a b l e o f F i g . 4 i t
i s ii u n i t s . I n s i t u a t i o n s w h e r e i t o f t e n b e c o me s
n e c e s s a r y t o e m p t y t h e p i p e l i n e; e . g . , d u e t o l o g i c a l
d e p e n d e n c i e s a m o n g t a s k s , t h e e x e c u t i o n d e l a y o f a t a s k
c a n b e c o m e a n i m p o r t a n t p a r a m e t e r i n d e t e r m i n i n g t h e
o v e r a l l t h r o u g hp u t . T h e r e f o r e , w e sh a l l t a k e t he a d d e d
e x e c u t i o n d e l a y a s t h e o b j e c t i v e f u n c t i o n t o b e m i n i -
m i z e d . N O W t h e p r o b l e m o f m a k i n g a p i p e l i n e a l l o w a b l e
c a n b e f o r m u l a t e d a s f o l l o w s .
L e t I a n d J b e t h e n u m b e r o f r o w s a n d c o l u m n s i n
t h e g i v e n r e s e r v a t i o n t a b l e. L e t d i j a n d d ij b e t h e
n u m b e r o f el e m e n t al d e l a y s t o b e l n s e r t e d r e s p e c ti v e l y
a t t h e i n p u t a n d o u t p u t o f a s t e p X i j o f t h e r e s e r v a t i o n
t a b l e . I f n o X o c c u r s i n c e l l ( i , j ) o f t h e t a b l e t h e n
d t j a n d d [ j a r e d e f i n e d t o b e z e r o . S o m e o t h e r d i j
c a n b e s e t t o z e r o i f i t o c c u r s b e t w e e n t w o c o n s e c u t i v e
c o m p u t a t i o n s t e p s w h i c h a r e i n d i v i s i b l e. L e t D be t he
a d d e d e x e c u t i o n d e l ay . T h e n t h e p r o b l e m c a n b e f o r m a l-
l y s t a t e d a s :
M i n i m i z e D = I ~ m a x ( d ij ~
0 < _ j < J \ 0 < _ i < I
s u b j e c t t o t h e c o n s t r a i n t s ,
i n t e g e r d i j ~ 0 .
6 ~ mod p.
f o r e a c h p a i r < X a b , X a c > w i t h c > b .
w h e r e , H i s th e s e t o f a l l o w a b l e u s a g e i n t e r v a l s w i t h
-
8/10/2019 Janak Patel
4/6
r e s p e c t t o t h e g i v e n c y c l e w i t h p e r i o d p , a n d
d l =
a b m a x ( d i b ) - d a b
0 < _ i < i
T h e c o n s t r a i n t s r e s u l t d i r e c t l y f r o m T h e o r e m i .
T h e t e r m ( c -b ) i s t h e u s a g e i n t e r v a l w h i c h e x i s t e d b e -
t w e e n X a b a n d X a c b e f o r e t h e i n s e r t i o n o f a n y d el a y s .
T h e v a r i a b le d ' i s t h e n u m b e r o f e l e m e n t a l d e l a y s a t
a b
the output o f step Xab; dac is the number at the input
of step Xac. The summation ter m in each constraint is
t h e e f f e c t o f i n s e r t e d d e l a y s i n th e i n t e r v e n i n g
c o l u m n s b e t w e e n X a b a n d X a c.
S i n c e a l l t h e c o n s t r a i n t s a r e i n m o d u l o p a r i t h -
m e t i c , d i i n e e d o n l y t a k e i n t e g e r v a l u e s b e t w e e n 0 an d
(p-l). Thus the soluti on space of the above proble m
is finite. This places an upper bound on the added
execu tion ti me equal to (p-l)-J, where J is the number
of columns in the reser vation table. Moreover, the
o b j e c t i v e f u n c t i o n D i s n o n d e c r e a s i n g i n d i j. T h e s e
p r o p e r t i e s s u g g e s t t h e f o l l o w i n g b r a n c h - a n d - b o u n d
a l g o r i t h m t o f i n d a l l m i n i m u m a d d e d d e l a y s o l u t i o n s .
Let the number of X's in the reservat ion table be
n and let the n variables, dij, be stored in any arbi-
trary order ~n a one dimens ional a rray V. Let D(1)
r e p r e s e n t t h e v a l u e o f t h e o b j e c t i v e f u n c t i o n f o r g i v e n
values of V(1) through V(1), with V(i+l) th rough V(n)
taken to be 0.
A l g o r i t h m B :
BI. [Initialize] i~0; BOUND~(p-I ).J;
B2. [Advance] i~i+l; V(i>-0;
B3. [Check bounds and constraints if (V(i)=p) or
(D(i)>BOUND) then go to 36; if a completely as-
signed constr aint is violat ed the n go to B5;
34. [Soluti on found?] if i0 the n go to 35 else
t e r m i n a t e t h e a l g o r i t h m .
T h e l a s t v a l u e o f B O U N D i s t h e m i n i m u m v a l u e o f
t h e o b j e c t i v e f u n c t i o n o v e r a l l p o s s i b l e s o l u t i o n s a n d
t h e r e f o r e t h e o u t p u t s o l u t i o n s m e e t i n g t h i s b o u n d a r e
a l l t h e m i n i m u m a d d e d d e l a y s o l u ti o n s . I f o n l y o ne
o p t i m u m s o l u t i o n i s d e s i r e d , t h e c o n d i t i o n D ( i ) > B O U N D
i n s t e p B 3 s h o u l d b e c h a n g e d t o D ( i ) > B O U ND .
A c o m p l e t e e x a m p l e w i t h t h e c o n s t r a i n t s a n d t h e
backt rack tree are given in Fig. 5. The variables,
dij , have been re tained in the figure for simplicity.
B is the variab le BOUND, and '>B' indicates that the
bound has been exceeded, and '~' indicates that the
constr aint (a) has been violated.
T h i s a l g o r i t h m i s r e m a r k a b l y e f f i c i e n t i n o u r
limited experience. For ex@mple for one 20 variab le
p r o b l e m w i t h a p o t e n t i a l 1 0 1 4 n od e s o n l y 1 0 4 n o d e s w e r e
e x p a n d e d a n d a n o p t i m u m s o l u t i o n w a s o b t a i n e d i n 4 0
seconds on an IBM 360/67. For a parti cular cla ss of
problems, the technique of [5] may be appli cable to
e s t i m a t e t h e c o m p l e x i t y o f t h e a l go r i t h m .
I V. M u l t l f u n c t i o n P i p e l i n e s
H e r e w e p r e s e n t t h e g e n e r a l i z a t i o n s o f m o s t o f
t h e r e s u l t s a n d d e f i n i t i o n s o f t h e p r e v i o u s t w o
sections. The variables X and Y will be used in most
o f t h e s e r e s u l t s , w h e r e X a n d Y t a k e f u n c t i o n n a m e s a s
their values; the values need not be distinct. Let
~ X Y b e t h e s e t o f u sa g e i n t e r v a l s o f a l l < X , Y > p a i r s
in the reserv ation table. This set can be formed by
t a k i n g a l l p a i r w i s e d i s t a n c e s b e t w e e n a n X a n d a Y
whi ch appe ars to the right of the X in the same row.
For example, for the reservati on ta ble of Fig. 6, the
]62
sets of usage interv als are: FAA=[I], FAB=[0 ,1,2,4],
F_BA--[ ,2, 3], ~BB =[2 ,3}
S i m i l a r l y w e d e f i n e ~ X Y ' t h e s e t o f i n i t i a t i o n
intervals of all pairs of a cycle, to be the set
w h i c h c o n t a i n s a l l i n t e r v a l s o f a t a s k o f t yp e X f r o m
a previo usly i nitiated tas k of type Y. A cycle is
d e s c r i b e d w i t h l a t e n c i e s s u f f i x e d w i t h t h e f u n c t i o n
n a m e o f t h e t a s k b e i n g i n i t i a t e d w i t h
that
latency;
e.g., cycle (IA, B,2A). The period p is the sum of
the latencies. The initia tion interval sets for cycle
(IA, IB,2A) are: ~AA nod 4=[0,I,3]; ~AB nod 4=[2,3];
~ B A n o d 4 = [1 , 2 ] ; ~ B B n o d 4 = [ 0 ] . T h e p r o p e r t i e s P I , P2
and P3 can be generalize d as follows.
Pd.a. if g#0 then g 6 ~X X nod p = g+ip 6 ~XX Vi>__0.
b. 0 6 ~XX nod p and ip 6 ~XX Vi>_l, always.
c. if X#Y then g 6 ~XY nod p= g+ip 6 ~XY Vi>_0.
P5.a. if g#0 then g 6 ~XY mod P(P-g)6 ~yx mod P.
b. 06 ~XY nod p 0 6 ~ X nod p,
P6. if h#0 then h 6 _~y mod p(p-h) E _Hyx mod P,
wher e _KXy mod p is the com plement of ~XY mod p,
in Z .
- p
T h e o r e m 5 : A c y c l e i s a l l o w e d b y a m u l t l f u n c t i o n
pipeli ne iff ([Xy mod p) n ~_~y mod p) = ~, or equiva-
lently iff (~XY nod p) c _HXy nod p, V X,Y in the set
of function names present in the cycle. D
T h e g e n e r a l i z a t i o n o f t h e d e f i n i t i o n o f c o m p a t i -
b i l i t y i s s t r ai g h t f o r w a r d , e x c e p t that e a c h i n t e g e r
m u s t b e s u f f i x e d w i t h a n a p p r o p r i a t e f u n c t i o n n a me .
Thus two elements i and jy, such that i,j 6 ~p and
j>i, are said to be c ompatib le if (j-i) 6 _Hxy mod p.
T h e f o l l o w i n g a r e g e n e r a l i z a t i o n s o f L e ~ m m 2 . 1 a n d
T h e o r e m 2 .
.Len~na 6.1: Two elemen ts i and jy such
that
i,j 6 -'PZ
D
are co mpatib le iff (j-i) mod p 6 _Hxy mod P.
T h e o r e m 6 : G i v e n a c y c l e w i t h p e r i o d p , a ll p o s s i b l e
r o w s w h i c h a r e a l l o w e d b y t h e c y c l e a r e :
row [ (i+ilP)x, (j+jlp)y,...] V nonne gativ e
integers il,i2,Jl, J2... and V compa tibil ity
clas ses [ix,J y,... ]. []
T h e m a x i m a l c o m p a t i b i l i t y c l a s s e s c a n b e f o r m e d
in a manne r si milar to the one for single fu nction
p i p e l i n e s . A s a n e x a m p l e t a k e a g a i n t h e c y c l e
(IA, IB,2A) whos e G sets were formed earlier. The al-
l o w a b l e u s a g e i n t e r v a l s et s a re : ~ A m o d 4 =[ 2 ] ;
~AB nod 4=[0,1]; --~A meg 4=[0'3]; --~B nod 4-[1,2,3}.
T h e m a x i m a l c o m p a t i b i l i t y c l a s s e s c o n t a i n i n g 0 a r e :
[OA,2A], [0B,IB,2B, 3B], [0A,0B, IB ], [OB,3A,3B]"
A c o m p a t i b i l i t y c l a s s ~ I i s s a i d t o c o v e r a n o t h e r
class ~2 if for each function, the number of elements
o f t h a t f u n c t i o n t y p e i n c l as s ~ i i s g r e a t e r t h a n o r
e q u a l t o th e nu m b e r o f e l em e n t s o f t h e s a ~ f u n c t i o n
t y p e in class C_2. I n t h e a b o v e e x a mp l e , [ % , 0 B , I B ]
and [0B,3A,3B} cover each other. The same defi nitio n
f o r c o v e r a p p l i e s a m o n g r o w s a n d a l s o b e t w e e n a r o w
a n d a c o m p a t i b i l i t y c l as s . N o w w e h a v e t he g e n e r a l -
i z a t i o n o f T h e o r e m 4 .
-
8/10/2019 Janak Patel
5/6
T h e o r e m 7 : F o r a cy c l e , a m u l t i f u n c t l o n p i p e l i n e c a n
b e m a d e a l l o w a b l e b y d e l a y i n g s o m e c o m p u t a t i o n s t e p s
i f f e a c h r o w o f t h e r e s e r v a t i o n t a b l e i s c o v e r e d b y a t
l e a s t o n e c o m p a t i b i l i t y c l a s s o f t h e c y c l e. D
N o w i t i s a s i m p l e m a t t e r t o f o r m u l a t e t h e p r o b l e m
o f m a k i n g a p i p e l i n e a l l o wa b l e . I n a m u l t i f u n c t i o n
p i p e l i n e d i f f e r e n t f u n c t i o n s h a v e d i f f e r e n t e x e c u t i o n
t i m e s . L e t D ( X ) b e th e a d d e d e x e c u t i o n d e l a y t o
f u n c t i o n X . T h e o b j e c t i v e f u n c t i o n c a n b e a n y f u n c t i o n
o f t h e D ( X )' s , w h i c h i s n o n d e c r e a s i n g i n e a c h D (X ) ;
e . g . , s o m e l i n e a r c o m b i n a t i o n o f D ( X ) ' s w i t h p o s i t i v e
c o e f f i c i e n t s . L e t di j ( X ) b e t h e n u m b e r o f e l e m e n t a l
d e l a y s t o b e i n s e r t e d a t t h e i n p u t o f a s t e p o f f u n c t i o n
n a m e X i n c e l l ( i , j ). L e t I a n d J b e t h e n u m b e r o f
t o w s a n d c o l u m n s i n t h e r e s e r v a t i o n t a b le . T h e a d d e d
e x e c u t i o n d e l a y f o r a f u n c t i o n X c a n b e e x p r e s s e d a s
o x , - z o < .X
O < _ ~ < J _ i < I
W h i l e t h e c o n s t r a i n t s c a n b e w r i t t e n f r o m T h e o r e m 5 ,
t h e u s a g e i n t e r v a l b e t w e e n X a b a n d Y a c c a n b e e x p r e s s -
e d a s : [ ( t h e d i s t a n c e o f Y f r o m c o l u m n 0 ) - ( d i s t a n c e
a c
o f X f r o m c o l u m n 0 ) ]. T h u s w e h a v e t h e f o l l o w i n g
a c
s e t o f c o n s t r a i n t s .
I n t e g e r ~ j ( X ) >__ 0
\
a n d [ ( ~ . ~ m a x
O
-
8/10/2019 Janak Patel
6/6
S o
I
2
S s
4
5
6
7
o i
X
X
2 3
X
X
X
X
X
X
F i g u r e 4 .
4 ,5 6 7 8 9 10
i
X
X
X
X
X
X
F P - 4 6 8 7
A s s i g n m e n t o f e l e m e n t a l
d e l a y s t o n o n c o m p u t e s e g m e n t s
d,}
{ B > B do 2 > B
> B B
O p t i m u m s o l u t i o n s a r e : I . d 0 0 = d l 0 = d l l = 0 . d 0 2 = i .
2 . d 0 0 = d l l = d 0 2 = 0 . d l 0 = I .
F i g u r e 5 . M a k i n g t h e p i p e l i n e a l l o w a b l e f o r c y c l e ( 2 ) :
A b r a n c h - a n d - b o u n d s e a r c h f o r o p t i m u m s o l u t i o n s .
1 6 4