Realtss_ a Real-time Scheduling Simulator

Embed Size (px)

Citation preview

  • 8/6/2019 Realtss_ a Real-time Scheduling Simulator

    1/4

    2 0 0 7 4 t h I n t e r n a t i o n a l C o n f e r e n c e o n E l e c t r i c a l a n d E l e c t r o n i c s E n g i n e e r i n g ( I C E E E 2 0 0 7 )IJ u J

    R e a l t s s : a r e a l - t i m e s c h e d u l i n g s i m u l a t o rA r n o l d o D i a z , R u b e n B a t i s t a a n d O s k a r d i e C a s t r o

    D e p a r t m e n t o f C o m p u t e r S y s t e m sI n s t i t u t o T e cn o l 6 g i co d e M e x i c a l i , M 6 x i c o

    f a d i a z , r b a t i s t a , o c a s t r o j @t m e x i c a l i . e d u . mx

    A b s t r a c t - R ea l - t i m e s c h e d u l i n g t h e o r y h a s s h o w n a n i m p r e s s i v ee v o l u t i o n i n t h e p a s t f e w y e a r s . A s a c o n s e q u e n c e o f t h e i n t e n s i v er e s e a r c h d o n e i n t h i s a r e a a l o t o f new s c h e d u l i n g p o l i c i e s h a db e e n p r o p o s e d t o d a t e . N e v e r t h e l e s s , j u s t a f e w o f s u c h s c h e d u l i n gp o l i c i e s a r e a v a i l a b l e i n e x i s t i n g R e a l - T i m e O p e r a t i n g S y s t e m s( R T O S ) . I n t h i s p a p e r , we d e s c r i b e R e a l t s s , a n o p e n s o u r c e r e a l -t i m e s c h e d u l i n g s i m u l a t o r w h i c h i s s u i t e d t o s i m u l a t e r e a l - t i m es c h e d u l i n g a l g o r i t h m s w i t h o u t t h e n e e d o f i m p l e m e n t t h e m i na RTOS. R e a l t s s i s a n i n va l u a b l e t e a c h i n g a n d r e s e a r c h i n g t o o ls i n c e e x i s t i n g a n d new r e a l - t i m e s c h e d u l i n g p o l i c i e s c a n b e e a s i l ye v a l u a t e d .I n d e x Terms- r e a l - t i m e s c h e d u l i n g , r e a l - t i m e s i m u l a t i o n

    I . INTRODUCTIONR e a l - t i m e s c h e d u l i n g t h e o r y h a s s h o w n a t r a n s i t i o n f r o m c y c l i -c a l e x e c u t i v e b a s e d i n f r a s t r u c t u r e t o a m o r e f l e x i b l e s c h e d u l i n gm o d e l s s u c h a s f i x e d - p r i o r i t y s c h e d u l i n g , d y n a m i c - p r i o r i t ys c h e d u l i n g , s o f t r e a l - t i m e a p p l i c a t i o n s , f e e d b a c k s c h e d u l i n g o re x t e n d e d s c h e d u l i n g [ 2 0 ] . N e v e r t h e l e s s , j u s t a f e w s c h e d u l i n ga l g o r i t h m s h av e b e e n i m p l e m e n t e d i n e x i s t i n g R e a l - T i m eO p e r a t i n g S y s t e m s ( RT O S ) . I n f a c t , r e c e n t s t u d i e s s h o w t h a ta l m o s t e v e r y e x i s t i n g r e a l - t i m e o p e r a t i n g s y s t e m p r o v i d e so n l y P O S I X - c o m p l i a n t f i x e d - p r i o r i t y s c h e d u l i n g [ 1 9 ] s i n c ei t c a n b e e a s i l y i m p l e m e n t e d i n c o m m e r c i a l k e r n e l s , e v e nt h o u g h r e a l - t i m e s y s t e m s a r e c o m m o n l y c o m p o s e d o f h a r da n d s o f t r e a l - t i m e t a s k s a n d i n many c a s e s t h e s e s y s t e m s a r eb e t t e r s c h e d u l e d u s i n g d y n a m i c - p r i o r i t y p o l i c i e s [ 1 ] . A l s o , i t ' sb e e n s h o w n t h a t d y n a m i c - p r i o r i t y s c h e d u l i n g a l l o w s a b e t t e ru t i l i z a t i o n o f s y s t e m r e s o u r c e s [ 6 ] .I n o r d e r t o t e s t a n d e v a l u a t e e x i s t i n g a n d new s c h e d u l i n gp o l i c i e s t h e y c o u l d b e i n t e g r a t e d i n t o a R T O S , b u t i t i s n e c e s -s a r y t o m o d i f y t h e o p e r a t i n g s y s t e m i n t e r n a l s t r u c t u r e , w h i c hr e q u i r e s s p e c i a l p r o g r a m m i n g s k i l l s . F u r t h e r m o r e , m o d i f y i n gt h e o p e r a t i n g s y s t e m i n t e r n a l k e r n e l r e p r e s e n t s a d i f f i c u l t a n dt i m e - c o n s u m i n g t a s k , w h i c h i s o n e o f t h e r e a s o n s w h y s o f e ws c h e d u l i n g p o l i c i e s h a v e b e e n a l r e a d y i m p l e m e n t e d .A n o t h e r a l t e r n a t i v e t o t e s t a n d e v a l u a t e s c h e d u l i n g p o l i c i e s h a db e e n p r o p o s e d r e c e n t l y t h r o u g h a f r a m e w o r k t o i m p l e m e n tnew s c h e d u l i n g a l g o r i t h m s i n t o a R T O S w i t h o u t m o d i f y i n gi t s i n t e r n a l s t r u c t u r e [ 2 ] , [ 9 ] , [ 8 ] . N e v e r t h e l e s s t h i s f r a m e w o r km u s t b e i m p l e m e n t e d i n t h e R T O S , a n d t h e u s e o f i t s APIi m p l i e s t h e u s e o f a d v a n c e d p r o g r a m m i n g t e c h n i q u e s .

    1 - 4 2 4 4 - 1 1 6 6 - 1 / 0 7 / $ 2 5 . 0 0 2 0 0 7 I E E E .

    I n t h i s p a p e r we d e s c r i b e R e a l t s s , a n o p e n s o u r c e r e a l - t i m es c h e d u l i n g s i m u l a t o r w h i c h i s s u i t e d t o s i m u l a t e r e a l - t i m es c h e d u l i n g a l g o r i t h m s w i t h o u t t h e n e e d o f i m p l e m e n t t h e mi n a R T O S . R e a l t s s i s a n i n v a l u a b l e r e s e a r c h i n g t o o l s i n c ee x i s t i n g a n d new r e a l - t i m e s c h e d u l i n g p o l i c i e s c a n b e e a s i l yi m p l e m e n t e d a n d t h e i r p e r f o r m a n c e e v a l u a t e d . F u r t h e r m o r et h e p r o p o s e d s i m u l a t o r c a n b e u s e d a s a t e a c h i n g t o o l s i n c es t u d e n t s c a n l e a r n r e a l - t i m e s c h e d u l i n g w i t h o u t t h e n e e d o fk n o w i n g r e a l - t i m e s y s t e m s p r o g r a m m i n g .T h e r e m a i n d e r o f t h i s p a p e r i s o r g a n i z e d a s f o l l o w s : S e c t i o n2 g i v e s a b r i e f o v e r v i e w o f t h e r e l a t e d w o r k . I n S e c t i o n 3 wes h o w a n d e x p l a i n t h e m a i n c h a r a c t e r i s t i c s o f R e a l t s s . S e c t i o n4 p r e s e n t s a n e x a m p l e o f t h e u s e o f t h e s i m u l a t o r . F i n a l l y ,S e c t i o n s 5 i s f o r c o n c l u s i o n s a n d f u t u r e w o r k .

    I I . RELATED WORKT h e s c h e d u l e r i s a n o p e r a t i n g s y s t e m m o d u l e t h a t i m p l e m e n t sa s e t o f a l g o r i t h m s t o a l l o c a t e r e s o u r c e s a n d t o c o n t r o l a c c e s st o s h a r e d r e s o u r c e s among j o b s [ 1 6 ] . I n a r e a l - t i m e o p e r -a t i n g s y s t e m , t h e s c h e d u l i n g a l g o r i t h m s i m p l e m e n t e d i n t h es c h e d u l e r m u s t g u a r a n t e e t h e a c c o m p l i s h m e n t o f t h e t a s k ' sd e a d l i n e s .T o g u a r a n t e e t h e a c c o m p l i s h m e n t o f t h e r e a l - t i m e s y s t e mt i m i n g c o n s t r a i n t s a l o t o f f e a s i b i l i t y t e s t s h a v e b e e n p r o p o s e d .T h e y c a n b e d i v i d e d i n p o l y n o m i a l t i m e t e s t s a n d e x a c t t e s t s .T h e f i r s t o n e s c a n b e u s e d f o r o n - l i n e g u a r a n t e e o f r e a l -t i m e a p p l i c a t i o n s . H o w e v e r , t h e y p r o v i d e o n l y a s u f f i c i e n ts c h e d u l a b i l i t y c o n d i t i o n , w h i c h may c a u s e a p o o r p r o c e s s o ru t i l i z a t i o n . O n t h e o t h e r h a n d , e x a c t t e s t s p r o v i d e a n e c e s s a r ya n d s u f f i c i e n t s c h e d u l a b i l i t y c o n d i t i o n , b u t a r e t o o c o m p l e x t ob e e x e c u t e d o n l i n e f o r l a r g e t a s k s e t s s i n c e c o m m o n l y t h ec o m p l e x i t y o f t h e s e t e s t s i s p s e u d o p o l y n o m i a l [ 5 ] .O n t h e o t h e r h a n d , t h e p e r f o r m a n c e o f a r e a l - t i m e s y s t e ms c h e d u l i n g a l g o r i t h m c a n a l s o b e e v a l u a t e d t h r o u g h t h e u s e o fe x h a u s t i v e s i m u l a t i o n . Some r e a l - t i m e s c h e d u l i n g s i m u l a t o r sh a v e b e e n p r o p o s e d . I n i t i a l l y , t h e y w e r e b u i l d t o a d d r e s s ap a r t i c u l a r s c h e d u l i n g p r o b l e m o r e x e c u t i o n e n v i r o n m e n t [ 1 5 ] ,[ 2 2 ] , [ 2 3 ] .One o f t h e f i r s t n o t a b l e w o r k s w a s p u b l i s h e d i n [ 3 ] , w h e r eA u d s l e y e t a l . p r o p o s e d a c o l l e c t i o n o f C A S E t o o l s f o r

    1 6 5 I E E E C a t a l o g N u m b e r : 07EX1762CI S B N : 1 - 4 24 4 - 1 1 6 6 - 1L i b r a r y o f C o n g r e s s : 2 0 0 7 9 2 3 3 9 8

  • 8/6/2019 Realtss_ a Real-time Scheduling Simulator

    2/4

    2 0 0 7 4 t h I n t e r n a t i o n a l C o n f e r e n c e o n E l e c t r i c a l a n d E l e c t r o n i c s E n g i n e e r i n g ( I C E E E 2 0 0 7 )2 u I 0

    a n a l y z i n g a n d s i m u l a t i n g t h e b eh a v i o r o f h a r d r e a l - t i m e s a f e t y -c r i t i c a l a p p l i c a t i o n s . T h e p r o p o s e d s i m u l a t o r , c a l l e d S T R E S S ,i n c l u d e d a s i m u l a t i o n l a n g u a g e t o s p e c i f y b o t h t h e s y s t e me n v i r o n m e n t a n d t h e t a s k p a r a m e t e r s . I t i n c l u d e d a g r a p h i c a lf r o n t - e n d f o r c o n t r o l a n d d i s p l a y , s o m e f e a s i b i l i t y t e s t s a n ds u p p o r t f o r m u l t i p r o c e s s i n g a n d n e t w o r k i n g . S i n c e t h e s i m u -l a t o r w a s b u i l t u p o n a s i m u l a t i o n l a n g u a g e , i t i m p o s e d a l i m i ti n t h e s c o p e o f s c h e d u l i ng a l g o r i t h m s t h a t c o u l d b e s i m u l a t e d .De V r o e y e t a l . p r o p o s e d i n [ 7 ] a l a n g u a g e f o r d e f i n i n gs c h e d u l i n g a l g o r i t h m s f o r h a r d r e a l - t i m e s y s t e m s a n d a t o o lt o s i m u l a t e t h e b e h av i o r o f s u c h s y s t e m s o n a p r e d e f i n e d t a s ks e t . T h e i r p r o p o s a l w a s s i m i l a r t o STRESS b u t p r e s e n t e d a ne x t e n d e d l a n g u a g e i n o r d e r a l l o w t h e s i m u l a t i o n o f n e w l yd e v i s e d s c h e d u l i n g p o l i c i e s .Kramp e t a l . p r o p o s e d FORTISSIMO i n [ 1 4 ] . I t w a s a l s o b a s e do n S T R E S S . T h e i r p r o p o s a l w a s n o t a r e a d y - t o - r u n a p p l i c a -t i o n b u t a n o p e n f r a m e w o r k t o f a c i l i t a t e t h e d e v e l o p m e n t o ft a i l o r - m a d e r e a l - t i m e s c h e d u l i n g s i m u l a t o r s f o r m u l t i p r o c e s s o rs y s t e m s . FORTISSIMO w a s n o t a s i m u l a t i o n a p p l i c a t i o n b u tp r o v i d e d a b a s i c i n f r a s t r u c t u r e t o b u i l d a r e a l - t i m e s c h e d u l i n gs i m u l a t o r .I n [ 1 8 ] M a n a c e r o e t a l . p r e s e n t e d a v e r y i n t e r e s t i n g p r o j e c tn a m e d R T S I M , a s e t o f r e a l - t i m e s c h e d u l i n g s i m u l a t o r t o o l sa i m e d p r i m a r i l y t o b e u s e d a s a t e a c h i n g t o o l . I t i s a c o l l e c t i o no f p r o g r a m m i n g l i b r a r i e s w r i t t e n i n C++ f o r s i m u l a t i n g r e a l -t i m e c o n t r o l s y s t e m s . R T S IM i s s t i l l a n a c t i v e p r o j e c t a n d i t sc o d e h a s b e e n r e c e n t l y r e l e a s e d a s o p e n s o u r c e .F i n a l l y , J a k o v l j e v i c e t a l . p r e s e n t e d i n [ 1 2 ] a r e s e a r c h i na p p l i c a t i o n o f o b j e c t - o r i e n t e d l a n g u a g e ( J a v a ) i n d e v e l o p m e n to f r e a l - t i m e s y s t e m s i m u l a t i o n . T h e y d e s c r i b e d a d v a n t a g e sa n d d i s a d v a n t a g e s o f J a v a , a n d g i v e s a c r i t i c a l o v e r v i e w o fn e c e s s a r y m o d i f i c a t i o n s t o m a k e J a v a a n a c c e p t a b l e c h o i c ef o r r e a l - t i m e s y s t e m s .T h e p r o p o s a l s p r e s e n t e d s o f a r r e q u i r e d t h e u s e o f a s p e c i f i cl a n g u a g e t o d e f i n e t h e a t t r i b u t e s o f t h e t a s k s s e t a n d t h es i m u l a t i o n p a r a m e t e r s . I n c o n t r a s t , t h e t o o l p r o p o s e d i n t h i sp a p e r d o e s n o t r e q u i r e d t h e u s e o f a s p e c i f i c l a n g u a g e t o b u i l do r u s e t h e s i m u l a t o r s . I t p r o v i d e s a f r a m e w o r k f o r d e v e l o p i n gr e a l - t i m e s c h e d u l i n g s i m u l a t o r s a n d i t i s n o t l i m i t e d b y a n ys i m u l a t i o n l a n g u a g e . I t i s c o m p o s e d o f a g r a p h i c a l f r o n t - e n d t ou s e t h e s c h e d u l i n g a l g o r i t h m s a n d e v a l u a t e t h e i r p e r f o r m a n c e .I n t h e n e x t s e c t i o n we p r e s e n t t h e a r c h i t e c t u r e o f R e a l t s s .

    I I I . R E A L T S SR e a l t s s i s i n t e n d e d t o b e u s e d t o t e s t a n d e v a l u a t e e x i s t i n g a n dnew s c h e d u l i n g p o l i c i e s . I t h a s b e e n w r i t t e n i n T CL a n d i t i sd i s t r i b u t e d a s o p e n s o u r c e s o f t w a r e . I t s m o d u l a r d e s i g n a l l o w st h e i n t e g r a t i o n o f a d d i t i o n a l s c h e d u l i n g a l g o r i t h m s s e a m l e s s l y .New s c h e d u l i n g a l g o r i t h m s c a n b e a d d e d a s m o d u l e s w r i t t e n i nT C L , C o r C++ a n d i t i s n o t l i m i t e d b y a p a r t i c u l a r s i m u l a t i o nl a n g u a g e . I t c a n b e e x e c u t e d i n many o p e r a t i n g s y s t e m s , s u c ha s L i n u x o r W i n d o w s .F i g u r e 1 s h o w s t h e a r c h i t e c t u r e o f t h e p r o p o s e d t o o l . R e a l t s sh a s a m o d u l a r d e s i g n . T h e F u n c t i o n s m o d u l e i m p l e m e n t s a s e t

    1 6 61 - 4 2 4 4 - 1 1 6 6 - 1 / 0 7 / $ 2 5 . 0 0 2 0 0 7 I E E E .

    F i g . 1 . R e a l t s s A r c h i t e c t u r e

    o f f u n c t i o n s t o w o r k w i t h t h e d e f i n e d t a s k s s e t s . T h e A l g o r i t h mL o a d e r s e a r c h e s a n d l o a d s t h e s c h e d u l i n g s i m u l a t o r s m o d u l e st h a t c o m p l a i n t s w i t h t h e d e f i n i t i o n s o f t h e p r o p o s e d f r a m e -w o r k . T o a d d a new s c h e d u l i n g s i m u l a t o r i s j u s t n e e d e d t of o l l o w a s i m p l e d e f i n i t i o n s g u i d e l i n e s a n d t o a d d t h e m o d u l ei n t o t h e . l a l g o s f o l d e r . T h e s c h e d u l i n g s i m u l a t o r m o d u l e i sc o m p o s e d o f t w o f i l e s . T h e f i r s t o n e i s a . t c l f i l e . I t c o n t a i n s t h es i m u l a t o r i t s e l f a n d i t c a n u s e a n y o f t h e s i m u l a t i o n f u n c t i o n sa l r e a d y a v a i l a b l e i n R e a l t s s . T h e s e c o n d o n e i s a d e f f i l ea n d i t i n c l u d e s t h e a l g o r i t h m d e f i n i t i o n s i n o r d e r t o b e u s e db y R e a l t s s . O n t h e o t h e r h a n d , t h e T e s t s m o d u l e i n c l u d e s t h es c h e d u l a b i l i t y t e s t s f o r t h e s c h e d u l i n g p o l i c i e s i m p l e m e n t e d .New s c h e d u l a b i l i t y t e s t s c a n b e e a s i l y a d d e d . T h e p a r a m e t e r so f t h e t a s k s s e t s c a n b e s a v e d i n a . r t s f i l e i n o r d e r t o b e u s e d i nt h e f u t u r e w i t h a n y o f t h e s c h e d u l i n g a l g o r i t h m s i m p l e m e n t e di n t h e s i m u l a t o r .A f t e r a s i m u l a t i o n r u n , some new f i l e s a r e g e n e r a t e d . One o ft h e m i n c l u d e s t h e s i m u l a t i o n r e s u l t s t o b e s h o w n i n t h e R e a l t s sG r a p h i c a l U s e r I n t e r f a c e . T h e o t h e r o n e i s a . k t r f i l e , w h i c h i nt u r n i s u s e d b y t h e K i w i p r o g r a m . R e a l t s s i s f u l l y i n t e g r a t e dw i t h K i w i [ 1 0 ] , a g r a p h i c a p p l i c a t i o n w h i c h d i s p l a y s t a s k se x e c u t i o n t r a c e l o g s . R e s u l t s o f t h e s i m u l a t i o n s a r e g e n e r a t e di n a k i w i - c o m p a t i b l e f o r m a t i n o r d e r t o b e d i s p l a y e d p r o p e r l yw i t h t h e u s e o f t h i s t o o l . A f t e r t h e s i m u l a t i o n t e s t h a v e b e e ne x e c u t e d , t h e u s e r c a n a n a l y z e t h e b e h a v i o r o f t h e t a s k s s e to n c e i t h a s b e e n s c h e d u l e d w i t h t h e s c h e d u l i n g p o l i c y s e l e c t e d .A n e x e c u t i o n c h r o n o g r a m c a n b e v i s u a l i z e d u s i n g t h e k i w ia p p l i c a t i o n .T h e u s e o f t h e s i m u l a t o r i n v o l v e s t h r e e s t e p s m o s t o f t h e t i m e s :d e f i n i t i o n o f p a r a m e t e r s , s i m u l a t i o n a n d r e s u l t s a n a l y s i s . I n t h ef i r s t s t a g e t h e u s e r d e f i n e s t h e p a r a m e t e r s o f t h e t a s k s s e t . T h ep a r a m e t e r s t h a t c a n b e d e f i n e d a r e p e r i o d , w o r s t - c a s e e x e c u t i o nt i m e , p h a s e a n d d e a d l i n e .T h e r e a l - t i m e s y s t e m t o b e s i m u l a t e d c a n b e c o m p o s e d o f h a r d

    I E E E C a t a l o g N u m b e r : 07EX1762CI S B N : 1 - 4 24 4 - 1 1 6 6 - 1L i b r a r y o f C o n g r e s s : 2 0 0 7 9 2 3 3 9 8

  • 8/6/2019 Realtss_ a Real-time Scheduling Simulator

    3/4

    2 0 0 7 4 t h I n t e r n a t i o n a l C o n f e r e n c e o n E l e c t r i c a l a n d E l e c t r o n i c s E n g i n e e r i n g ( I C E E E 2 0 0 7 )

    F i g . 3 . E x e c u t i o n c h r o n o g r a m d i s p l a y e d u s i n g t h e K i w i a p p l i c a t i o n

    I V . E X A M P L E

    F i g . 2 . R e a l t s s G r a p h i c a l u s e r I n t e r f a c e

    a n d s o f t r e a l - t i m e t a s k s a n d s h a r e d r e s o u r c e s . A d d i t i o n a l l y , i ft h e s c h e d u l i n g p o l i c y i n v o l v e s t h e u s e o f r e s o u r c e s ( m u t e x e s )t h e i r p a r a m e t e r s c a n a l s o b e d e f i n e d a c c o r d i n g l y . F i g u r e 2s h o w s t h e R e a l t s s G U I .We h a v e a l r e a d y i n t e g r a t e d some s c h e d u l i n g a l g o r i t h m s i n t oR e a l t s s :* P O S I X - c o m p l a i n t F i x e d - P r i o r i t i e s [ 1 ]* R a t e M o n o t o n i c ( R M ) [ 1 7 ]* E a r l i e s t D e a d l i n e F i r s t ( E D F ) [ 1 7 ]* D e a d l i n e M o n o t o n i c (DM) [ 1 7 ]. P r i o r i t y I n h e r i t a n c e P r o t o c o l ( P I P ) [ 2 1 ]* P O S I X - c o m p l a i n t v e r s i o n o f t h e P r i o r i t y C e i l i n g P r o t o c o l( P C P ) [ 1 3 ]. S t a ck R e s o u r c e P r o t o c o l ( S R P ) [ 4 ]

    S c h e d u l i n g p o l i c i e s c a n b e s e l e c t e d u s i n g a s e l e c t i o n l i s t . As i m p l e m e c h a n i s m h a s b e e n d e v i s e d t o i n t e g r a t e a d d i t i o n a ls c h e d u l i n g p o l i c i e s i n t o R e a l t s s . New s c h e d u l i n g m o d u l e sb u i l d f o l l o w i n g a s i m p l e g u i d e l i n e s m u s t b e i n a p r o p e rd i r e c t o r y i n o r d e r t o a p p e a r i n t h e s i m u l a t o r ' s s e l e c t i o n l i s t .O n c e t h e p a r a m e t e r s o f t h e t a s k s s e t h a v e b e e n d e f i n e d a n dt h e s c h e d u l i n g p o l i c y h a s b e e n s e l e c t e d , a f e a s i b i l i t y t e s t o r as i m u l a t i o n t e s t c a n b e e x e c u t e d f o r a g i v e n s i m u l a t i o n t i m e .B e s i d e s t h e g r a p h i c a l d a t a d i s p l a y e d , a l o t o f v a l u a b l e i n f o r m a -t i o n i s p r o v i d e d b y R e a l t s s . T h i s i n f o r m a t i on i s v e r y u s e f u l a te v a l u a t i n g t h e p e r f o r m a n c e o f t h e s c h e d u l i n g a l g o r i t h m u s e d .T h e i n f o r m a t i o n p r o v i d e d i n c l u d e s :* P r o c e s s o r u t i l i z a t i o n. R e s p o n s e t i m e. T a s k s w a i t i n g t i m e. D e a d l i n e m i s s e s. O v e r r u n s

    S i n c e t h e p a r a m e t e r s o f t h e t a s k s c a n b e s a v e d i n t o a f i l e ,t h e y c a n b e s i m u l a t e d u s i n g d i f f e r e n t s c h e d u l i n g a l g o r i t h m sa n d t h e i r p e r f o r m a n c e c a n b e e v a l u a t e d .1 6 71 - 4 2 4 4 - 1 1 6 6 - 1 / 0 7 / $ 2 5 . 0 0 2 0 0 7 I E E E .

    F i g u r e 2 s h o w s a r e a l - t i m e s y s t e m c o m p o s e d o f t h r e e h a r dr e a l - t i m e t a s k s . T h e p a r a m e t e r s o f t h e t a s k s u s e d i n t h ee x a m p l e a r e : T i = ( 3 , 1 ) , T 2 = ( 5 , 2 ) a n d T 3 = ( 8 , 1 ) . T h ef i r s t p a r a m e t e r r e p r e s e n t s t h e t a s k ' s p e r i o d a n d t h e s e c o n d o n ei t s w o r s t - e x e c u t i o n t i m e . I n t h e e x a m p l e , t h e s c h e d u l i n g p o l i c yu s e d i s E a r l i e s t D e a d l i n e F i r s t . E DF i s a d y n a m i c s c h e d u l i n gp o l i c y w h e r e t h e t a s k w i t h t h e e a r l i e s t d e a d l i n e h a s t h e h i g h e s tp r i o r i t y . T h e s i m u l a t i o n t i m e u s e d i n t h e e x a m p l e w a s s e t t o2 5 u n i t s . S i m u l a t i o n r e s u l t s a r e s h o w n i n t h e R e a l t s s G U I ,a s i t c a n b e e s e e n i n F i g u r e 2 . O n t h e o t h e r h a n d , F i g u r e 3s h o w s t h e e x e c u t i o n c h r o n o g r a m o f t h e t a s k s s e t s c h e d u l e du s i n g E DF a s d i s p l a y e d b y t h e K i w i a p p l i c a t i o n .R e a l t s s c a n b e u s e d t o e v a l u a t e t h e p e r f o r m a n c e o f a s c h e d u l -i n g a l g o r i t h m a n d t o c o m p a r e d i f f e r e n t s c h e d u l i n g p o l i c i e samong t h e m . I n o r d e r t o i l l u s t r a t e t h e g o o d n e s s o f t h e p r o p o s e dt o o l , t h e t a s k s s e t u s e d i n t h e p r e v i o u s e x a m p l e w a s a l s os c h e d u l e d u s i n g t h e RM a l g o r i t h m . RM i s s t a t i c s c h e d u l i n gp o l i c y w h e r e t h e t a s k w i t h t h e s h o r t e s t p e r i o d h a s t h e h i g h e s tp r i o r i t y . F i g u r e 4 s h o w s t h e s i m u l a t i o n r e s u l t s a n d i t c a n b es e e n t h a t i n t h e s i m u l a t i o n p e r i o d a t a s k m i s s e d i t s d e a d l i n eo n c e . T h i s f a c t c a n a l s o b e v i e w e d g r a p h i c a l l y i n F i g u r e 5 ,w h e r e T 3 d i d n ' t e x e c u t e d i t s f i r s t a c t i v a t i o n a n d c o n s e q u e n t l ym i s s e d i t s d e a d l i n e . T h i s e x a m p l e s h o w s t h a t E D F i s a b l e t os c h e d u l e a t a s k s s e t t h a t RM c a n n o t s c h e d u l e c o r r e c t l y .A s s h o w n i n t h e e x a m p l e , R e a l t s s c a n b e u s e d a s a r e s e a r c ht o o l s i n c e i t a l l o w s t h e e v a l u a t i o n o f t h e p e r f o r m a n c e o fs c h e d u l i n g p o l i c i e s a n d t o c o m p a r e t h e m u s i n g t h e same o rd i f f e r e n t t a s k s s e t s . F u r t h e r m o r e , i t c a n b e u s e d a s a t e a c h i n gt o o l . F o r i n s t a n c e , a s t u d e n t c a n g r a p h i c a l l y v i e w t h e d i f f e r e n c eb e t w e e n a s t a t i c s c h e d u l i n g p o l i c y a g a i n s t a d y n a m i c o n e . I nt h e e x a m p l e d i s c u s s e d i n t h i s s e c t i o n , i t c a n b e s e e n howw h e n u s i n g a s t a t i c s c h e d u l i n g a l g o r i t h m t h e p r i o r i t y o f t a s k sn e v e r c h a n g e . O n t h e o t h e r h a n d , w h e n a d y n a m i c s c h e d u l i n ga l g o r i t h m i s u s e d t h e p r i o r i t i e s o f t a s k s may c h a n g e i n t i m e .T o i l l u s t r a t e i t , i n F i g u r e 5 T i a l w a y s p r e e m p t s T 2 a n d T 3s i n c e t h e p r i o r i t y a s s i g n e d t o T i b y t h e s c h e d u l i n g a l g o r i t h m sn e v e r c h a n g e s ( T i i s a l w a y s t h e m o s t p r i o r i t y t a s k ) . I n c o n t r a s t ,F i g u r e 3 s h o w s how T 2 p r e e m p t s t h e t h i r d a c t i v a t i o n o f T is i n c e w h e n u s i n g d y n a m i c s c h e d u l i n g a l g o r i t h m s t h e p r i o r i t ya s s i g n e d t o e v e r y t a s k may c h a n g e a t a g i v e n s c h e d u l i n g t i m e( T l i s n o t a l w a y s t h e m o s t p r i o r i t y t a s k ) .

    I E E E C a t a l o g N u m b e r : 07EX1762CI S B N : 1 - 4 2 4 4 - 1 1 6 6 - 1L i b r a r y o f C o n g r e s s : 2 0 0 7 9 2 3 3 9 8

  • 8/6/2019 Realtss_ a Real-time Scheduling Simulator

    4/4

    2 0 0 7 4 t h I n t e r n a t i o n a l C o n f e r e n c e o n E l e c t r i c a l a n d E l e c t r o n i c s E n g i n e e r i n g ( I C E E E 2 0 0 7 )

    F i g . 4 . E x a m p l e u s i n g R a t e M o n o t o n i c s c h e d u l i n g p o l i c y

    F i g . 5 . K i w i d i s p l a y o f t h e RM e x a m p l e

    V . CONCLUSIONS A N D FUTURE WORKE v e n t h o u g h a l o t o f s c h ed u l i n g a l g o ri t h m s h a v e b e e n p r o -p o s e d j u s t a f e w o f t h e m a r e a v a i l a b l e t o i m p l e m e n t r e a l -t i m e s y s t e m s a p p l i c a t i o n s . I n o r d e r t o u s e , t e s t a n d e v a l u a t e as c h e d u l i n g p o l i c y i t m u s t b e i n t e g r a t e d i n t o a R e a l - T i m e O p e r -a t i n g S y s t e m , w h i c h i s a c o m p l e x t a s k . S i m u l a t i o n i s a n o t h e ra l t e r n a t i v e t o e v a l u a t e a s c h e d u l i n g p o l i c y . U n f o r t u n a t e l y , j u s ta f e w r e a l - t i m e s c h e d u l i n g s i m u l a t o r s h a v e b e e n d e v e l o p e d t od a t e a n d m o s t o f t h e m r e q u i r e t h e u s e o f a s p e c i f i c s i m u l a t i o nl a n g u a g e .I n t h i s p a p e r we h a v e p r e s e n t e d R e a l t s s , a n o p e n s o u r c e r e a l -t i m e s c h e d u l i n g s i m u l a t o r . R e a l t s s i s a i m e d t o b e u s e d t o t e s ta n d e v a l u a t e e x i s t i n g a n d new r e a l - t i m e s c h e d u l i n g a l g o r i t h m s .I t i s c o m p o s e d o f a g r a p h i c a l f r o n t - e n d t o s e t t a s k ' s p a r a m e t e r sa n d t o v i e w s i m u l a t i o n r e s u l t s . I t s m o d u l a r d e s i g n a l l o w s t h ei n t e g r a t i o n o f a d d i t i o n a l s c h e d u l i n g p o l i c i e s s e a m l e s s l y . News c h e d u l i n g a l g o r i t h m s c a n b e a d d e d a s m o d u l e s w r i t t e n i nT C L , C o r C++ a n d a r e n o t l i m i t e d b y a p a r t i c u l a r s i m u l a t i o nl a n g u a g e . I t c a n b e e x e c u t e d i n many o p e r a t i n g s y s t e m s , s u c ha s L i n u x o r W i n d o w s .O n t h e o t h e r h a n d , t h e s i m u l a t i o n i n f o r m a t i o n p r o v i d e d b yR e a l t s s a l l o w s t h e e v a l u a t i o n a n d c o m p a r i s o n o f t h e p e r f o r -m a n c e o f d i f f e r e n t s c h e d u l i n g a l g o r i t h m s . I t s s i m p l i c i t y o f u s ea n d i t s f u l l y i n t e g r a t i o n w i t h K i w i , a a g r a p h i c a p p l i c a t i o nw h i c h d i s p l a y s t a s k s e x e c u t i o n t r a c e l o g s , m a k e s R e a l t s s a ni n v a l u a b l e t e a c h i n g t o o l .F u t u r e w o r k i n c l u d e s t h e i n t e g r a t i o n o f m o r e s c h e d u l i n gp o l i c i e s , i n p a r t i c u l a r t o s c h e d u l e r e a l - t i m e s y s t e m s c o n s t i t u t e d

    1 6 81 - 4 2 4 4 - 1 1 6 6 - 1 / 0 7 / $ 2 5 . 0 0 2 0 0 7 I E E E .

    o f p e r i o d i c a n d a p e r i o d i c t a s k s w i t h s h a r e d r e s o u r c e s . A l s o ,t h e s u p p o r t f o r m u l t i p l e p ro c es s o r s a n d n e t w o r k i n g .R E F E R E N C E S

    [ 1 ] A b e n i , L . a n d B u t t a z z o , G . I n t e g r a t i n g m u l t i m e d i a a p p l i c a t i o n s i n h a r dr e a l - t i m e s y s t e m s . I n P r oc e e d i n g s o f t h e 1 9 t h IEEE R e a l -T i m e S y s t e m sS y m p o s i u m , p a g e s 4 - 13 , M ad r i d, S p a i n , D e c 1 9 9 8 .[ 2 ] A l d e a , M. a n d G o n z a l e z - H a r b o u r , M. P o s i x - c o m p a t i b l e a p p l i c a t i o n -d e f i n e d s c h e d u l i n g i n m a r t e o s . I n P r o c e e d i n g s o f t h e 1 3 t h E u r o m i c r oC o n f e r e n c e o n R e a l - T i m e S y s t e m s , p a g e s 6 7 - 7 5 , J u n e 2 00 1.[ 3 ] N . C . A u d s l e y , A l a n B u r n s , M. F . R i c h a r d s o n , a n d A n d y J . W e l l i n g s .S t r e s s : a s i m u l a t o r f o r h a r d r e a l - t i m e s y s t e m s . S o f t w a r e - P r a c t i c e a n dE x p e r i e n c e , 2 4 (6 ) :5 4 3 -5 6 4 , J u n e 1 9 9 4 .[ 4 ] B a k e r , T . P . S t a c k - b a s e d s c h e du l i ng o f r e a l - t i m e p r o c e s e s s . R e a l - T i m eS y s t e m s J o u r n a l , 3 ( 1 ) : 6 7 - 9 9 , Mar 1 9 9 1 .[ 5 ] B i n i , E . a n d B u t t a z z o , G i o r g i o C . S c h e d u l a b i l i t y a n a l y s i s o f p e r i o d i cf i x e d p r i o r i t y s y s t e m s . IEEE T r a n s a c t i o n s o n C o m p u t e r s , 5 3 ( 1 1 ) , N o v .[ 6 ] B u t t a z z o , G . C . R a t e m o n o t o n i c v s . e d f : J u d g m e n t d a y . J o u r n a l o f R e a l -T i m e S y s t e m s , 2 9 ( 1 ) : 5 - 2 6 , J a n 2 0 0 5 .[ 7 ] S t e p h a n e d e V r o e y , J o e l G o o s s e n s , a n d C h r i s t i a n H e r n a l s t e e n . A g e n e r i cs i m u l a t o r o f r e a l - t i m e s c h e d u l i n g a l g o r i t h m s . I n P r o c e e d i n g s o f t h e 2 9 t hA n n u a l S i m u l a t i o n S y m p o s i u m , p a g e s 2 4 2 - 2 4 9 , New O r l e a n , L A , A p r i l1 9 9 6 .[ 8 ] D i a z , A . , R i p o l l , I . , a n d C r e s p o , A . E x t e n d i n g t h e p o s i x - c o m p a t i b l e

    a p p l i c a t i o n - d e f i n e d s c h e d u l i n g m o d e l . I n P r o c e e d i n g s o f t h e 2 6 t h IEEER e a l -T i m e S y s t e m s S y m p o s i u m ( W i P ) , M i a m i , F l , D e c 2 0 0 5 .[ 9 ] D i a z , A . , R i p o l l , I . , a n d C re s p o, A . A l i b r a r y f r a m e w o r k f o r t h e p o s i xa p p l i c a t i o n - d e f i n e d s c h e d u l i n g p r o p o s a l . I n P r o ce e di n g s o f t h e 2 n d IEEEI n t e r n a t i o n a l C o n f e r e n c e o n E l e c t r i c a l a n d E l e c t r o n i c s E n g i n e e r i n g ,p a g e s 2 1 - 2 6 , M e x i c o C i t y , S e p 2 0 0 5 .[ 1 0 ] A g u s t i n E s p i n o z a . K i w i u s e r g u i d e . T e c h n i c a l r e p o r t , U n i -v e r s i d a d P o l i t e c n i c a d e V a l e n c i a , 2 0 0 3 . A v a i l a b l e o n - l i n e a th t t p : / / w w w . d s i c . u p v . e s / u s e r s / i a / s m a / t o o l s / k i w i / i n d e x . h t m l .[ 1 1 ] IEEE S t d 1 0 0 3 . 1 , 2 0 0 4 E d i t i o n . T h e O p e n G r o u p T e c h n i c a l S t a n d a r dB a s e S p e c i f i c a t i o n s , I s s u e 6 . B a s e D e f i n i t i o n s . I n s t i t u t e o f E l e c t r i c a l a n dE l e c t r o n i c E n g i n e e r s a n d T h e O p e n G r o u p , A p r , 2 0 0 4 .[ 1 2 ] G . J a k o v l j e v i c , Z . R a k a m a r i c , a n d D . B a b i c . J a v a s i m u l a t o r o f r e a l -t i m e s c h e d u l i n g a l g o r i t h m s . I n P r oc ee di n g s o f t h e 2 4 t h I n t e r n a t i o n a lC o n f e r e n c e o n I n f o r m a t i o n T e c h n o l o g y I n t e r f a c e s , v o l u m e 1 , p a g e s 4 1 1 -4 1 6 , C a v t a t , C r o a t i a , J u n e 2 0 0 2 .[ 1 3 ] K l e i n , M . H . e t . a l . A P r a c t i t i o n e r ' s H a n d b o o k f o r R e a l - T i m e A n a l y s i s :G u i d e t o R a t e M o n o t o n i c A n a l y s i s o f R e a l - T i m e S y s t e m s . K u l w e rA c a d e m i c P u b l i s h e r s , 1 9 9 3 .[ 1 4 ] T h o r s t e n K r a m p , M a t t h i a s A d r i a n , a n d R a i n e r K o s t e r . A n o p e n f r a m e -w o r k f o r r e a l - t i m e s c h e d u l i n g s i m u l a t i o n . L e c t u r e N o t e s i n C o m p u t e rS c i e n c e , 1 8 0 0 : 7 6 6 + , 2 0 0 0 .[ 1 5 ] J a n e W . S . L i u , J u a n - L u i s R e d o n d o , Z h o n g D e n g , T o o - S e n g T i a ,R i c c a r d o B e t t a t i , A mi S i l b e r m a n , M a t t h e w S t o r c h , R h a n H a , a nd W e i -K u a n S h i h . P e r t s : A p r o t o t y p i n g e n v i r o n m e n t f o r r e a l - t i m e s y s t e m s .I n P r o c e e d i ng s o f t h e 1 4 t h IEEE R e a l T i m e S y s t e m s S y m p o s i u m , p a g e s1 8 4 - 1 8 8 , R a l e i g h - D u r h a m , N o r t h C a r o l i n a , D e c 1 9 9 3 .[ 1 6 ] L i u , J . W . S . R e a l - T i m e S y s t e m s . P r e n t i c e H a l l , 2 0 0 0 .[ 1 7 ] L i u , J . W . S . a n d L ay l an d. S c h ed u l i ng a l g o r i t h m s f o r m u l t i p r o g r a m m i n gi n a h a r d r e a l - t i m e e n v i r o n m e n t . J o u r n a l o f t h e ACM, 2 0 ( 1 ) : 4 6 - 6 1 , May1 9 7 3 .[ 1 8 ] E l e a r d o M a n a c e r o , M a r c e l o B . M i o l a , a n d V i v i a n e A . N a b u c o . T e a c h i n gr e a l - t i m e w i t h a s c h e d u l e r s i m u l a t o r . I n P r o c e e d i n g s o f 3 1 s t A S E E / I E E EF r o n t i e r s i n E d u c a t i o n C o n f e r e n c e , p a g e s 1 5 - 1 9 , R e n o , N V , O c t o b e r2 0 0 1 .[ 1 9 ] R i p o l l I . e t a l . R t o s s t a t e o f t h e a r t a n a l y s i s . T e c h n i c a l r e p o r t , O C E R AP r o j e c t , 2 0 0 3 .[ 2 0 ] S h a , L . , A b d e l z a h e r , T , A r z e n , K . , C e r v i n , A . , B a k e r , T . P . , B u r n s ,A . , B u t t a z z o , G . , C a c c a m o , M . , L e h o c z k y , J . , a n d M o k , A . R e a lt i m e s c h e d u l i n g t h e o r y : A h i s t o r i c a l p e r s p e c t i v e . R e a l - T i m e S y s t e m s ,2 8 ( 2 ) : 4 6 - 6 1 , Nov 2 0 0 4 .[ 2 1 ] S h a , L . , R a j k u m a r , R . , a n d L e h o c z k y , J . P . P r i o r i t y i n h e r i t a n c e p r o t o -c o l s : A n a p p r o a c h t o r e a l t i m e s y n c h r o n i s a t i o n . IEEE T r a n s a c t i o n s o nC o m p u t e r s , 3 9 ( 9 ) : 1 1 7 5 - 1 1 8 5 , S e p 1 9 9 0 .[ 2 2 ] A l e x a n d e r D . S t o y e n k o . A s c h e d u l a b i l i t y a n a l y z e r f o r r e a l - t i m e e u c l i d .I n P r o c e e d i n g s o f t h e 8 t h IEEE R e a l - T i m e S y s t e m s S y m p o s i u m , p a g e s2 1 8 - 2 2 7 , S a n J o s e , C A , D e c 1 9 8 7 .[ 2 3 ] H . T o k u d a a n d C . W . M e r c e r . A r t s : a d i s t r i b u t e d r e a l t i m e k e r n e l . ACMSIGOPS O p e ra t i ng S y s t em s R e v i e w , 2 3 ( 3 ) : 2 9 - 5 3 , J u l y 1 9 8 9 .

    I E E E C a t a l o g N u m b e r : 0 7 E X 1 7 6 2 CI S B N : 1 - 4 24 4 - 1 1 6 6 - 1L i b r a r y o f C o n g r e s s : 2 0 0 7 9 2 3 3 9 8

    . f f w O f w... V= .Z"