📄 c-over4.html
字号:
<b class="BulletHead"><li><a name="83499"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Local File Systems</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="83500"> </a>VxWorks provides fast file systems tailored to real-time applications. One file system is compatible with the MS-DOS® file system, another with the RT-11 file system, a third is a "raw disk" file system, a fourth supports SCSI tape devices, and a fifth supports CD-ROM devices.</div><br></dl><dl class="margin"><b class="BulletHead"><li><a name="86777"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">C++ Development Support</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="86778"> </a>In addition to general C++ support including the iostream library and the standard template library, the optional component Wind Foundation Classes adds the following C++ object libraries:</div><br></dl><dl class="margin"><ul class="DashSingle2" type="circle"><li><a name="86779"> </a>VxWorks Wrapper Class library</li></ul><ul class="DashSingle2" type="circle"><li><a name="86780"> </a>Tools.h++ library from Rogue Wave</li></ul></dl><dl class="margin"><b class="BulletHead"><li><a name="86787"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Shared-Memory Objects (VxMP Option)</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="86788"> </a>The VxMP option provides facilities for sharing semaphores, message queues, and memory regions between tasks on different processors. </div><br></dl><dl class="margin"><b class="BulletHead"><li><a name="83506"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Virtual Memory (Including VxVMI Option)</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="83507"> </a>VxWorks provides both bundled and unbundled (VxVMI) virtual memory support for boards with an MMU, including the ability to make portions of memory noncacheable or read-only, as well as a set of routines for virtual-memory management.</div><br></dl><dl class="margin"><b class="BulletHead"><li><a name="83510"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Target-resident Tools</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="83511"> </a>In the Tornado development system, the development tools reside on the host system; see the <i class="title">Tornado User's Guide</i> for details. However, a target-resident shell, module loader and unloader, and symbol table can be configured into the VxWorks system if necessary.</div><br></dl><dl class="margin"><b class="BulletHead"><li><a name="83518"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Utility Libraries</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="83519"> </a>VxWorks provides an extensive set of utility routines, including interrupt handling, watchdog timers, message logging, memory allocation, string formatting and scanning, linear and ring buffer manipulations, linked-list manipulations, and ANSI C libraries.</div><br></dl><dl class="margin"><b class="BulletHead"><li><a name="83520"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Performance Evaluation Tools</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="83521"> </a>VxWorks performance evaluation tools include an execution timer for timing a routine or group of routines, and utilities to show CPU utilization percentage by task.</div><br></dl><dl class="margin"><b class="BulletHead"><li><a name="83522"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Target Agent</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="83523"> </a>The target agent allows a VxWorks application to be remotely debugged using the Tornado development tools.</div><br></dl><dl class="margin"><b class="BulletHead"><li><a name="83524"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Board Support Packages</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="83525"> </a>Board Support Packages (BSPs) are available for a variety of boards and provide routines for hardware initialization, interrupt setup, timers, memory mapping, and so on.</div><br></dl><dl class="margin"><b class="BulletHead"><li><a name="83526"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">VxWorks Simulator (VxSim) and Logic Analyzer (WindView)</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="83527"> </a>Tornado comes with an integrated simulator and software logic analyzer on all host platforms. VxSim simulates a VxWorks target for use as a prototyping and testing environment. WindView provides advanced debugging tools for the simulator environment. </div><br><dd><div class="Indent"><a name="86390"> </a>The optional product VxSim provides networking capability and the ability to run multiple simulators. The optional product WindView provides software logic analyzer support for all WRS BSPs.</div><br></dl><dl class="margin"><b class="BulletHead"><li><a name="86765"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Network Facilities</font></li></b></dl><dl class="margin"><dd><div class="Indent"><a name="86766"> </a>VxWorks provides "transparent" access to other VxWorks and TCP/IP-networked systems, a MUX interface (supporting advanced features such as multicasting, polled-mode Ethernet, and zero-copy transmission), a BSD<sup><a href="#foot"><b class="FootnoteMarker">1</b></a></sup> Sockets-compliant programming interface, remote procedure calls (RPC), SNMP (optional), remote file access (including NFS client and server facilities and a non-NFS facility utilizing RSH, FTP, or TFTP), BOOTP, proxy ARP, DHCP, DNS, OSPF (optional), and RIP. All VxWorks network facilities comply with standard Internet protocols, both loosely coupled over serial lines or standard Ethernet connections and tightly coupled over a backplane bus using shared memory.</div><br><dd><div class="Indent"><a name="86791"> </a>For information on VxWorks network support, see the <i class="title">VxWorks Network Programmer's Guide</i>.</div><br></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="83529">Multitasking and Intertask Communications</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="83530"> </a>Modern real-time systems are based on the complementary concepts of multitasking and intertask communications. A multitasking environment allows real-time applications to be constructed as a set of independent tasks, each with a separate thread of execution and its own set of system resources. The intertask communication facilities allow these tasks to synchronize and coordinate their activity.</p><dd><p class="Body"><a name="83533"> </a>The VxWorks multitasking kernel, <i class="i">wind</i>, uses interrupt-driven, priority-based task scheduling. It features fast context switch times and low interrupt latency. Under VxWorks, any subroutine can be <i class="term">spawned</i> as a separate task, with its own context and stack. Other basic task control facilities allow tasks to be suspended, resumed, deleted, delayed, and moved in priority. See <a href="c-basic3.html#83567"><i class="title">2.3 Tasks</i></a> and the reference entry for <b class="library">taskLib</b>.</p><dd><p class="Body"><a name="83538"> </a>The <i class="i">wind</i> kernel supplies semaphores as the basic task synchronization and mutual-exclusion mechanism. There are several kinds of semaphores in <i class="i">wind</i>, specialized for different application needs: binary semaphores, counting semaphores, mutual-exclusion semaphores, and POSIX semaphores. All of these semaphore types are fast and efficient. In addition to being available to application developers, they have also been used extensively in building higher-level facilities in VxWorks.</p><dd><p class="Body"><a name="83539"> </a>For intertask communications, the <i class="i">wind</i> kernel also supplies message queues, pipes, sockets, and signals. The optional component VxMP provides shared-memory objects as a communication mechanism for tasks executing on different CPUs. For information on all these facilities, see <a href="c-smo.html#84368"><i class="title">6. Shared-Memory Objects</i></a> and <a href="c-basic4.html#95697"><i class="title">2.4 Intertask Communications</i></a>. In addition, semaphores are described in the <b class="library">semLib </b>and <b class="library">semPxLib</b> reference entries; message queues are described in the <b class="library">msgQLib</b> and <b class="library">mqPxLib</b> reference entries; pipes are described in the <b class="library">pipeDrv</b> reference entry and <a href="c-basic4.html#86337"><i class="title">2.4.5 Pipes</i></a>; sockets are described in the <b class="library">sockLib</b> reference entry and <a href="c-basic4.html#88476"><i class="title">2.4.6 Network Intertask Communication</i></a>; and signals are described in the <b class="library">sigLib</b> reference entry and <a href="c-basic4.html#86380"><i class="title">2.4.7 Signals</i></a>.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="83555">POSIX Interfaces</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="83557"> </a>POSIX (the Portable Operating System Interface) is a set of standards under development by representatives of the software community, working under an ISO/IEEE charter. The purpose of this effort is to support application portability at the source level across operating systems. This effort has yielded a set of interfaces (POSIX standard 1003.1b, formerly called 1003.4) for real-time operating system services. Using these interfaces makes it easier to move applications from one operating system to another. </p><dd><p class="Body"><a name="83558"> </a>For a list of POSIX facilities, look under <b class="symbol_UC">POSIX</b> in the keyword index in the <i class="title">VxWorks Reference Manual</i> or in the <i class="title">Tornado Online Manuals</i>. Nearly all POSIX 1003.1b interfaces are available in VxWorks, including POSIX interfaces for: </p></dl><dl class="margin"><ul class="DashSingle" type="circle"><li><a name="83559"> </a>asynchronous I/O</li></ul><ul class="DashSingle" type="circle"><li><a name="83560"> </a>semaphores</li></ul><ul class="DashSingle" type="circle"><li><a name="83561"> </a>message queues</li></ul><ul class="DashSingle" type="circle"><li><a name="83562"> </a>memory management</li></ul><ul class="DashSingle" type="circle"><li><a name="83563"> </a>queued signals</li></ul><ul class="DashSingle" type="circle"><li><a name="83564"> </a>scheduling</li></ul><ul class="DashSingle" type="circle"><li><a name="83565"> </a>clocks and timers</li></ul></dl><dl class="margin"><dd><p class="Body"><a name="83566"> </a>In addition, several interfaces from the traditional POSIX 1003.1 standard are also supported.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="83567">I/O System</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="86986"> </a>The VxWorks I/O system provides uniform device-independent access to many kinds of devices. You can call seven basic I/O routines: <b class="routine"><i class="routine">creat</i></b><b>( )</b>, <b class="routine"><i class="routine">remove</i></b><b>( )</b>, <b class="routine"><i class="routine">open</i></b><b>( )</b>, <b class="routine"><i class="routine">close</i></b><b>( )</b>, <b class="routine"><i class="routine">read</i></b><b>( )</b>, <b class="routine"><i class="routine">write</i></b><b>( )</b>, and <b class="routine"><i class="routine">ioctl</i></b><b>( )</b>. Higher-level I/O routines (such as ANSI C-compatible <b class="routine"><i class="routine">printf</i></b><b>( )</b> and <b class="routine"><i class="routine">scanf</i></b><b>( )</b> routines) are also provided.</p><dd><p class="Body"><a name="83570"> </a>VxWorks also provides a standard buffered I/O package (<i class="acronym_lc">stdio</i>) that includes ANSI C-compatible routines such as <b class="routine"><i class="routine">fopen</i></b><b>( )</b>, <b class="routine"><i class="routine">fclose</i></b><b>( )</b>, <b class="routine"><i class="routine">fread</i></b><b>( )</b>, <b class="routine"><i class="routine">fwrite</i></b><b>( )</b>, <b class="routine"><i class="routine">getc</i></b><b>( )</b>, and <b class="routine"><i class="routine">putc</i></b><b>( )</b>. These routines increase I/O performance in many cases.</p><dd><p class="Body"><a name="83571"> </a>The VxWorks I/O system also includes POSIX-compliant asynchronous I/O: a library of routines that perform input and output operations concurrently with a task's other activities.</p><dd><p class="Body"><a name="83572"> </a>VxWorks includes device drivers for serial communication, disks, RAM disks, SCSI tape devices, intertask communication devices (called <i class="term">pipes</i>), and devices on a network. Application developers can easily write additional drivers, if needed. VxWorks allows dynamic installation and removal of drivers without rebooting the system.</p><dd><p class="Body"><a name="83573"> </a>Internally, the VxWorks I/O system allows individual drivers complete control over how the user requests are serviced. Drivers can easily implement different protocols, unique device-specific routines, and even different file systems, without interference from the I/O system itself. VxWorks also supplies several high-level packages that make it easy for drivers to implement common device protocols and file systems.</p><dd><p class="Body"><a name="83577"> </a>For a detailed discussion of the I/O system, see <a href="c-iosys.html#83549"><i class="title">3. I/O System</i></a>. Relevant reference entries include <b class="library">ioLib</b> for basic I/O routines available to tasks, <b class="library">fioLib</b> and <b class="library">ansiStdio </b>for various format-driven I/O routines, <b class="library">aioPxLib</b> for asynchronous I/O, and <b class="library">iosLib</b> and <b class="library">tyLib</b> for routines available to driver writers. Also see the reference entries for the supplied drivers.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="83582">Local File Systems</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="83583"> </a>VxWorks includes several local file systems for use with block devices (disks). These devices all use a standard interface so that file systems can be freely mixed with device drivers. Local file systems for SCSI tape devices and CD-ROM devices are also included. The VxWorks I/O architecture makes it possible to have several different file systems on a single VxWorks system, even at the same time.</p></dl></dl><dl class="margin">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -