Hhhhhhhhhhhhhhhh

Páginas: 22 (5484 palabras) Publicado: 18 de junio de 2012
What is an RTOS?
Introduction to Real-Time
Operating Systems
Mahesh Balasubramaniam

So what is an RTOS?
• A n o p e r a tin g s y s te m w h ic h fo llo w s th e
R e a l T im e c r ite r ia .
• ² E ffic ie n c y , P r e d ic ta b ility a n d T im e lin e s s –
im p o r ta n t
• – A ll c o m p o n e n ts o f a n R T O S m u s t h a v e
th e s e p r o p e r tie s .
• S o m e ta s k s wh ic h m a y d e la y th in g s :
• – In te r r u p t P r o c e s s in g , C o n te x t S w itc h in g ,
In te r - ta s k c o m m u n ic a tio n ,

So what makes an RTOS special?
• A n R T O S w ill p r o v id e fa c ilitie s to
g u a r a n te e d e a d lin e s w ill b e m e t
• A n R T O S w ill p ro v id e s c h e d u lin g
a lg o r ith m s in o r d e r to e n a b le d e te r m in istic
b e h a v io r in th e s y s te m
• A n R T O S is v a lu e d m o r e fo r p r e d ic ta b ility
th a n th r o u g h p u t

• A n R T O S is a c la s s o f o p e r a tin g s y s te m s
th a t a r e in te n d e d fo r r e a l tim e - a p p lic a tio n s
• W h a t is a r e a l tim e a p p lic a tio n ?
• A r e a l tim e a p p lic a tio n is a n a p p lic a tio n
th a t g u a r a n te e sb o th c o r r e c tn e s s o f r e s u lt
a n d th e a d d e d c o n s tr a in t o f m e e tin g a
d e a d lin e

So what is an RTOS ?(contd)
• IO
• T o c u t b a c k o n ( v a r ia b le ) o v e r h e a d fo r
th e s e ta s k s :
• – M u ltip r o g r a m m in g , M e m o r y
M a n a g e m e n t, F ile ( a n d o th e r ) IO , IP C ,
• e tc .

Design Philosophies
• S o m e o f th e d es ig n p h ilo s o p h ie s o f a n
R T O S a r e w ith r e s p e c t to :
• S c h e d u lin g
• M e m o r y a llo c a tio n
• In te r ta s k c o m m u n ic a tio n
• In te r r u p t h a n d le r s

1

Tasks
• T a s k S ta te s :
– R u n n in g
– R e a d y ( p o s s ib ly : s u s p e n d e d , p e n d e d )
– B lo c k e d ( p o s s ib ly : w a itin g , d o r m a n t, d e la y e d )– S c h e d u le r – s c h e d u le s /s h u ffle s ta s k s b e tw e e n
R u n n in g a n d R e a d y s ta te s
– B lo c k in g is s e lf- b lo c k in g b y ta s k s , a n d m o v e d to
Running state via other tasks’ interrupt signaling
( w h e n b lo c k - fa c to r is r e m o v e d /s a tis fie d )
– W h e n a ta s k is u n b lo c k e d w ith a h ig h e r p r io r ity o v e r
the‘running’ task, the scheduler ‘s witches’ context
im m e d ia te ly

Scheduling
• T h e d a ta s tr u c tu r e o f th e r e a d y lis t in th e
s c h e d u le r is d e s ig n e d s o a s to m in im iz e th e
w o r s t- c a s e le n g th o f tim e s p e n t in th e
s c h e d u l e r 's c r i t i c a l s e c t i o n
• T h e c r itic a l r e s p o n s e tim e , s o m e tim e s c a lle d th e
fly b ac k tim e , is th e tim e it ta k e s to q u e u e a n e w
r e a d y ta s k a n d r e s to r e th e s ta te o f th e h ig h e s t
p r io r ity ta s k . In a w e ll- d e s ig n e d R T O S , r e a d y in g
a n e w ta s k w ill ta k e 3 - 2 0 in s tr u c tio n s p e r r e a d y
q u e u e e n tr y , a n d r e s to r a tio n o f th e h ig h e s tp r io r ity r e a d y ta s k w ill ta k e 5 - 3 0in s tr u c tio n s .

Memory Allocation
• S p e e d o f a llo c a tio n
• M e m o r y c a n b e c o m e fr a g m e n te d

Intertask Comm. & resource sharing
• It is " u n s a fe " fo r tw o ta s k s to a c c e s s th e
s a m e s p e c ific d a ta o r h a r d w a r e r e s o u r c e
s im u lta n e o u s ly .
• 3 W a y s to r e s o lv e th is :
• T e m p o r a r ily m a s k in g /d is ab lin g in te r r u p ts
• B in a ry S e m a p h o re s
• M e s s a g e p a s s in g

Interrupt Handling
• In te r r u p ts u s u a lly b lo c k th e h ig h e s t p r io r ity
ta s k s
• N e e d to m in im iz e th e u n p r e d ic ta b ility
caused

2

Linux as an RTOS
• Is L in u x a n R T O S ?
• L in u x p r o v id e s a fe w b a s ic fe a tu r e s to
s u p p o r t r e a l-...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Hhhhhhhhhhhhhhhh
  • Hhhhhhhhhhhhhhhh
  • Hhhhhhhhhhhhhhhh
  • hhhhhhhhhhhhhhhh
  • hhhhhhhhhhhhhhhh
  • Hhhhhhhhhhhhhhhh
  • Hhhhhhhhhhhhhhhh
  • Hhhhhhhhhhhhhhhh

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS