source: rtems/doc/user/overview.t @ 6449498

4.104.114.84.95
Last change on this file since 6449498 was 6449498, checked in by Joel Sherrill <joel.sherrill@…>, on 01/17/02 at 21:47:47

2001-01-17 Joel Sherrill <joel@…>

  • SUPPORT, LICENSE: New files.
  • Numerous files touched as part of merging the 4.5 branch onto the mainline development trunk and ensuring that the script that cuts snapshots and releases works on the documentation.
  • Property mode set to 100644
File size: 18.9 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-2002.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6@c  $Id$
7@c
8
9@c
10@c  This chapter is missing the following figures:
11@c
12@c     Figure 1-1  RTEMS Application Architecture
13@c     Figure 1-2  RTEMS Internal Architecture
14@c
15
16@chapter Overview
17
18@section Introduction
19
20RTEMS, Real-Time Executive for Multiprocessor Systems, is a
21real-time executive (kernel) which provides a high performance
22environment for embedded military applications including the
23following features:
24
25@itemize @bullet
26@item multitasking capabilities
27@item homogeneous and heterogeneous multiprocessor systems
28@item event-driven, priority-based, preemptive scheduling
29@item optional rate monotonic scheduling
30@item intertask communication and synchronization
31@item priority inheritance
32@item responsive interrupt management
33@item dynamic memory allocation
34@item high level of user configurability
35@end itemize
36
37This manual describes the usage of RTEMS for
38applications written in the @value{LANGUAGE} programming language.  Those
39implementation details that are processor dependent are provided
40in the Applications Supplement documents.  A supplement
41document which addresses specific architectural issues that
42affect RTEMS is provided for each processor type that is
43supported.
44
45@section Real-time Application Systems
46
47Real-time application systems are a special class of
48computer applications.  They have a complex set of
49characteristics that distinguish them from other software
50problems.  Generally, they must adhere to more rigorous
51requirements.  The correctness of the system depends not only on
52the results of computations, but also on the time at which the
53results are produced.  The most important and complex
54characteristic of real-time application systems is that they
55must receive and respond to a set of external stimuli within
56rigid and critical time constraints referred to as deadlines.
57Systems can be buried by an avalanche of interdependent,
58asynchronous or cyclical event streams.
59
60Deadlines can be further characterized as either hard
61or soft based upon the value of the results when produced after
62the deadline has passed.  A deadline is hard if the results have
63no value or if their use will result in a catastrophic event.
64In contrast, results which are produced after a soft deadline
65may have some value.
66
67Another distinguishing requirement of real-time
68application systems is the ability to coordinate or manage a
69large number of concurrent activities. Since software is a
70synchronous entity, this presents special problems.  One
71instruction follows another in a repeating synchronous cycle.
72Even though mechanisms have been developed to allow for the
73processing of external asynchronous events, the software design
74efforts required to process and manage these events and tasks
75are growing more complicated.
76
77The design process is complicated further by
78spreading this activity over a set of processors instead of a
79single processor. The challenges associated with designing and
80building real-time application systems become very complex when
81multiple processors are involved.  New requirements such as
82interprocessor communication channels and global resources that
83must be shared between competing processors are introduced.  The
84ramifications of multiple processors complicate each and every
85characteristic of a real-time system.
86
87@section Real-time Executive
88
89Fortunately, real-time operating systems or real-time
90executives serve as a cornerstone on which to build the
91application system.  A real-time multitasking executive allows
92an application to be cast into a set of logical, autonomous
93processes or tasks which become quite manageable.  Each task is
94internally synchronous, but different tasks execute
95independently, resulting in an asynchronous processing stream.
96Tasks can be dynamically paused for many reasons resulting in a
97different task being allowed to execute for a period of time.
98The executive also provides an interface to other system
99components such as interrupt handlers and device drivers.
100System components may request the executive to allocate and
101coordinate resources, and to wait for and trigger synchronizing
102conditions.  The executive system calls effectively extend the
103CPU instruction set to support efficient multitasking.  By
104causing tasks to travel through well-defined state transitions,
105system calls permit an application to demand-switch between
106tasks in response to real-time events.
107
108By proper grouping of responses to stimuli into
109separate tasks, a system can now asynchronously switch between
110independent streams of execution, directly responding to
111external stimuli as they occur.  This allows the system design
112to meet critical performance specifications which are typically
113measured by guaranteed response time and transaction throughput.
114The multiprocessor extensions of RTEMS provide the features
115necessary to manage the extra requirements introduced by a
116system distributed across several processors.  It removes the
117physical barriers of processor boundaries from the world of the
118system designer, enabling more critical aspects of the system to
119receive the required attention. Such a system, based on an
120efficient real-time, multiprocessor executive, is a more
121realistic model of the outside world or environment for which it
122is designed.  As a result, the system will always be more
123logical, efficient, and reliable.
124
125By using the directives provided by RTEMS, the
126real-time applications developer is freed from the problem of
127controlling and synchronizing multiple tasks and processors.  In
128addition, one need not develop, test, debug, and document
129routines to manage memory, pass messages, or provide mutual
130exclusion.  The developer is then able to concentrate solely on
131the application.  By using standard software components, the
132time and cost required to develop sophisticated real-time
133applications is significantly reduced.
134
135@section RTEMS Application Architecture
136
137One important design goal of RTEMS was to provide a
138bridge between two critical layers of typical real-time systems.
139As shown in the following figure, RTEMS serves as a buffer between the
140project dependent application code and the target hardware.
141Most hardware dependencies for real-time applications can be
142localized to the low level device drivers.
143
144@ifset use-ascii
145@example
146@group
147      +-----------------------------------------------------------+
148      |             Application Dependent Software                |
149      |        +----------------------------------------+         |
150      |        |    Standard Application Components     |         |
151      |        |                          +-------------+---+     |
152      |    +---+-----------+              |                 |     |
153      |    | Board Support |              |      RTEMS      |     |
154      |    |    Package    |              |                 |     |
155      +----+---------------+--------------+-----------------+-----|
156      |                      Target Hardware                      |
157      +-----------------------------------------------------------+
158@end group
159@end example
160@end ifset
161
162@ifset use-tex
163@sp 1
164@tex
165\centerline{\vbox{\offinterlineskip\halign{
166\vrule#&
167\hbox to 0.50in{\enskip\hfil#\hfil}&
168\vrule#&
169\hbox to 0.50in{\enskip\hfil#\hfil}&
170\vrule#&
171\hbox to 0.75in{\enskip\hfil#\hfil}&
172\vrule#&
173\hbox to 0.75in{\enskip\hfil#\hfil}&
174\vrule#&
175\hbox to 0.75in{\enskip\hfil#\hfil}&
176\vrule#&
177\hbox to 0.75in{\enskip\hfil#\hfil}&
178\vrule#&
179\hbox to 0.50in{\enskip\hfil#\hfil}&
180\vrule#&
181\hbox to 0.50in{\enskip\hfil#\hfil}&
182\vrule#\cr
183\multispan{17}\hrulefill\cr
184% to force all columns to desired width
185& \enskip && \enskip && \enskip && \enskip &&
186    \enskip && \enskip &&\enskip &&\enskip &\cr
187% For debugging columns
188%& \enskip 0&& \enskip 1&& \enskip 2&& \enskip 3&&
189%    \enskip 4&& \enskip 5&&\enskip 6&&\enskip 7&\cr
190\strut&\multispan{15}&\cr
191&\multispan{15}\hfil Application Dependent Software\hfil&\cr
192\strut&\multispan{15}&\cr
193&\multispan{2}&&\multispan{8}\hrulefill &\multispan{2}&\cr
194\strut&\multispan{2}&&&\multispan{7}&&\multispan{2}&&\cr
195&\multispan{2}&&&\multispan{7}\hfil Standard Application Components\hfil&
196    &\multispan{2}&&\cr
197\strut&\multispan{2}&&&\multispan{7}&&\multispan{2}&&\cr
198&&\multispan{5}\hrulefill&&\multispan{7}\hrulefill&&\cr
199\strut&&&\multispan{3}                  &&&&\multispan{5}&&&\cr
200&&&\multispan{3}\hfil Device\hfil&&&&\multispan{5}\hfil RTEMS\hfil&&&\cr
201&&&\multispan{3}\hfil Drivers\hfil&&&&\multispan{5}&&&\cr
202\strut&&&\multispan{3}                  &&&&\multispan{5}&&&\cr
203\multispan{17}\hrulefill\cr
204\strut&\multispan{15}&\cr
205&\multispan{15}\hfil Target Hardware\hfil&\cr
206\strut&\multispan{15}&\cr
207\multispan{17}\hrulefill\cr
208}}\hfil}
209@end tex
210@end ifset
211
212@ifset use-html
213@html
214<IMG SRC="rtemsarc.png" WIDTH=500 HEIGHT=300 ALT="RTEMS Application Architecture">
215@end html
216@end ifset
217
218The RTEMS I/O interface manager provides an efficient tool for incorporating
219these hardware dependencies into the system while simultaneously
220providing a general mechanism to the application code that
221accesses them.  A well designed real-time system can benefit
222from this architecture by building a rich library of standard
223application components which can be used repeatedly in other
224real-time projects.
225
226@section RTEMS Internal Architecture
227
228RTEMS can be viewed as a set of layered components that work in
229harmony to provide a set of services to a real-time application
230system.  The executive interface presented to the application is
231formed by grouping directives into logical sets called resource managers.
232Functions utilized by multiple managers such as scheduling,
233dispatching, and object management are provided in the executive
234core.  The executive core depends on a small set of CPU dependent routines.
235Together these components provide a powerful run time
236environment that promotes the development of efficient real-time
237application systems.  The following figure illustrates this organization:
238
239@ifset use-ascii
240@example
241@group
242           +-----------------------------------------------+
243           |          RTEMS Executive Interface            |
244           +-----------------------------------------------+
245           |                 RTEMS Core                    |
246           +-----------------------------------------------+
247           |              CPU Dependent Code               |
248           +-----------------------------------------------+
249@end group
250@end example
251@end ifset
252
253@ifset use-tex
254@c for now use the ascii version
255@c @example
256@c @group
257@c            +-----------------------------------------------+
258@c            |          RTEMS Executive Interface            |
259@c            +-----------------------------------------------+
260@c            |                 RTEMS Core                    |
261@c            +-----------------------------------------------+
262@c            |              CPU Dependent Code               |
263@c            +-----------------------------------------------+
264@c @end group
265@c @end example
266@image{rtemspie,4in,3in}
267@tex
268@end tex
269@end ifset
270
271@ifset use-html
272@html
273<IMG SRC="rtemspie.png" WIDTH=500 HEIGHT=300 ALT="RTEMS Architecture">
274@end html
275@end ifset
276Subsequent chapters present a detailed description of the capabilities
277provided by each of the following RTEMS managers:
278
279@itemize @bullet
280@item initialization
281@item task
282@item interrupt
283@item clock
284@item timer
285@item semaphore
286@item message
287@item event
288@item signal
289@item partition
290@item region
291@item dual ported memory
292@item I/O
293@item fatal error
294@item rate monotonic
295@item user extensions
296@item multiprocessing
297@end itemize
298
299@section User Customization and Extensibility
300
301As thirty-two bit microprocessors have decreased in
302cost, they have become increasingly common in a variety of
303embedded systems.  A wide range of custom and general-purpose
304processor boards are based on various thirty-two bit processors.
305RTEMS was designed to make no assumptions concerning the
306characteristics of individual microprocessor families or of
307specific support hardware.  In addition, RTEMS allows the system
308developer a high degree of freedom in customizing and extending
309its features.
310
311RTEMS assumes the existence of a supported
312microprocessor and sufficient memory for both RTEMS and the
313real-time application.  Board dependent components such as
314clocks, interrupt controllers, or I/O devices can be easily
315integrated with RTEMS.  The customization and extensibility
316features allow RTEMS to efficiently support as many environments
317as possible.
318
319@section Portability
320
321The issue of portability was the major factor in the
322creation of RTEMS.  Since RTEMS is designed to isolate the
323hardware dependencies in the specific board support packages,
324the real-time application should be easily ported to any other
325processor.  The use of RTEMS allows the development of real-time
326applications which can be completely independent of a particular
327microprocessor architecture.
328
329@section Memory Requirements
330
331Since memory is a critical resource in many real-time
332embedded systems, RTEMS was specifically designed to allow
333unused managers to be excluded from the run-time environment.
334This allows the application designer the flexibility to tailor
335RTEMS to most efficiently meet system requirements while still
336satisfying even the most stringent memory constraints.  As a
337result, the size of the RTEMS executive is application
338dependent.  A worksheet is provided in the Memory Requirements
339chapter of the Applications Supplement document for a specific
340target processor.  The worksheet is used to calculate the memory
341requirements of a custom RTEMS run-time environment.  The
342following managers may be optionally excluded:
343
344@itemize @bullet
345@item clock
346@item timer
347@item semaphore
348@item message
349@item event
350@item signal
351@item partition
352@item region
353@item dual ported memory
354@item I/O
355@item rate monotonic
356@item fatal error
357@item multiprocessing
358@end itemize
359
360RTEMS utilizes memory for both code and data space.
361Although RTEMS' data space must be in RAM, its code space can be
362located in either ROM or RAM.
363
364@section Audience
365
366This manual was written for experienced real-time
367software developers.  Although some background is provided, it
368is assumed that the reader is familiar with the concepts of task
369management as well as intertask communication and
370synchronization.  Since directives, user related data
371structures, and examples are presented in @value{LANGUAGE}, a basic
372understanding of the @value{LANGUAGE} programming language
373is required to fully
374understand the material presented.  However, because of the
375similarity of the Ada and C RTEMS implementations, users will
376find that the use and behavior of the two implementations is
377very similar.  A working knowledge of the target processor is
378helpful in understanding some of RTEMS' features.  A thorough
379understanding of the executive cannot be obtained without
380studying the entire manual because many of RTEMS' concepts and
381features are interrelated.  Experienced RTEMS users will find
382that the manual organization facilitates its use as a reference
383document.
384
385@section Conventions
386
387The following conventions are used in this manual:
388
389@itemize @bullet
390@item Significant words or phrases as well as all directive
391names are printed in bold type.
392
393@item Items in bold capital letters are constants defined by
394RTEMS.  Each language interface provided by RTEMS includes a
395file containing the standard set of constants, data types, and
396@value{STRUCTURE} definitions which can be incorporated into the user
397application.
398
399@item A number of type definitions are provided by RTEMS and
400can be found in rtems.h.
401
402@item The characters "0x" preceding a number indicates that
403the number is in hexadecimal format.  Any other numbers are
404assumed to be in decimal format.
405@end itemize
406
407@section Manual Organization
408
409This first chapter has presented the introductory and
410background material for the RTEMS executive.  The remaining
411chapters of this manual present a detailed description of RTEMS
412and the environment, including run time behavior, it creates for
413the user.
414
415A chapter is dedicated to each manager and provides a
416detailed discussion of each RTEMS manager and the directives
417which it provides.  The presentation format for each directive
418includes the following sections:
419
420@itemize @bullet
421@item Calling sequence
422@item Directive status codes
423@item Description
424@item Notes
425@end itemize
426
427The following provides an overview of the remainder
428of this manual:
429
430@table @asis
431@item Chapter 2
432Key Concepts: presents an
433introduction to the ideas which are common across multiple RTEMS
434managers.
435
436@item Chapter 3:
437Initialization Manager: describes the functionality and directives
438provided by the Initialization Manager.
439
440@item Chapter 4:
441Task Manager: describes the functionality and directives provided
442by the Task Manager.
443
444@item Chapter 5:
445Interrupt Manager: describes the functionality and directives
446provided by the Interrupt Manager.
447
448@item Chapter 6:
449Clock Manager: describes the functionality and directives
450provided by the Clock Manager.
451
452@item Chapter 7
453Timer Manager: describes the functionality and directives provided
454by the Timer Manager.
455
456@item Chapter 8:
457Semaphore Manager: describes the functionality and directives
458provided by the Semaphore Manager.
459
460@item Chapter 9:
461Message Manager: describes the functionality and directives
462provided by the Message Manager.
463
464@item Chapter 10:
465Event Manager: describes the
466functionality and directives provided by the Event Manager.
467
468@item Chapter 11:
469Signal Manager: describes the
470functionality and directives provided by the Signal Manager.
471
472@item Chapter 12:
473Partition Manager: describes the
474functionality and directives provided by the Partition Manager.
475
476@item Chapter 13:
477Region Manager: describes the
478functionality and directives provided by the Region Manager.
479
480@item Chapter 14:
481Dual-Ported Memory Manager: describes
482the functionality and directives provided by the Dual-Ported
483Memory Manager.
484
485@item Chapter 15:
486I/O Manager: describes the
487functionality and directives provided by the I/O Manager.
488
489@item Chapter 16:
490Fatal Error Manager: describes the functionality and directives
491provided by the Fatal Error Manager.
492
493@item Chapter 17:
494Scheduling Concepts: details the RTEMS scheduling algorithm and
495task state transitions.
496
497@item Chapter 18:
498Rate Monotonic Manager: describes the functionality and directives
499provided by the Rate Monotonic Manager.
500
501@item Chapter 19:
502Board Support Packages: defines the
503functionality required of user-supplied board support packages.
504
505@item Chapter 20:
506User Extensions: shows the user how to
507extend RTEMS to incorporate custom features.
508
509@item Chapter 21:
510Configuring a System: details the process by which one tailors RTEMS
511for a particular single-processor or multiprocessor application.
512
513@item Chapter 22:
514Multiprocessing Manager: presents a
515conceptual overview of the multiprocessing capabilities provided
516by RTEMS as well as describing the Multiprocessing
517Communications Interface Layer and Multiprocessing Manager
518directives.
519
520@item Chapter 23:
521Directive Status Codes: provides a definition of each of the
522directive status codes referenced in this manual.
523
524@item Chapter 24:
525Example Application: provides a template for simple RTEMS applications.
526
527@item Chapter 25:
528Glossary: defines terms used throughout this manual.
529
530@end table
531
532
Note: See TracBrowser for help on using the repository browser.