没有合适的资源?快使用搜索试试~ 我知道了~
首页QNX_Neutrino_RTOS_System_Architecture
QNX_Neutrino_RTOS_System_Architecture

The System Architecture guide accompanies the QNX Neutrino RTOS and is intended for both application developers and end-users. This guide describes the philosophy of QNX Neutrino and the architecture used to robustly implement the OS. It covers message-passing services, followed by the details of the microkernel, the process manager, resource managers, and other aspects of the OS.
资源详情
资源评论
资源推荐

QNX
®
Software Development Platform 6.6
QNX
®
Software Development Platform 6.6
QNX
®
Neutrino
®
RTOS
System Architecture

©
1996–2014, QNX Software Systems Limited, a subsidiary of BlackBerry. All
rights reserved.
QNX Software Systems Limited
1001 Farrar Road
Ottawa, Ontario
K2K 0B3
Canada
Voice: +1 613 591-0931
Fax: +1 613 591-3579
Email: info@qnx.com
Web: http://www.qnx.com/
QNX, QNX CAR, Neutrino, Momentics, Aviage, and Foundry27 are trademarks
of BlackBerry Limited that are registered and/or used in certain jurisdictions,
and used under license by QNX Software Systems Limited. All other trademarks
belong to their respective owners.
Electronic edition published: Thursday, February 20, 2014

Table of Contents
About This Guide ......................................................................................................................9
Typographical conventions ...............................................................................................10
Technical support ...........................................................................................................12
Chapter 1: The Philosophy of the QNX Neutrino RTOS .................................................................13
An embeddable POSIX OS? .............................................................................................14
Product scaling ..............................................................................................................15
Why POSIX for embedded systems? ..................................................................................16
Why QNX Neutrino for embedded systems? .......................................................................18
Microkernel architecture ..................................................................................................19
The OS as a team of processes ...............................................................................20
A true kernel .........................................................................................................21
System processes ..................................................................................................22
Interprocess communication ............................................................................................24
QNX Neutrino as a message-passing operating system ...............................................24
Network distribution of kernels .........................................................................................25
Single-computer model ..........................................................................................25
Flexible networking ................................................................................................25
Chapter 2: The QNX Neutrino Microkernel ..................................................................................27
The implementation of the QNX Neutrino RTOS .................................................................28
POSIX realtime and thread extensions .....................................................................28
System services ..............................................................................................................29
Threads and processes ....................................................................................................31
Thread attributes ...................................................................................................33
Thread life cycle ....................................................................................................35
Thread scheduling ..........................................................................................................38
Scheduling priority ................................................................................................38
Scheduling policies ...............................................................................................40
IPC issues ............................................................................................................45
Thread complexity issues .......................................................................................46
Synchronization services ..................................................................................................47
Mutexes: mutual exclusion locks .............................................................................48
Condvars: condition variables .................................................................................49
Barriers ................................................................................................................50
Sleepon locks .......................................................................................................52
Reader/writer locks ................................................................................................52
Semaphores ..........................................................................................................53
Synchronization via scheduling policy ......................................................................54
Synchronization via message passing .......................................................................54
QNX
®
Neutrino
®
RTOS

Synchronization via atomic operations .....................................................................54
Synchronization services implementation .................................................................55
Clock and timer services ..................................................................................................56
Time correction .....................................................................................................57
Timers ..................................................................................................................57
Interrupt handling ...........................................................................................................60
Interrupt latency ...................................................................................................60
Scheduling latency ................................................................................................61
Nested interrupts ..................................................................................................61
Interrupt calls .......................................................................................................62
Chapter 3: Interprocess Communication (IPC) .............................................................................67
Synchronous message passing .........................................................................................68
Message copying ............................................................................................................71
Simple messages ............................................................................................................74
Channels and connections ...............................................................................................75
Pulses ..................................................................................................................76
Priority inheritance and messages ...........................................................................77
Message-passing API ......................................................................................................78
Robust implementations with Send/Receive/Reply .............................................................79
Events ...........................................................................................................................81
I/O notification ......................................................................................................82
Signals ..........................................................................................................................83
Special signals ......................................................................................................84
Summary of signals ...............................................................................................86
POSIX message queues ...................................................................................................89
Why use POSIX message queues? ...........................................................................89
File-like interface ..................................................................................................89
Message-queue functions .......................................................................................90
Shared memory ..............................................................................................................91
Shared memory with message passing .....................................................................91
Creating a shared-memory object ............................................................................92
mmap() ................................................................................................................93
Initializing allocated memory ..................................................................................96
Typed memory ................................................................................................................99
Implementation-defined behavior ............................................................................99
Practical examples ..............................................................................................103
Pipes and FIFOs ...........................................................................................................105
Chapter 4: The Instrumented Microkernel .................................................................................107
Instrumentation at a glance ...........................................................................................108
Event control ................................................................................................................109
Modes of emission ...............................................................................................109
Ring buffer .........................................................................................................110
Table of Contents

Data interpretation ........................................................................................................111
System analysis with the IDE ................................................................................111
Proactive tracing ...........................................................................................................113
Chapter 5: Multicore Processing ..............................................................................................115
Asymmetric multiprocessing (AMP) ................................................................................116
Symmetric multiprocessing (SMP) ..................................................................................117
The QNX Neutrino RTOS's microkernel approach ....................................................117
Booting an x86 SMP system .................................................................................118
How the SMP microkernel works ...........................................................................119
Critical sections ..................................................................................................120
Bound multiprocessing (BMP) ........................................................................................122
A viable migration strategy ...................................................................................123
Choosing between AMP, SMP, and BMP ..........................................................................124
Chapter 6: Process Manager ....................................................................................................125
Process management ....................................................................................................126
Process primitives ...............................................................................................126
Process loading ...................................................................................................131
Memory management ....................................................................................................132
Memory Management Units (MMUs) .....................................................................132
Memory protection at run time ..............................................................................133
Quality control ....................................................................................................135
Full-protection model ...........................................................................................135
Variable page size ................................................................................................136
Locking memory ..................................................................................................136
Defragmenting physical memory ...........................................................................138
Pathname management .................................................................................................142
Resolving pathnames ...........................................................................................143
Symbolic prefixes ................................................................................................147
File descriptor namespace ....................................................................................150
Chapter 7: Dynamic Linking ....................................................................................................153
Statically linked ............................................................................................................154
Dynamically linked ........................................................................................................155
Augmenting code at runtime ..........................................................................................156
How shared objects are used ..........................................................................................157
Memory layout for a typical process .......................................................................158
Runtime linker ....................................................................................................159
Loading a shared library at runtime .......................................................................160
Symbol name resolution .......................................................................................160
Chapter 8: Resource Managers ................................................................................................163
QNX
®
Neutrino
®
RTOS
剩余323页未读,继续阅读















安全验证
文档复制为VIP权益,开通VIP直接复制

评论10