没有合适的资源?快使用搜索试试~ 我知道了~
首页VxWorks 653 Programmer's Guide v2.3
资源详情
资源评论
资源推荐

VxWorks653
PROGRAMMER'S GUIDE
2.3
®
VxWorks 653 Programmer's Guide, 2.3

Copyright © 2010 Wind River Systems, Inc.
All rights reserved. No part of this publication may be reproduced or transmitted in any
form or by any means without the prior written permission of Wind River Systems, Inc.
Wind River, Tornado, and VxWorks are registered trademarks of Wind River Systems, Inc.
The Wind River logo is a trademark of Wind River Systems, Inc. Any third-party
trademarks referenced are the property of their respective owners. For further information
regarding Wind River trademarks, please see:
www.windriver.com/company/terms/trademark.html
This product may include software licensed to Wind River by third parties. Relevant
notices (if any) are provided in your product installation at the following location:
installDir/product_name/3rd_party_licensor_notice.pdf.
Wind River may refer to third-party documentation by listing publications or providing
links to third-party Web sites for informational purposes. Wind River accepts no
responsibility for the information provided in such third-party documentation.
Corporate Headquarters
Wind River
500 Wind River Way
Alameda, CA 94501-1153
U.S.A.
Toll free (
U
.
S
.
A
.):800-545-WIND
Telephone: 510-748-4100
Facsimile: 510-749-2010
For additional contact information, see the Wind River Web site:
www.windriver.com
For information on how to contact Customer Support, see:
www.windriver.com/support
VxWorks653
Programmer's Guide
2.3
26 Jan 10

iii
Contents
1Overview ......................................................................................................1
1.1About This Documentation ...........................................................................................1
1.2Overview of VxWorks653 .............................................................................................2
1.2.1Overview of the vThreads Partition OS .........................................................2
1.2.2Overview of COIL .............................................................................................3
1.3Run-time System .............................................................................................................3
1.3.1Run-time Layers ................................................................................................4
Core OS Layer ....................................................................................................4
vThreads Layer ..................................................................................................5
COIL Layer .........................................................................................................6
APEX Layer ........................................................................................................6
POSIX Layer .......................................................................................................6
1.3.2Supported Target Architectures ......................................................................6
1.3.3Loading and Booting ........................................................................................7
1.3.4Run-time Model ................................................................................................7
1.4RTCA/DO-178B Certification ........................................................................................7
2 Developing vThreads Applications ..........................................................9
2.1Introduction ......................................................................................................................9
2.2vThreads Time Management ........................................................................................11
2.2.1vThreads Timer Queue .....................................................................................11
2.2.2vThreads Scheduling ........................................................................................12
Priority-Preemptive Scheduling .....................................................................12
Round-Robin Scheduling .................................................................................12
2.3Handling External Stimuli ............................................................................................13
2.3.1vThreads Pseudo-Interrupt Signals ................................................................13
Pseudo-Interrupt Events Forbidden in User Handlers ...............................15

VxWorks653
Programmer's Guide, 2.3
iv
Pseudo-interrupt Events Permitted in User Handlers .................................16
2.3.2vThreads Synchronous Exception Handling ................................................16
2.4vThreads Memory Management ..................................................................................17
2.5vThreads Initialization and Restart .............................................................................18
2.5.1vThreads Boot Sequence ..................................................................................18
2.5.2vThreads Restart ................................................................................................20
Cold Versus Warm Restarts .............................................................................20
Cooperative Warm Partition Restart Mechanism .........................................21
Partition Restart and Device Drivers ..............................................................22
2.6Stack Overflow Protection .............................................................................................22
2.6.1Guard Pages .......................................................................................................23
2.6.2Defaults ...............................................................................................................23
2.6.3Limitations .........................................................................................................23
2.7vThreads Device I/O .......................................................................................................25
2.8vThreads APIs ..................................................................................................................25
2.9vThreads System Calls ...................................................................................................25
3Developing COIL Applications ..................................................................27
3.1Introduction ......................................................................................................................27
3.2VxWorks653 Architecture and COIL ..........................................................................28
3.3Accessing Core OS Services ..........................................................................................29
3.4Communicating with Other Partitions .......................................................................29
3.5Handling Interrupts and Exceptions ...........................................................................30
3.5.1Handling Pseudo-Interrupts ...........................................................................30
3.5.2Handling Exceptions ........................................................................................31
3.6Restarting COIL Partitions ............................................................................................31
3.7Device I/O in COIL Partitions ......................................................................................32
3.8Monitoring Health in COIL Partitions .......................................................................32
3.9COIL API ..........................................................................................................................32
4Developing APEX Applications .................................................................33
4.1Introduction ......................................................................................................................33
4.2Adding APEX Support to vThreads Partitions ..........................................................34

Contents
v
4.3Terminology and Concepts: APEX Versus vThreads ................................................35
4.4Managing APEX Partitions ............................................................................................35
4.4.1Allocating Partition Memory ...........................................................................35
4.4.2Initializing Partitions: Cold and Warm Starts ...............................................36
4.4.3Partition Attributes ...........................................................................................36
4.4.4Getting Partition Status ....................................................................................37
4.4.5Setting the Partition Mode ...............................................................................37
4.4.6Controlling Preemption in Partitions .............................................................38
4.4.7Setting New Partition Schedules .....................................................................39
4.5Managing APEX Processes ............................................................................................39
4.5.1Creating Processes .............................................................................................39
4.5.2Changing the Current Priority of Processes ..................................................40
4.5.3Increasing Deadline Times ...............................................................................40
4.5.4Getting the Current Status of Processes .........................................................41
4.5.5Getting Process IDs ...........................................................................................41
4.5.6Getting and Using vThreads Task Information ............................................41
4.5.7Types of Processes .............................................................................................41
4.5.8Scheduling Processes ........................................................................................42
4.5.9Process State Transitions ..................................................................................42
DORMANT State ..............................................................................................43
WAITING State ..................................................................................................43
RUNNING State ................................................................................................44
READY State ......................................................................................................45
4.5.10Suspending and Resuming Processes ............................................................45
4.5.11Stopping and Starting Processes .....................................................................46
4.5.12Controlling Preemption ....................................................................................46
4.6Managing Time in APEX Partitions .............................................................................47
4.6.1Scheduling Partitions ........................................................................................47
4.6.2System Clock Time ............................................................................................47
4.6.3Requesting Resources and Timeouts ..............................................................47
4.6.4Scheduling Processes ........................................................................................47
4.6.5Deadlines ............................................................................................................48
4.6.6Release Points ....................................................................................................50
4.7Communicating between Partitions ............................................................................50
4.7.1Limitations of APEX for Communicating between Partitions ...................51
4.7.2APEX Messages .................................................................................................51
4.7.3APEX Channels .................................................................................................52
剩余325页未读,继续阅读

















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

评论1