MICOS: A MICROPROGRAMMED HIERARCHICAL OPERATING SYSTEM NUCLEUS AND ITS P E R F O R M A N C E C O M P A R I S O N W A L T E R H. B U R K H A R D T A N D H E L M U T E. M A I E R I n s t i t u t fur I n f o r m a t i k , U n l v e r s i t ~ t S t u t t g a r t D-7OO0 Stuttgart, West Germany M o d e r n o p e r a t i n g s y s t e m s (OS) spend o f t e n m o r e than half of the total C P U - t l m e for overhead. M i c r o p r o g r a m m i n g of s y s t e m s c o m p o n e n t s o f f e r s an a t t r a c t i v e m e a n s for a reduction. H o w e v e r , p r e v i o u s i n v e s t i g a t o r s have found o n l y small i n c r e a s e s in effic i e n c y by m i c r o p r o g r a m m e d O S - f u n c t i o n s , w h e n e v e r a n a l y z e d in detail. T h e y have imp l e m e n t e d a total OS in m i c r o c o d e or d e s i g ned new p o w e r f u l m a c h i n e i n s t r u c t i o n s for s i n g l e s y s t e m s f u n c t i o n s , but w i t h o u t imp o r t a n t changes to the h a r d w a r e a r c h i t e c ture or the O S - s t r u c t u r e . The first m e t h o d t r a n s p o s e s o n l y the o r i g i n a l i n e f f i c i e n c i e s to a n o t h e r level and w a s t e s v a l u a b l e resources. The s e c o n d loses m o s t of the gains from e x e c u t i n g a m i c r o p r o g r a m m e d O S - f u n c tion for i n a d e q u a t e a d a p t a t i o n in the int e r f a c e b e t w e e n h a r d w a r e and s o f t w a r e levels, as to be e x p e c t e d in a m e t h o d of loc a l i z e d o p t i m i z a t i o n . In c o n t r a s t , s e n s i b l e a p p l i c a t i o n of a new t e c h n o l o g y , as m i c r o p r o g r a m m i n g , should have r e s u l t e d in sign i f i c a n t g a i n s of e f f i c i e n c y . A s p e c i a l s t r u c t u r e of the p r e s e n t s y s t e m has b e e n a d o p t e d for the c o m p a r i s o n of the p e r f o r m a n c e of the d i f f e r e n t implem e n t a t i o n m o d e s for the f u n c t i o n s in the O S - n u c l e u s . T h e s e are: i. as m a c r o functions (M-routines); 2. as w r i t e a b l e c o n t r o l m e m o r y f u n c t i o n s (W-routines); 3. as reado n l y m e m o r y f u n c t i o n s (R-routines). T h e OSn u c l e u s is d e s i g n e d as a f u n c t i o n a l l y equiv a l e n t O S - m a c h i n e on all 3 levels. T h i s m e a n s that all f u n c t i o n a l c h a r a c t e r i s t i c s of the m a c r o n u c l e u s are r e t a i n e d , w h i l e the r e a l i z a t i o n of the O S - m a c h i n e can follow a s p e c t s of a r c h i t e c t u r e and e f f i c i e n c y . S e v e r a l c r i t e r i a w e r e o b s e r v e d for the design of the m i c r o nucleus: I. N u c l e u s rea l i z e d as an O S - m a c h i n e in a set of elem e n t a r y p r o c e s s - and p r o c e s s o r - f u n c t i o n s w i t h m u t u a l l y a d a p t e d i n t e r f a c e s to the s o f t w a r e and the m i c r o - l e v e l ; If. I m p l e m e n t a t i o n of p r o c e s s - f u n c t i o n s as s t o r a g e - and p r o g r a m - h l e r a r c h y , e x i s t i n g o p t i o n a l l y on all 3 i m p l e m e n t a t i o n levels (as M-, W-, and R-routines). Each process function exists on e x a c t l y one level, and the p r o g r a m h i e r a r c h y of the m i c r o n u c l e u s c o r r e s p o n d s to that of the m a c r o level; III. S e p a r a t i o n of s y s t e m s calls and i n t e r r u p t - a c t i v a t i o n by m e a n s of a s p e c i a l m i c r o p r o g r a m m e d c a l l routine. A c t i v a t i o n of s y s t e m f u n c t i o n s req u i r e s then no i n t e r r u p t h a n d l i n g ; IV. L o - c a l i t y of v a r i a b l e s is o b t a i n e d by k e e p i n g t h e m h a r d w a r e r e s i d e n t for m i n i m i z i n g m e m o ry a c c e s s e s , i m p l e m e n t e d by a stack in local m e m o r y ; V. D e f i n e d i n t e r r u p t a b i l i t y opens a w i n d o w for p o s s i b l e i n t e r r u p t s on M-, W-, and R - r o u t i n e s o n l y at d e f i n e d t i m e p o i n t s . H a n d l i n g of an i n t e r r u p t emp l o y s e n t r y p o i n t s to the s y s t e m call mechanism. T h i s e n s u r e s m i n i m i z a t i o n of the i n t e r r u p t e f f o r t w i t h d e f i n e d r e a l t i m e operation. S t a t i c and d y n a m i c p e r f o r m a n c e p a r a m e ters are d e f i n e d w i t h a s y s t e m s model. T h e y p e r m i t a r e p r o d u c e a b l e w o r k l o a d for the nucleus. A f i r m w a r e / s o f t w a r e m o n i t o r , e s p e c i a l l y d e s i g n e d for m e a s u r i n g on the m a c r o or on the m i c r o level, p e r m i t s det a i l e d o b s e r v a t i o n of all s y s t e m s a c t i v i ties and m e a s u r e m e n t of the p e r f o r m a n c e p a r a m e t e r s for c o m p a r i s o n Obtained results show a significant d e c r e a s e of the n u c l e u s o v e r h e a d b e t w e e n 50 and 90% for the d i f f e r e n t functions. As a t y p i c a l e x a m p l e m a y serve the q u i t e freq u e n t l y u s e d S i g n a l - f u n c t i o n in a static e n v i r o n m e n t , w i t h the r e s u l t s in the foll o w i n g table. The f i r s t 4 d a t a c o l u m n s give the times in m i c r o s e c o n d s for the act i v i t i e s w i t h TS as the total time, TC as the time for the call (interrupt h a n d l i n g , S V C - a n a l y s i s , a c t i v a t i o n of the f u n c t i o n p r o p e r ) , TG as the e x e c u t i o n time, and the q u o t i e n t of c a l l - t i m e to e x e c u t i o n - t i m e . The r e m a i n i n g c o l u m n s give the e f f i c i e n c y g a i n w i t h A as the q u o t i e n t of the total times for the m a c r o and the M-, W-, and Rlevels, r e s p e c t i v e l y , and E as the effic i e n c y g a i n in p e r c e n t for the same cases. LEVEL macro MWRI TS TC J 1037 TG TC/TG 12 1.1 2.2 A 1 6.7 8.9 E% ! 127 105 4.8 10.7 91 B u r k h a r d t , W. H. and R. C. Randel: D e s i g n of o p e r a t i n g s y s t e m s w l t h m l c r o p r o g r a m m e d implementation. NTIS-rep. PB-224484,1973. B u r k h a r d t , W. H. and H. E. Maier: I m p l e m e n t a t i o n and p e r f o r m a n c e c o m p a r i s o n for a microprogrammed hierarchical operating s y s t e m nucleus. N T I S - r e p o r t no. P B - 2 8 2 6 1 2 /AS, 1978. CH1411-8/78/0000-0033500.75 (~) 1978 IEEE
/lp/association-for-computing-machinery/micos-a-microprogrammed-hierarchical-operating-system-nucleus-and-its-03vRqMWmsn