source: rtems/doc/user/overview.t @ 1fa78236

4.104.115
Last change on this file since 1fa78236 was 1fa78236, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 7, 2008 at 3:02:55 PM

2008-11-07 Joel Sherrill <joel.sherrill@…>

PR 1334/doc

  • user/Makefile.am, user/concepts.t, user/init.t, user/overview.t, user/part.t, user/task.t: Correct typos and correctly document 4 parts of 32-bit object id.
  • user/ObjectId-32Bits.eps, user/ObjectId-32Bits.png: New files.
  • Property mode set to 100644
File size: 18.9 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-2008.
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 automatically
333leave out all services that are not required from the run-time
334environment.  Features such as networking, various fileystems,
335and many other features are completely optional.  This allows
336the application designer the flexibility to tailor RTEMS to most
337efficiently meet system requirements while still satisfying even
338the most stringent memory constraints.  As a result, the size
339of the RTEMS executive is application dependent.
340
341RTEMS requires RAM to manage each instance of an RTEMS object
342that is created.  Thus the more RTEMS objects an application
343needs, the more memory that must be reserved.  See
344@ref{Configuring a System Determining Memory Requirements} for
345more details.
346
347RTEMS utilizes memory for both code and data space.
348Although RTEMS' data space must be in RAM, its code space can be
349located in either ROM or RAM.
350
351@section Audience
352
353This manual was written for experienced real-time
354software developers.  Although some background is provided, it
355is assumed that the reader is familiar with the concepts of task
356management as well as intertask communication and
357synchronization.  Since directives, user related data
358structures, and examples are presented in @value{LANGUAGE}, a basic
359understanding of the @value{LANGUAGE} programming language
360is required to fully
361understand the material presented.  However, because of the
362similarity of the Ada and C RTEMS implementations, users will
363find that the use and behavior of the two implementations is
364very similar.  A working knowledge of the target processor is
365helpful in understanding some of RTEMS' features.  A thorough
366understanding of the executive cannot be obtained without
367studying the entire manual because many of RTEMS' concepts and
368features are interrelated.  Experienced RTEMS users will find
369that the manual organization facilitates its use as a reference
370document.
371
372@section Conventions
373
374The following conventions are used in this manual:
375
376@itemize @bullet
377@item Significant words or phrases as well as all directive
378names are printed in bold type.
379
380@item Items in bold capital letters are constants defined by
381RTEMS.  Each language interface provided by RTEMS includes a
382file containing the standard set of constants, data types, and
383@value{STRUCTURE} definitions which can be incorporated into the user
384application.
385
386@item A number of type definitions are provided by RTEMS and
387can be found in rtems.h.
388
389@item The characters "0x" preceding a number indicates that
390the number is in hexadecimal format.  Any other numbers are
391assumed to be in decimal format.
392@end itemize
393
394@section Manual Organization
395
396This first chapter has presented the introductory and
397background material for the RTEMS executive.  The remaining
398chapters of this manual present a detailed description of RTEMS
399and the environment, including run time behavior, it creates for
400the user.
401
402A chapter is dedicated to each manager and provides a
403detailed discussion of each RTEMS manager and the directives
404which it provides.  The presentation format for each directive
405includes the following sections:
406
407@itemize @bullet
408@item Calling sequence
409@item Directive status codes
410@item Description
411@item Notes
412@end itemize
413
414The following provides an overview of the remainder
415of this manual:
416
417@table @asis
418@item Chapter 2
419Key Concepts: presents an
420introduction to the ideas which are common across multiple RTEMS
421managers.
422
423@item Chapter 3:
424RTEMS Data Types: describes the fundamental data types shared
425by the services in the RTEMS Classic API.
426
427@item Chapter 4:
428Initialization Manager: describes the functionality and directives
429provided by the Initialization Manager.
430
431@item Chapter 5:
432Task Manager: describes the functionality and directives provided
433by the Task Manager.
434
435@item Chapter 6:
436Interrupt Manager: describes the functionality and directives
437provided by the Interrupt Manager.
438
439@item Chapter 7:
440Clock Manager: describes the functionality and directives
441provided by the Clock Manager.
442
443@item Chapter 8:
444Timer Manager: describes the functionality and directives provided
445by the Timer Manager.
446
447@item Chapter 9:
448Semaphore Manager: describes the functionality and directives
449provided by the Semaphore Manager.
450
451@item Chapter 10:
452Message Manager: describes the functionality and directives
453provided by the Message Manager.
454
455@item Chapter 11:
456Event Manager: describes the
457functionality and directives provided by the Event Manager.
458
459@item Chapter 12:
460Signal Manager: describes the
461functionality and directives provided by the Signal Manager.
462
463@item Chapter 13:
464Partition Manager: describes the
465functionality and directives provided by the Partition Manager.
466
467@item Chapter 14:
468Region Manager: describes the
469functionality and directives provided by the Region Manager.
470
471@item Chapter 15:
472Dual-Ported Memory Manager: describes
473the functionality and directives provided by the Dual-Ported
474Memory Manager.
475
476@item Chapter 16:
477I/O Manager: describes the
478functionality and directives provided by the I/O Manager.
479
480@item Chapter 17:
481Fatal Error Manager: describes the functionality and directives
482provided by the Fatal Error Manager.
483
484@item Chapter 18:
485Scheduling Concepts: details the RTEMS scheduling algorithm and
486task state transitions.
487
488@item Chapter 19:
489Rate Monotonic Manager: describes the functionality and directives
490provided by the Rate Monotonic Manager.
491
492@item Chapter 20:
493Board Support Packages: defines the
494functionality required of user-supplied board support packages.
495
496@item Chapter 21:
497User Extensions: shows the user how to
498extend RTEMS to incorporate custom features.
499
500@item Chapter 22:
501Configuring a System: details the process by which one tailors RTEMS
502for a particular single-processor or multiprocessor application.
503
504@item Chapter 23:
505Multiprocessing Manager: presents a
506conceptual overview of the multiprocessing capabilities provided
507by RTEMS as well as describing the Multiprocessing
508Communications Interface Layer and Multiprocessing Manager
509directives.
510
511@item Chapter 24:
512Directive Status Codes: provides a definition of each of the
513directive status codes referenced in this manual.
514
515@item Chapter 25:
516Example Application: provides a template for simple RTEMS applications.
517
518@item Chapter 26:
519Glossary: defines terms used throughout this manual.
520
521@end table
522
523
Note: See TracBrowser for help on using the repository browser.