Rto

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Rto as PDF for free.

More details

  • Words: 2,920
  • Pages: 15
RTOS

--- VxWorks Abstract

The VxWorks is the high performance real time operating system. Most widely used RTOS is the VxWorks. The operating system, which performs the proceeding in the real time instead of latter time with storing it in some memory. Development environment for this OS is Tornado, Wind River Systems Inc, US. This is scalable Operating system in which kernel, I/O system, network layer and all are in component nature and which are being used whenever required to add to Kernel. Modularity of this feature is one of the main advantage in development of real time applications.

Introduction VxWorks is the real time operating system (RTOS) unlike other operating systems like windows, Linux etc. It is the multi tasking and single user operating system. RTOS is response even for external events. The main advantage of RTOS is less context

switching

time,

accuracy and

predictable

response.

Development

environment for vxWorks is Tornado.

VxWorks: A Partner in the Real-time Development Cycle UNIX and Windows hosts are excellent systems for program development and for many interactive applications. However, they are not appropriate for real-time applications. On the other hand, traditional real-time operating systems provide poor environments for application development or for non-real-time components of an application, such as graphical user interfaces (GUIs). Rather than trying to create a single operating system that "does it all," the Wind River philosophy is to utilize two complementary and cooperating operating systems (VxWorks and UNIX, or VxWorks and Windows) and let each do what it does best.

VxWorks handles the critical real-time chores, while the host machine is used for program development and for applications that are not time-critical. You can scale VxWorks to include exactly the feature combinations your application requires. During development, you can include additional features to speed your work (such as the networking facilities), then exclude them to save resources in the final version of your application. You can use the cross-development host machine to edit, compile, link, and store realtime code, but then run and debug that real-time code on VxWorks. The resulting VxWorks application can run standalone--either in ROM or disk-based--with no further need for the network or the host system. However, the host machine and VxWorks can also work together in a hybrid application, with the host machine using VxWorks systems as real-time "servers" in a networked environment. For instance, a VxWorks system controlling a robot might itself be controlled by a host machine that runs an expert system, or several VxWorks systems running factory equipment might be connected to host machines that track inventory or generate reports.

High-Performance Real-time Kernel Facilities

The VxWorks kernel, wind, includes multitasking with preemptive priority scheduling, intertask synchronization and communications facilities, interrupt handling support, watchdog timers, and memory management.

POSIX Compatibility VxWorks provides most interfaces specified by the 1003.1b standard (formerly the 1003.4 standard), simplifying your ports from other conforming systems.

I/O System VxWorks provides a fast and flexible ANSI C-compatible I/O system, including UNIX standard buffered I/O and POSIX standard asynchronous I/O. VxWorks includes the following drivers:

Network driver

-for

network

devices

(Ethernet,

shared

memory) Pipe driver -for intertask communication RAM "disk"-for memory-resident files driver SCSI driver -for SCSI hard disks, diskettes, and tape drives Keyboard driver -for PC x86 keyboards (x86 BSP only) Display driver -for PC x86 VGA displays (x86 BSP only) Disk driver -for IDE and floppy disk drives (x86 BSP only) Parallel port driver -for PC-style target hardware

Local File Systems 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.

C++ Development Support 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:

o

VxWorks Wrapper Class library

o

Tool’s.++ library from Rogue Wave

Shared-Memory Objects (VxMP Option)

The VxMP option provides facilities for sharing semaphores, message queues, and memory regions between tasks on different processors.

Virtual Memory (Including VxVMI Option) 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.

Target-resident Tools In the Tornado development system, the development tools reside on the host system. However, a target-resident shell, module loader and unloader, and symbol table can be configured into the VxWorks system if necessary.

Utility Libraries 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.

Performance Evaluation Tools 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.

Target Agent The target agent allows a VxWorks application to be remotely debugged using the Tornado development tools.

Board Support Packages

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.

VxWorks Simulator (VxSim) and Logic Analyzer (WindView) 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.

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.

Network Facilities VxWorks provides "transparent" access to other VxWorks and TCP/IP-networked systems. 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.

Multitasking and Intertask Communications 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. The VxWorks multitasking kernel, wind, uses interrupt-driven, priority-based task scheduling. It features fast context switch times and low interrupt latency. Under VxWorks, any subroutine can be spawned 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. The wind kernel supplies semaphores as the basic task synchronization and mutualexclusion mechanism. There are several kinds of semaphores in wind, specialized for different application needs: binary semaphores, counting semaphores, mutualexclusion 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. For intertask communications, the wind 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. In addition, semaphores are described in the semLib and semPxLib reference entries; message queues are described in the msgQLib and mqPxLib reference entries;

POSIX Interfaces 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.

o

asynchronous I/O

o

semaphores

o

message queues

o

memory management

o

queued signals

o

scheduling

o

clocks and timers

In addition, several interfaces from the traditional POSIX 1003.1 standard are also supported.

I/O System The VxWorks I/O system provides uniform device-independent access to many kinds of devices. You can call seven basic I/O routines: creat ( ), remove ( ), open ( ), close

( ), read ( ), write ( ), and ioctl ( ). Higher-level I/O routines (such as ANSI Ccompatible printf ( ) and scanf ( ) routines) are also provided. VxWorks also provides a standard buffered I/O package (stdio) that includes ANSI Ccompatible routines such as fopen ( ), fclose ( ), fread ( ), fwrite ( ), getc ( ), and putc ( ). These routines increase I/O performance in many cases. 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. VxWorks includes device drivers for serial communication, disks, RAM disks, SCSI tape devices, intertask communication devices (called pipes), 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.

Local File Systems 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. MS-DOS Compatible File System: dosFs VxWorks provides the dosFs file system, which is compatible with the MS-DOS file system (for MS-DOS versions up to and including 6.2). The capabilities of dosFs

offer considerable flexibility appropriate to the varying demands of real-time applications. Major features include: •

A hierarchical arrangement of files and directories, allowing efficient organization and permitting an arbitrary number of files to be created on a volume.



The ability to specify contiguous file allocation on a per-file basis. Contiguous files offer enhanced performance, while non-contiguous files result in more efficient use of disk space.



Compatibility with widely available storage and retrieval media. Diskettes created with dosFs and on MS-DOS personal computers can be freely interchanged and hard drives created with MS-DOS can be read by dosFs if it is correctly configured.



Optional case-sensitive file names, with name lengths not restricted to the MS-DOS eight-character + extension convention.

Raw Disk File System: rawFs VxWorks provides rawFs, a simple "raw disk file system" for use with disk devices. rawFs treats the entire disk much like a single large file. The rawFs file system permits reading and writing portions of the disk, specified by byte offset, and it performs simple buffering. When only simple, low-level disk I/O is required, rawFs has the advantages of size and speed.

cdRomFs

VxWorks provides the cdromFs file system which lets applications read any CDROM that is formatted in accordance with ISO 9660 file system standards. After initializing cdRomFs and mounting it on a CD-ROM block device, you can access data on that device using the standard POSIX I/O calls.

Target-Resident Tools In the Tornado development system, a full suite of development tools reside and execute on the host machine. However, a target-resident shell, symbol table, and module loader/unloader can be configured into the VxWorks system if necessary, for example, to create a dynamically configured run-time system.

C++ Development (including Wind Foundation Classes Option)

VxWorks supports C++ development. The GNU C++ compiler is shipped with Tornado. The Tornado compiler provides support for multi-thread-safe exception handling. Tornado includes a new version of the iostream library and the SGI implementation of the Standard Template Library. The standard Tornado interactive development tools such as the debugger, the shell, and the incremental loader include C++ support. In addition, you can order the Wind Foundation Classes optional component to add the following libraries:

o

VxWorks Wrapper Class library

o

Tools.h++ library from Rogue Wave

Utility Libraries

VxWorks supplies many subroutines of general utility to application developers. These routines are organized as a set of subroutine libraries, which are described below. We urge you to use these libraries wherever possible. Using library utilities reduces both development time and memory requirements for the application. Interrupt Handling Support

VxWorks supplies routines for handling hardware interrupts and software traps without having to resort to assembly language coding. Routines are provided to connect C routines to hardware interrupt vectors, and to manipulate the processor interrupt level. Watchdog Timers A watchdog facility allows callers to schedule execution of their own routines after specified time delays. As soon as the specified number of ticks have elapsed, the specified "timeout" routine is called at the interrupt level of the system clock, unless the watchdog is canceled first. This mechanism is entirely different from the kernel's task delay facility. Message Logging A simple message logging facility allows applications to send error or status messages to a logging task, which then formats and outputs the messages to a systemwide logging device (such as the system console, disk, or accessible memory). The message logging facility can be used from either interrupt level or task level.

Memory Allocation

VxWorks supplies a memory management facility useful for dynamically allocating, freeing, and reallocating blocks of memory from a memory pool. Blocks of arbitrary size can be allocated, and you can specify the size of the memory pool. This memory scheme is built on a much more general mechanism that allows VxWorks to manage several separate memory pools. String Formatting and Scanning VxWorks includes a complete set of ANSI C library string formatting and scanning subroutines that implement

printf ( )/scanf ( ) format-driven encoding and decoding

and associated routines. Linear and Ring Buffer Manipulations The library bLib contains buffer manipulation routines such as copying, filling, comparing, and so on, that have been optimized for speed. The library rngLib provides a set of general ring buffer routines that manage first-in-first-out (FIFO) circular buffers. Additionally, these ring buffers have the property that a single writer and a single reader can access a ring buffer "simultaneously" without being required to interlock their accesses explicitly. ANSI C Libraries

VxWorks provides all C libraries specified by ANSI X3.159-1989. The ANSI C specification includes the following libraries: assert, ctype, errno, float, limits, locale, math, setjmp, signal, stdarg, stdio, stddef, stdlib, string, and time.

Performance Evaluation

To understand and optimize the performance of a real-time system, it can be useful to time some of the VxWorks or application routines. VxWorks provides various timing facilities to help with this task. The VxWorks execution timer can time any subroutine or group of subroutines. Because the system clock is too slow to provide the resolution necessary to time especially fast routines, the timer can also repeatedly execute a group of routines until the time of a single iteration is known to a reasonable accuracy. VxWorks also provides the spy utility, which provides CPU utilization information for each task: the CPU time consumed, the time spent at interrupt level, and the amount of idle time. Time is displayed in ticks and in percentages. Even more powerful monitoring of the VxWorks system is available using the optional product WindView.

Target Agent The target agent follows the WDB (Wind DeBug) protocol, allowing a VxWorks target to be connected to the Tornado development tools. In the target agent's default configuration, shown in Figure 1, the agent runs as the VxWorks task tWdbTask. The Tornado target server sends debugging requests to the target agent. The debugging requests often result in the target agent controlling or manipulating other tasks in the system.

By default, the target server and agent communicate using the network. However, you can use alternative communication paths.

Figure1:  Interactive  between   target  server and target agent. 

Board Support Packages (BSPs) Two target-specific libraries, sysLib and sysALib, are included with each port of VxWorks. These libraries are the heart of VxWorks portability; they provide an identical software interface to the hardware functions of all boards. They include facilities for hardware initialization, interrupt handling and generation, hardware clock and timer management, mapping of local and bus memory spaces, memory sizing, and so on. Each BSP also includes a boot ROM or other boot mechanism. Many of these import the run-time image from the development host.

VxWorks Simulator VxSim, the VxWorks simulator, is a program that simulates a VxWorks target for use as a prototyping and testing environment. The integrated version of the simulator allows a single simulator to be run. The VxSim optional product adds networking facilities, allowing the simulator to obtain an Internet address and communicate with the host (or other nodes on the network) using the VxWorks networking tools. VxSim is essentially a port of VxWorks. In most regards, its capabilities are identical to a true VxWorks system running on remote target hardware. You can link in an application and rebuild the VxWorks image exactly the same way as in any other

VxWorks cross-development environment. All Tornado development tools can be used with VxSim. The difference between VxSim and a remote VxWorks target environment is that in VxSim, the image executes on the host machine itself as a host process. There is no emulation of instructions, because the code is in the host's own CPU architecture. Because target hardware interaction is not possible, device-driver development may not be suitable for simulation. However, the VxWorks scheduler is implemented in the VxSim process, maintaining true tasking interaction with respect to priorities and preemption. This means that any application that is written in a portable style and with minimal hardware interaction should be portable between VxSim and VxWorks.

Reference: web sites www.windriver.com/products/html/vxwks5x.html www.cs.arizona.edu/people/bridges/os/realtime.html www.onesmartklick.com and few journals

Related Documents

Rto
November 2019 15
Rto
April 2020 27
Rto
November 2019 15
Rto Process
August 2019 23
All India Rto Codes
April 2020 15