OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rtems-20020807/] [doc/] [user/] [overview.t] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
@c
2
@c  COPYRIGHT (c) 1988-2002.
3
@c  On-Line Applications Research Corporation (OAR).
4
@c  All rights reserved.
5
@c
6
@c  overview.t,v 1.12 2002/01/17 21:47:47 joel Exp
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
 
20
RTEMS, Real-Time Executive for Multiprocessor Systems, is a
21
real-time executive (kernel) which provides a high performance
22
environment for embedded military applications including the
23
following 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
 
37
This manual describes the usage of RTEMS for
38
applications written in the @value{LANGUAGE} programming language.  Those
39
implementation details that are processor dependent are provided
40
in the Applications Supplement documents.  A supplement
41
document which addresses specific architectural issues that
42
affect RTEMS is provided for each processor type that is
43
supported.
44
 
45
@section Real-time Application Systems
46
 
47
Real-time application systems are a special class of
48
computer applications.  They have a complex set of
49
characteristics that distinguish them from other software
50
problems.  Generally, they must adhere to more rigorous
51
requirements.  The correctness of the system depends not only on
52
the results of computations, but also on the time at which the
53
results are produced.  The most important and complex
54
characteristic of real-time application systems is that they
55
must receive and respond to a set of external stimuli within
56
rigid and critical time constraints referred to as deadlines.
57
Systems can be buried by an avalanche of interdependent,
58
asynchronous or cyclical event streams.
59
 
60
Deadlines can be further characterized as either hard
61
or soft based upon the value of the results when produced after
62
the deadline has passed.  A deadline is hard if the results have
63
no value or if their use will result in a catastrophic event.
64
In contrast, results which are produced after a soft deadline
65
may have some value.
66
 
67
Another distinguishing requirement of real-time
68
application systems is the ability to coordinate or manage a
69
large number of concurrent activities. Since software is a
70
synchronous entity, this presents special problems.  One
71
instruction follows another in a repeating synchronous cycle.
72
Even though mechanisms have been developed to allow for the
73
processing of external asynchronous events, the software design
74
efforts required to process and manage these events and tasks
75
are growing more complicated.
76
 
77
The design process is complicated further by
78
spreading this activity over a set of processors instead of a
79
single processor. The challenges associated with designing and
80
building real-time application systems become very complex when
81
multiple processors are involved.  New requirements such as
82
interprocessor communication channels and global resources that
83
must be shared between competing processors are introduced.  The
84
ramifications of multiple processors complicate each and every
85
characteristic of a real-time system.
86
 
87
@section Real-time Executive
88
 
89
Fortunately, real-time operating systems or real-time
90
executives serve as a cornerstone on which to build the
91
application system.  A real-time multitasking executive allows
92
an application to be cast into a set of logical, autonomous
93
processes or tasks which become quite manageable.  Each task is
94
internally synchronous, but different tasks execute
95
independently, resulting in an asynchronous processing stream.
96
Tasks can be dynamically paused for many reasons resulting in a
97
different task being allowed to execute for a period of time.
98
The executive also provides an interface to other system
99
components such as interrupt handlers and device drivers.
100
System components may request the executive to allocate and
101
coordinate resources, and to wait for and trigger synchronizing
102
conditions.  The executive system calls effectively extend the
103
CPU instruction set to support efficient multitasking.  By
104
causing tasks to travel through well-defined state transitions,
105
system calls permit an application to demand-switch between
106
tasks in response to real-time events.
107
 
108
By proper grouping of responses to stimuli into
109
separate tasks, a system can now asynchronously switch between
110
independent streams of execution, directly responding to
111
external stimuli as they occur.  This allows the system design
112
to meet critical performance specifications which are typically
113
measured by guaranteed response time and transaction throughput.
114
The multiprocessor extensions of RTEMS provide the features
115
necessary to manage the extra requirements introduced by a
116
system distributed across several processors.  It removes the
117
physical barriers of processor boundaries from the world of the
118
system designer, enabling more critical aspects of the system to
119
receive the required attention. Such a system, based on an
120
efficient real-time, multiprocessor executive, is a more
121
realistic model of the outside world or environment for which it
122
is designed.  As a result, the system will always be more
123
logical, efficient, and reliable.
124
 
125
By using the directives provided by RTEMS, the
126
real-time applications developer is freed from the problem of
127
controlling and synchronizing multiple tasks and processors.  In
128
addition, one need not develop, test, debug, and document
129
routines to manage memory, pass messages, or provide mutual
130
exclusion.  The developer is then able to concentrate solely on
131
the application.  By using standard software components, the
132
time and cost required to develop sophisticated real-time
133
applications is significantly reduced.
134
 
135
@section RTEMS Application Architecture
136
 
137
One important design goal of RTEMS was to provide a
138
bridge between two critical layers of typical real-time systems.
139
As shown in the following figure, RTEMS serves as a buffer between the
140
project dependent application code and the target hardware.
141
Most hardware dependencies for real-time applications can be
142
localized 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
RTEMS Application Architecture
215
@end html
216
@end ifset
217
 
218
The RTEMS I/O interface manager provides an efficient tool for incorporating
219
these hardware dependencies into the system while simultaneously
220
providing a general mechanism to the application code that
221
accesses them.  A well designed real-time system can benefit
222
from this architecture by building a rich library of standard
223
application components which can be used repeatedly in other
224
real-time projects.
225
 
226
@section RTEMS Internal Architecture
227
 
228
RTEMS can be viewed as a set of layered components that work in
229
harmony to provide a set of services to a real-time application
230
system.  The executive interface presented to the application is
231
formed by grouping directives into logical sets called resource managers.
232
Functions utilized by multiple managers such as scheduling,
233
dispatching, and object management are provided in the executive
234
core.  The executive core depends on a small set of CPU dependent routines.
235
Together these components provide a powerful run time
236
environment that promotes the development of efficient real-time
237
application 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
RTEMS Architecture
274
@end html
275
@end ifset
276
Subsequent chapters present a detailed description of the capabilities
277
provided 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
 
301
As thirty-two bit microprocessors have decreased in
302
cost, they have become increasingly common in a variety of
303
embedded systems.  A wide range of custom and general-purpose
304
processor boards are based on various thirty-two bit processors.
305
RTEMS was designed to make no assumptions concerning the
306
characteristics of individual microprocessor families or of
307
specific support hardware.  In addition, RTEMS allows the system
308
developer a high degree of freedom in customizing and extending
309
its features.
310
 
311
RTEMS assumes the existence of a supported
312
microprocessor and sufficient memory for both RTEMS and the
313
real-time application.  Board dependent components such as
314
clocks, interrupt controllers, or I/O devices can be easily
315
integrated with RTEMS.  The customization and extensibility
316
features allow RTEMS to efficiently support as many environments
317
as possible.
318
 
319
@section Portability
320
 
321
The issue of portability was the major factor in the
322
creation of RTEMS.  Since RTEMS is designed to isolate the
323
hardware dependencies in the specific board support packages,
324
the real-time application should be easily ported to any other
325
processor.  The use of RTEMS allows the development of real-time
326
applications which can be completely independent of a particular
327
microprocessor architecture.
328
 
329
@section Memory Requirements
330
 
331
Since memory is a critical resource in many real-time
332
embedded systems, RTEMS was specifically designed to allow
333
unused managers to be excluded from the run-time environment.
334
This allows the application designer the flexibility to tailor
335
RTEMS to most efficiently meet system requirements while still
336
satisfying even the most stringent memory constraints.  As a
337
result, the size of the RTEMS executive is application
338
dependent.  A worksheet is provided in the Memory Requirements
339
chapter of the Applications Supplement document for a specific
340
target processor.  The worksheet is used to calculate the memory
341
requirements of a custom RTEMS run-time environment.  The
342
following 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
 
360
RTEMS utilizes memory for both code and data space.
361
Although RTEMS' data space must be in RAM, its code space can be
362
located in either ROM or RAM.
363
 
364
@section Audience
365
 
366
This manual was written for experienced real-time
367
software developers.  Although some background is provided, it
368
is assumed that the reader is familiar with the concepts of task
369
management as well as intertask communication and
370
synchronization.  Since directives, user related data
371
structures, and examples are presented in @value{LANGUAGE}, a basic
372
understanding of the @value{LANGUAGE} programming language
373
is required to fully
374
understand the material presented.  However, because of the
375
similarity of the Ada and C RTEMS implementations, users will
376
find that the use and behavior of the two implementations is
377
very similar.  A working knowledge of the target processor is
378
helpful in understanding some of RTEMS' features.  A thorough
379
understanding of the executive cannot be obtained without
380
studying the entire manual because many of RTEMS' concepts and
381
features are interrelated.  Experienced RTEMS users will find
382
that the manual organization facilitates its use as a reference
383
document.
384
 
385
@section Conventions
386
 
387
The following conventions are used in this manual:
388
 
389
@itemize @bullet
390
@item Significant words or phrases as well as all directive
391
names are printed in bold type.
392
 
393
@item Items in bold capital letters are constants defined by
394
RTEMS.  Each language interface provided by RTEMS includes a
395
file containing the standard set of constants, data types, and
396
@value{STRUCTURE} definitions which can be incorporated into the user
397
application.
398
 
399
@item A number of type definitions are provided by RTEMS and
400
can be found in rtems.h.
401
 
402
@item The characters "0x" preceding a number indicates that
403
the number is in hexadecimal format.  Any other numbers are
404
assumed to be in decimal format.
405
@end itemize
406
 
407
@section Manual Organization
408
 
409
This first chapter has presented the introductory and
410
background material for the RTEMS executive.  The remaining
411
chapters of this manual present a detailed description of RTEMS
412
and the environment, including run time behavior, it creates for
413
the user.
414
 
415
A chapter is dedicated to each manager and provides a
416
detailed discussion of each RTEMS manager and the directives
417
which it provides.  The presentation format for each directive
418
includes 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
 
427
The following provides an overview of the remainder
428
of this manual:
429
 
430
@table @asis
431
@item Chapter 2
432
Key Concepts: presents an
433
introduction to the ideas which are common across multiple RTEMS
434
managers.
435
 
436
@item Chapter 3:
437
Initialization Manager: describes the functionality and directives
438
provided by the Initialization Manager.
439
 
440
@item Chapter 4:
441
Task Manager: describes the functionality and directives provided
442
by the Task Manager.
443
 
444
@item Chapter 5:
445
Interrupt Manager: describes the functionality and directives
446
provided by the Interrupt Manager.
447
 
448
@item Chapter 6:
449
Clock Manager: describes the functionality and directives
450
provided by the Clock Manager.
451
 
452
@item Chapter 7
453
Timer Manager: describes the functionality and directives provided
454
by the Timer Manager.
455
 
456
@item Chapter 8:
457
Semaphore Manager: describes the functionality and directives
458
provided by the Semaphore Manager.
459
 
460
@item Chapter 9:
461
Message Manager: describes the functionality and directives
462
provided by the Message Manager.
463
 
464
@item Chapter 10:
465
Event Manager: describes the
466
functionality and directives provided by the Event Manager.
467
 
468
@item Chapter 11:
469
Signal Manager: describes the
470
functionality and directives provided by the Signal Manager.
471
 
472
@item Chapter 12:
473
Partition Manager: describes the
474
functionality and directives provided by the Partition Manager.
475
 
476
@item Chapter 13:
477
Region Manager: describes the
478
functionality and directives provided by the Region Manager.
479
 
480
@item Chapter 14:
481
Dual-Ported Memory Manager: describes
482
the functionality and directives provided by the Dual-Ported
483
Memory Manager.
484
 
485
@item Chapter 15:
486
I/O Manager: describes the
487
functionality and directives provided by the I/O Manager.
488
 
489
@item Chapter 16:
490
Fatal Error Manager: describes the functionality and directives
491
provided by the Fatal Error Manager.
492
 
493
@item Chapter 17:
494
Scheduling Concepts: details the RTEMS scheduling algorithm and
495
task state transitions.
496
 
497
@item Chapter 18:
498
Rate Monotonic Manager: describes the functionality and directives
499
provided by the Rate Monotonic Manager.
500
 
501
@item Chapter 19:
502
Board Support Packages: defines the
503
functionality required of user-supplied board support packages.
504
 
505
@item Chapter 20:
506
User Extensions: shows the user how to
507
extend RTEMS to incorporate custom features.
508
 
509
@item Chapter 21:
510
Configuring a System: details the process by which one tailors RTEMS
511
for a particular single-processor or multiprocessor application.
512
 
513
@item Chapter 22:
514
Multiprocessing Manager: presents a
515
conceptual overview of the multiprocessing capabilities provided
516
by RTEMS as well as describing the Multiprocessing
517
Communications Interface Layer and Multiprocessing Manager
518
directives.
519
 
520
@item Chapter 23:
521
Directive Status Codes: provides a definition of each of the
522
directive status codes referenced in this manual.
523
 
524
@item Chapter 24:
525
Example Application: provides a template for simple RTEMS applications.
526
 
527
@item Chapter 25:
528
Glossary: defines terms used throughout this manual.
529
 
530
@end table
531
 
532
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.