Beruflich Dokumente
Kultur Dokumente
J . L. P r u i t t
Mr. W. C a s e
M&S Computing, Inc.
Huntsville, A l a b a m a
S i n c e e f f i c i e n t o p e r a t i o n in a r e a l t i m e e n v i r o n m e n t r e q u i r e s t h a t the n u m b e r of
p r o c e s s e s a n d p r o c e s s s w i t c h e s b e k e p t to a m i n i m u m , t h e MOSS s y s t e m u s e s p r o -
c e s s e s o n l y w h e r e a t r u l y a s y n c h r o n o u s a c t i v i t y i s i d e n t i f i e d . T h e l a y e r s of the MOSS
O p e r a t i n g S y s t e m do n o t r e p r e s e n t a h i e r a r c h i c a l s t r u c t u r e of v i r t u a l m a c h i n e p r o -
c e s s e s , b u t r a t h e r a h i e r a r c h y of f u n c t i o n s u s e d to c r e a t e the p r o c e s s e s .
T h i s p a p e r d e s c r i b e s the l a y e r i n g c o n c e p t s a n d p r o c e s s c o n c e p t s d e f i n i n g the
system architecture. It a l s o p r e s e n t s a n o v e r v i e w of the s p e c i f i c f u n c t i o n s a h d p r o -
c e s s e s o f the M O S S O p e r a t i n g S y s t e m .
Key words and phrases: operating system design, real time operating system,
layered operating system, software architecture, and process communication.
i. INTRODUCTION h a s b e e n s e l e c t e d to p r o v i d e a b a s i c f r a m e w o r k
into which relatively independent subsystems fit
The Modular Operating System for SUMC a n d i n t e r a c t in a w e l l - d e f i n e d m a n n e r . These
(MOSS) i s a g e n e r a l p u r p o s e r e a l t i m e o p e r a t i n g s u b s y s t e m s c a n b e m o d i f i e d o r e x c h a n g e d in
s y s t e m f o r the R C A d e v e l o p e d S p a c e U l t r a r e l i - response to changing user requirements.
a b l e M o d u l a r C o m p u t e r ( S U M C ) . MOSS is c u r -
r e n t l y b e i n g i m p l e m e n t e d a t M&S C o m p u t i n g , S i n c e MOSS i s a r e a l t i m e o p e r a t i n g
I n c . , in H u n t s v i l l e , A l a b a m a , a n d i s s c h e d u l e d system, performance has been considered
to b e f u l l y o p e r a t i o n a l in the f i r s t q u a r t e r o f t h r o u g h o u t the s y s t e m d e f i n i t i o n a n d d e s i g n .
1977. C o n t i n u a l t r a d e o f f s h a v e b e e n m a d e b e t w e e n the
conflicting performance and modifiability ob-
MOSS a t t e m p t s to m e r g e r e c e n t d e v e l o p - jectives. Amajor architectural decision was
m e n t s in o p e r a t i n g s y s t e m d e s i g n to c r e a t e a the s e p a r a t i o n of the s t a t i c a n d d y n a m i c s t r u c -
real time operating system which is more mod- t u r e s o f the s y s t e m . The static structure, con-
ifiable than ad hoc systems developed with pre- s i s t i n g of a h i e r a r c h y of f u n c t i o n s , d e f i n e s the
vious design policies. S i n c e MOSS is to b e u s e d b a s i c f r a m e w o r k of the s u b s y s t e m s a n d t h e i r
a s a n e x p e r i m e n t a l b a s e to t e s t v a r i o u s r e a l interaction. The dynamic structure, consisting
time processing concepts, modifiability has been of cooperating processes representing user
a major design consideration. The a r c h i t e c t u r e applications and asynchronous system activities,
i s s u p e r p o s e d on the s t a t i c f r a m e w o r k . Thus,
the f r e q u e n t p r o c e s s s w i t c h i n g a n d a s s o c i a t e d
• T h i s w o r k w a s s u p p o r t e d b y N A S A C o n t r a c t No. o v e r h e a d of d e e p l y l a y e r e d p r o c e s s e s h a s b e e n
N A S 8 - 3 1 2 2 2 , m a n a g e d b y the M a r s h a l l S p a c e a v o i d e d . I n e f f i c i e n c i e s d u e to f r e q u e n t h a n d -
Flight Center. s h a k i n g b e t w e e n hhe s t a t i c l a y e r s o f f u n c t i o n s
51
h a v e b e e n t o l e r a t e d to a i d m o d i f i a b i l i t y . individual layers m u s t conform to the following
rules:
The remainder of this paper is devoted
to a description of the actual M O S S architecture 1. Each partition owns certain re-
and the concepts on which it is based. A brief sources which other partitions
description of the S U M C hardware is also in- a r e n o t p e r m i t t e d to a c c e s s . The
cluded to aid reader understanding of the M O S S r e s o u r c e s owned by a p a r t i t i o n
architecture. c o n s i s t of the s y s t e m f u n c t i o n s
a n d d a t a s t r u c t u r e s u s e d to s u p -
2. SUMC HARDWARE p o r t the p a r t i t i o n .
52
the design had to m a t c h an existing interrupt depends on the distinction between external and
s truc ture internal interrupts. A n external interrupt is an
interrupt which signals an occurrence which is
T h e h i e r a r c h y of the l a y e r s r e f l e c t s the not directly related to the currently executing in-
h i e r a r c h y of the h a r d w a r e i n t e r r u p t s t r u c t u r e . struction in the processor -- for example, an
S i n c e a n i n t e r r u p t r e s u l t s in a c h a n g e of e x e c u - IIO completion interrupt. An internal interrupt,
t i o n s e q u e n c e , m u c h the s a m e a s a d i r e c t c a l l in on the o t h e r h a n d , r e s u l t s d i r e c t l y f r o m the e x -
s o f t w a r e , a n i n t e r r u p t g e n e r a t e d d u r i n g the e x - e c u t i o n of the c u r r e n t i n s t r u c t i o n - - f o r e x a m p l e ,
e c u t i o n of a l a y e r f u n c t i o n w h i c h is p r o c e s s e d a s u p e r v i s o r , c a l l (SVC) o r a p a g e t r a p i n t e r r u p t .
b y a h i g h e r l a y e r r e p r e s e n t s a v i o l a t i o n o f the A s u b p r o c e s s is u s e d to d e n o t e the p r o c e s s i n g of
layer interaction rules. For example, since an i n t e r n a l i n t e r r u p t . The i n t e r n a l i n t e r r u p t
the MOSS partition responsible for handling p e r f o r m s a s e r v i c e d i r e c t l y s u p p o r t i n g the a c t i v e
I / O i n t e r r u p t s is in l a y e r Z, the p a r t i t i o n s of p r o c e s s a n d , a s s u c h , is t r e a t e d a s a c o n t i n u a -
l a y e r 1 w o u l d n o t be a l l o w e d to r e c e i v e I / O i n - t i o n of the p r o c e s s . T h e s u b p r o c e s s is s i m i l a r
t e r r u p t s d u r i n g their e x e c u t i o n and could not use to a s u b r o u t i n e i n v o k e d v i a a d i r e c t t r a n s f e r a nd
the I / O f a c i l i t i e s . H o w e v e r , p a r t i t i o n s in l a y e r u s e s the p r o c e s s s t a t e i n f o r m a t i o n a s p a r a m e t e r s .
3 a n d a b o v e w o u l d b e a l l o w e d to r e c e i v e I / O i n -
t e r r u p t s a n d to u s e the I / O f a c i l i t i e s of l a y e r Z. The other extension of the process con-
cept is the task process. A task is the imple-
4. MOSS PROCESS CONCEPTS mentation of a user p r o g r a m on M O S S . The task
process represents the execution of the user
T h e s t a t i c s t r u c t u r e of MOSS is o v e r - p r o g r a m and all subprocesses associated with it.
l a y e d b y a d y n a m i c s t r u c t u r e of a s y n c h r o n o u s , The subprocesses provide the synchronous oper-
c o o p e r a t i n g p r o c e s s e s c a r r y i n g o u t the s y s t e m ating s y s t e m services invoked to support the user
activities. P r o c e s s e s do n o t h a v e h i e r a r c h i c a l p r o g r a m including explicit supervisor calls,
relationships. I n s t e a d , a p r o c e s s is the i n d e - implicit paging requests, and implicit error han-
p e n d e n t , a s y n c h r o n o u s e x e c u t i o n of o n e o r m o r e dllng. The state information for a task process
of the s y s t e m p a r t i t i o n s u n d e r c o n t r o l of the includes user supplied resource and real time
static structure. Several processes may execute control p a r a m e t e r s in addition to the h a r d w a r e
a p a r t i t i o n s i m u l t a n e o u s l y s i n c e the f u n c t i o n s of state information used for all processes.
the p a r t i t i o n s c o n t a i n the f a c i l i t i e s w h i c h c o o r -
d i n a t e the m u l t i p l e r e q u e s t s f o r t h e i r r e s o u r c e s . 4. 1 Process Selection Criteria
Z. A p r o g r a m is an o r d e r e d s e - 1. A s e p a r a t e p r o c e s s is u s e d to
q u e n c e of t r a n f o r m a t i o n s p r e - represent each user task.
s e n t e d f o r e x e c u t i o n to the p r o c -
essor. Z. A s e p a r a t e p r o c e s s is u s e d to
r e p r e s e n t e a c h MOSS f u n c t i o n
3. A p r o c e s s is the a c t u a l o r p o t e n - which:
t i a l e x e c u t i o n of an o r d e r e d
s e q u e n c e of t r a n s f o r m a t i o n s on a Performs a service which
set of d a t a [7]. does not directly support
another process or task; or
A process is a logical entity which exists
independently f r o m a processor, but requires a Performs a service which
p r o c e s s o r to a d v a n c e in s t a t e . M o r e than o n e directly supports another
p r o c e s s , e a c h r e p r e s e n t i n g s o m e c o l l e c t i o n of process or task, but which
p r o g r a m s an d r e s o u r c e s , c a n e x e c u t e concur- is e x e c u t e d a s y n c h r o n o u s l y .
rently s h a r i n g a v a i l a b l e r e s o u r c e s , e s p e c i a l l y
the p r o c e s s o r . 3. A s e p a r a t e p r o c e s s is u s e d to
represent each external interrupt.
There are two significant extensions to
the basic process concept which have been used S e c t i o n 6 i d e n t i f i e s and d e s c r i b e s e a c h of
in M O S S . The first, the subprocess concept, the p r o c e s s e s s e l e c t e d f o r M O S S .
53
4. Z Process Coordination MOSS m e c h a n i s m to i n s u r e the p a i r i n g of l o c k s
and unlocks within a function; this has b e e n
S i n c e the p r o c e s s e s w i t h i n the MOSS e n - m a i n t a i n e d as a d e s i g n m a n a g e m e n t r e s p o n s i b i l -
vironment cannot communicate directly, process ity.
coordination mechanisms are provided which
a l l o w p r o c e s s e s to e x c h a n g e d a t a a n d s y n c h r o n - 4. Z.Z Software Interrupts
ize their activities. MOSS p r o v i d e s t h r e e d i s -
tinct mechanisms for process coordination T h e s o f t w a r e i n t e r r u p t (SINT) m e c h a n i s m
w h i c h h a v e b e e n c h o s e n to r e s t r i c t the p r o c e s s p r o v i d e s the c a p a b i l i t y f o r p r o c e s s to be q u e u e d
interactions to a m i n i m a l , yet, sufficient set. f o r s e r v i c e in m u c h the s a m e m a n n e r t h a t a
These mechanisms are: h a r d w a r e i n t e r r u p t q u e u e s an i n t e r r u p t handling
process. Each process contains a SINT count
The data lock; mutually exclusive a s p a r t of i t s s t a t e i n f o r m a t i o n . T h e v a l u e of
a c c e s s to s h a r e d d a t a . the S I N T c o u n t , r a n g i n g f r o m z e r o to a n a r b i -
t r a r y p o s i t i v e i n t e g e r , i n d i c a t e s the n u m b e r of
T h e s o f t w a r e i n t e r r u p t ( S I N T) ; the q u e u e d r e q u e s t s f o r the p r o c e s s . A SINT
queuing requests for service. d r i v e n p r o c e s s is a b l e to s e r v i c e a q u e u e o f r e -
q u e s t s s e r i a l l y and s u s p e n d i t s e l f when f i n i s h e d
The b l o c k / u n b l o c k ; a w a i t i n g c o m - ( w h e n the S I N T c o u n t b e c o m e s z e r o ) . O t h e r
p l e t i o n of a r e q u e s t e d s e r v i c e . p r o c e s s e s in the s y s t e m m a y q u e u e the S I N T
d r i v e n p r o c e s s by i n c r e m e n t i n g its SINT count.
These functions could have been implemented T h e r e a r e two b a s i c p r i m i t i v e s a s s o c i a t e d w i t h
with a g e n e r a l m e c h a n i s m such as D i j k s t r a ' s the S I N T m e c h a n i s m :
s e m a p h o r e s , b u t o n l y a t the r i s k o f i n c r e a s e d
c o m p l e x i t y in p r o c e s s i n t e r a c t i o n s . 1. W a i t a l l o w s a s e r v i c e p r o c e s s to
d e c r e m e n t its SINT count i n d i c a -
MOSS p r o c e s s e s a r e n o t h i e r a r c h i c a l l y t i n g c o m p l e t i o n of the c u r r e n t
r e l a t e d a n d t h u s , n o t l i m i t e d in t h e i r i n t e r a c t i o n s service request. If the v a l u e o f
b y the s t a t i c s t r u c t u r e of the s y s t e m . T h e MOSS the S I N T c o u n t g o e s to z e r o , the
process coordination mechanisms limit process p r o c e s s is s u s p e n d e d u n t i l t he
i n t e r a c t i o n s a i d i n g the r e l i a b i l i t y a n d t e s t a b i l i t y SINT count is i n c r e m e n t e d by
of not only this d e s i g n , but a l s o f u t u r e c h a n g e s . another process. Await request
a p p l i e s o n l y to t h e p r o c e s s m a k i n g
4. Z. 1 Data Locks the r e q u e s t .
54
itself unconditionally. 5.1.4 Exception Handler Partition
55
MOSS S T R U C T U R E O V E R V I E W
HAR DWARE
INTERRUPT
LE VE L LAYER PAR TITIONS
1 SVC h a n d l e r
i0 Z External control
3 Log m a n a g e m e n t
Sampling performance
monitoring
1 Program management
1 Logical I/O
svc Z Console management
1 Access management
4 1 Event management
Figure 1
56
real time performance consideration. l o g i c a l s t a t u s of the S U M C I / O d e v i c e s ( e x c e p t
f o r the p a g i n g d e v i c e c o n t r o l l e d by the m e m o r y
W h e n a p a g e is r e f e r e n c e d w h i c h is n o t in management partition).
m a i n m e m o r y , a p a g e t r a p i n t e r r u p t is g e n e r -
a t e d . T h i s i n t e r n a l i n t e r r u p t is p r o c e s s e d b y the The p a r t i t i o n t r a n s l a t e s I / O r e q u e s t s into
m e m o r y m a n a g e m e n t p a r t i t i o n w h i c h b r i n g s the c h a n n e l p r o g r a m s a n d q u e u e s the r e q u e s t s u n t i l
r e q u i r e d page into m e m o r y . H o w e v e r , the l a y - the r e q u i r e d d e v i c e b e c o m e s a v a i l a b l e . T he
e r i n g of M O S S p r e v e n t s t h i s i n t e r r u p t f r o m b e i n g c h a n n e l m a n a g e m e n t p a r t i t i o n is s u b s e q u e n t l y in-
h o n o r e d if i t i s i n c u r r e d b y m o d u l e s a t o r b e l o w v o k e d to s c h e d u l e the a s s o c i a t e d c h a n n e l f o r
the m e m o r y m a n a g e m e n t p a r t i t i o n . Therefore, e x e c u t i o n of the c h a n n e l p r o g r a m . The partition
s u c h m o d u l e s m u s t a l w a y s b e l o c k e d in m a i n a l s o p e r f o r m s I / O e r r o r r e c o v e r y if r e q u i r e d .
memory.
An a c t u a l s i t u a t i o n i n v o l v i n g this p a r t i t i o n
P a g e s w a p p i n g is p e r f o r m e d on a p a g e p r o v i d e s a n e x a m p l e of the m o d i f i a b i l i t y of
g r o u p b a s i s , i . e . , one to f o u r p a g e s of 1K b y t e s M O S S : B e c a u s e d e v i c e c h a r a c t e r i s t i c s a nd c o n -
each. The SUMC v i r t u a l m e m o r y h a r d w a r e f i g u r a t i o n s a r e m a i n t a i n e d b y t h i s p a r t i t i o n and
s u p p o r t s a d d r e s s t r a n s l a t i o n and page traps at h i d d e n f r o m the o t h e r MOSS p a r t i t i o n s , the o t h e r
the p a g e g r o u p l e v e l . p a r t i t i o n s could be d e s i g n e d and coded e v e n
t h o u g h the d e v i c e m o d e l s an d c o n f i g u r a t i o n s w e r e
5.4 Layer 4 s till undefined.
57
monitoring partition. This partition provides m e n t m a y b e v i e w e d a s a s e t of c o o p e r a t i n g
services for collecting system performance data p r o c e s s e s w h e r e e a c h p r o c e s s is a u n i t of w o r k
at periodic time points. to w h i c h the p r o c e s s o r m a y be a l l o c a t e d . MOSS
p r o v i d e s f a c i l i t i e s f o r c o n t r o l l i n g the c r e a t i o n ,
The c o l l e c t e d d a t a i n d i c a t e s the c u r r e n t e x e c u t i o n , a n d d e l e t i o n of i n d i v i d u a l p r o c e s s e s ,
u t i l i z a t i o n of the s y s t e m r e s o u r c e s . This data and also provides services for controlling com-
is r e c o r d e d a n d s u b s e q u e n t l y p r o c e s s e d to p r o - munication and synchronization between
vide a s t a t i s t i c a l r e p o r t w h i c h i n d i c a t e s s y s t e m processes.
bottlenecks and poorly utilized resources.
In this s e c t i o n , e a c h m a j o r MOSS p r o c e s s
5. 10 L a y e r 10 is i d e n t i f i e d a n d i t s p u r p o s e e x p l a i n e d .
58
p r o c e s s i n g of r e q u e s t s f o r r e a l t i m e d a t a a n d r e d u c e s 7. GONG LUSIO!N
the r e q u e s t l o a d on the c h a n n e l s a s s o c i a t e d w i t h the
m o n i t o r e d d e v i c e s. The a r c h i t e c t u r e of MOSS h a s p r o v e n to
b e s u c c e s s f u l in a c h i e v i n g the b a s i c d e s i g n g o a l
T h e p r o c e s s is a c t i v a t e d b y the t i m e r i n - of m o d i f i a b i l i t y . T h e h i e r a r c h i c a l r e l a t i o n s h i p
t e r v a l e x p i r e d p r o c e s s a t the b e g i n n i n g of e a c h of the MOSS p a r t i t i o n s h a s r e m a i n e d u n c h a n g e d
monitoring interval. s i n c e the e a r l y p h a s e s of the d e s i g n w h i l e the
dynamic structure and partition interfaces have
6.5 Job Process b e e n a u g m e n t e d to s a t i s f y a d d i t i o n a l u s e r r e -
quirements.
MOSS c r e a t e s a j o b p r o c e s s f o r e a c h j o b .
T h e j o b p r o c e s s p e r f o r m s the f u n c t i o n s r e q u i r e d The c o n c e p t s of e x c l u s i v e o w n e r s h i p of
for initiating and terminating a job. r e s o u r c e s by p a r t i t i o n s and i n f o r m a t i o n hiding
w i t h i n m o d u l e s h a s p e r m i t t e d the i n t e r n a l d e s i g n
E a c h j o b c o n s i s t s of one o r m o r e t a s k s . of the p a r t i t i o n s to be m o d i f i e d w i t h o u t a f f e c t i n g
T h e j o b p r o c e s s c r e a t e s a n d a c t i v a t e s the t a s k the i n t e r f a c e s i n t o the p a r t i t i o n o r the d e s i g n of
p r o c e s s f o r the i n i t i a l t a s k of a j o b . I n a d d i t i o n , other partitions.
the j o b p r o c e s s i s a c t i v a t e d w h e n e v e r a t a s k of
the j o b t e r m i n a t e s . T h i s p e r m i t s the j o b p r o c e s s T h e c o n c e p t s of s t r i c t l y c o n t r o l l i n g
to c o n t r o l s e q u e n t i a l s c h e d u l i n g of t a s k s a n d to process communication has permitted processes
d e t e r m i n e w h e n the j o b h a s c o m p l e t e d . to be m o d i f i e d a n d a d d e d w i t h o u t a f f e c t i n g o t h e r
MOSS p r o c e s s e s . F o r e x a m p l e , the d a t a b u s
6.6 T a s k Process m o n i t o r i n g p r o c e s s h a s b e e n a d d e d s i n c e the
original design.
A t a s k p r o c e s s is c r e a t e d f o r e v e r y t a s k
w h i c h e x e c u t e s w i t h i n the MOSS e n v i r o n m e n t . A 8. AG K N O W L E DGE M E N T S
t a s k p r o c e s s is c r e a t e d w h e n a r e q u e s t i s r e -
c e i v e d b y MOSS to e x e c u t e a t a s k a n d e x i s t s u n t i l Ag w i t h m a n y d e v e l o p m e n t e f f o r t s , the
the t a s k i s t e r m i n a t e d . a r c h i t e c t u r e of MOSS w a s n o t w h o l l y c o n c e i v e d
a t o n e t i m e . It w a s a n e v o l u t i o n a r y p r o c e s s of
T h e t a s k p r o c e s s is c r e a t e d a n d a c t i v a t e d the i d e a s a n d e f f o r t of s e v e r a l p e o p l e o v e r a n
b y the j o b p r o c e s s if the t a s k is the i n i t i a l t a s k e x t e n d e d t i m e . We e s p e c i a l l y w i s h to
of the j o b o r if the u s e r r e q u e s t s s e q u e n t i a l r e c o g n i z e the w o r k of T. T. S c h a n s m a n , G. P .
s c h e d u l i n g of the t a s k s of h i s j o b . O t h e r w i s e , W i l l i a m s , L. G. K e l l e r , J. R. G o n w a y , a n d
task p r o c e s s e s a r e c r e a t e d and a c t i v a t e d in 5. R. B o u n d s .
r e s p o n s e to a t a s k s c h e d u l i n g r e q u e s t f r o m
a n o t h e r t a s k of the s a m e j o b . 9. REFERENCES
59