This presentation includes a detail of various real time operating systems and it focuses on Vx Works. It will also help you understand what not is a RTOS.
2. Things included:
• What is real time?
• What a RTOS is not!!
• Overview of different RTOS
• What is RTOS?
• Standard of RTOS
• Working of RTOS
• Applications of RTOS
• References
3. What is Real Time ?
Real time in operating systems:
The ability of the
operating system to provide a required level of service in a bounded
response time.”
4. What a RTOS is not!!
• Real time computing is NOT fast computing.
• For example, a massive supercomputer
• Furthermore, if a network server is highly loaded with network traffic,
its response time may be slower but will (in most cases) still succeed
before it times out (hits its deadline). Hence, such a network server
would not be considered a real-time system.
• FTSE 100 Index (The Financial Times Stock Exchange 100 Index).
• Predictability and not Performance
5. Vx works Overview:
• Developer Wind River (subsidiary of Intel Corporation)
• OS family Real-time operating systems
• Initial release 1987; 28 years ago
• Latest release 7 / March 2014; 1 year ago
• Marketing target Embedded systems
• Platforms x86-64, PowerPC, ARM
• Kernel type Monolithic
• Official website www.windriver.com/products/vxworks/
7. FREE rtos overview:
• Developer Real Time Engineers Ltd.
• OS family Real-time operating systems
• Source model Open source
• Latest release 8.2.0 / January 16th, 2015
• Marketing target Embedded devices
• Platforms ARM, Atmel AVR,PIC,x86,8052,Cortex-R4
• Kernel type Microkernel
• Official website www.freertos.org
8. Windows CE (Embedded compact)
• Developer Microsoft
• Written in C
• Source model Closed source (shared source kernel)
• Initial release 16 November 1996; 18 years ago
• Latest release Embedded Compact 20131(3 June 2013)
• Platforms x86, MIPS, 32-bit ARM
• Kernel type Hybrid
• License Commercial proprietary software (volume licensing)
• Succeeded by Windows RT
• Official website microsoft.com/windowsembedded/
9. REAL TIME OPERATING SYSTEM (RTOS)
A real time operating system(RTOS) is an operating system (OS) intended to serve
real time application requests.
Key factors of RTOS is minimum interrupt latency and min thread switch latency.
Types of RTOS
• Soft RTOS : Meets the deadline usually.
• Hard RTOS : Meets the deadline deterministcally.
10. STANDARD FOR RTOS:
• Standard requirement for RTOS is POSIX(Portable Operating System
Interface) 1003.1b by ISO/IEEE chapter.
• It has following attributes:
POSIX.1b, Real-time extensions (IEEE Std 1003.1b-1993)
•Priority Scheduling
• Real-Time Signals
• Clocks and Timers
• Semaphores
• Message Passing
• Shared Memory
• Memory Locking Interface
11. BASIC OPERATING SYSTEM
• VxWorks kernel “wind” includes both POSIX interface and interfaces
especially for VxWorks.
• Task : Applications are organized into independent, though
cooperating programs, each of these programs, while executing, is
called task, (Multitasking is carried out).
Task’s Context:
a. A Thread of execution, which is task’s program counter.
b. The CPU registers and floating point registers.
c. A stack for dynamic variables and function calls.
d. I/O assignments for standard input, output, and error.
e. A delay timer, timer slice timer, kernel contol structures.
12. BASIC OPERATING SYSTEM CONT…
Task State Transition
• Upon creation, task enters suspended state.
• Activation is necessary for the task to enter ready state.
• Task can be deleted from any state.
13. BASIC OPERATING SYSTEM CONT…
MULTITASKING
• Suspended- used primarily for debugging
• Ready- wait for CPU
• Pended- blocked, wait delta T time for resources.
• Delay- asleep for delta T time, after delta T goes to ready
state.
P R D
S
14. BASIC OPERATING SYSTEM CONT…
WIND TASK SCHEDULING
Priority based primptive scheduling is default algorithm , but we can select Round-
Robin Scheduling for application as well.
• Primitive Priority Scheduling: Higher priority task executes first, during switching
kernel saves current task’s context .
256 Priority levels: Highest priority is 0 and lowest priority is
256
• Round-Robin Scheduling: Round-Robin scheduling achieves fair allocation of CPU
to task of same priority by time slicing.
Primption Lock: Wind scheduler can be explicitly disabled
and enabled on a per task basis.
15. BASIC OPERATING SYSTEM CONT…
• Interrupt: To inform the system the occurrence of external event.
For the fastest possible response to interrupts, ISR( Interrupt Service Routine) in
VxWorks run in a special context outside of any task’s context.
Thus interrupt handling involves no task context switch.
• Watch Dog Timers: This mechanism allows any C function to be connected
to a specified time delay.
• POSIX Clocks: Clocks is a software construct that keeps time in seconds and
nanoseconds.
• Timers: It provides routines for tasks to signal themselves at sometime in
future.
16. INTER-TASK COMMUNICATION
INCLUDES:
a. Shared Memory: For simple sharing of data.
b. Semaphores: For basic mutual exclusion and synchronization.
c. Message Queues and Pipes: For inter-task message passing.
d. Sockets and RPC: For network transparent inter-task
communication.
e. Signals: For exception handling.
17. INTER-TASK COMMUNICATION CONT…
• Shared Memory: Task communicates by accessing shared data
structure. Global variables, linear buffers, ring buffers, linked lists and
pointers can be referenced directly by code running in different
contexts.
• Semaphores: Three types of semaphores optimized to address different
classes of problems.
a. Binary: Optimised for synchronization or mutual exclusion.
b. Mutual Exclusion: Specialized binary semaphore.
It differs from binary semaphore in following ways:
1. It can be used only for mutual exclusion.
2. It can be given only by the task that took it.
3. semFlush() operation is illegal.
c. POSIX: These semaphore are for use on a single CPU.
18. INTER-TASK COMMUNICATION CONT…
• Message Queues: Primary Inter-task communication mechanism.
Optional product VxMP provides global message queues that can be used across
processor.
a. Message queues allows variable number of messages, each of variable length. Any task can send or
receive messages to or from message queue.
b. Multiple task can send to and receive from same message queue.
c. Message are queued in FIFO ( High priority messages attached at head of queue ).
d. TIME OUTS: During sending or receiving messages, timeout specifies how many ticks to wait for buffer
space to become available or a message become available.
• Pipes: Pipes are virtual I/O device. Task blocks when tries to read from
empty pipe or tries to write to full pipe. It provides unique facility
called select(). This routine allows task to wait for data to be available
on any of a set of I/O device.
19. LOCAL FILE SYSTEM
• VxWorks provide two local file systems appropriate for real time used with block
devices.
• One is compatible with MS-DOS file systems and the other with the RT-11 file
system.
• In VxWorks, the file system is not tied to a specific type of block device or its driver.
VxWorks block devices all use a standard interface so that file system can be freely
mixed with device drivers. Alternatively, you can write your own file systems that
can used by the drivers in the same way, by following the same standard interfaces
between the file system, the driver and the I/O system. VxWorks I/O architecture
makes it possible to have multiple file systems, even of different types, in a single
VxWorks system.
20. LOCAL FILE SYSTEM CONT…
MS-DOS Compatible File System: dosFs
The dosFs file system offers considerable flexibility appropriate to the varying
demands of real time applications.
Major features include:
1. Hierarchical arrangement of files and directories, allowing efficient organisation and
permitting an arbitrary number of files to be created on avolume.
2. A choice of contiguous or non-contiguous files on a per file basis. Non-contiguous files
result in more efficient use of available disk space, while contiguous files offer enhanced
performance.
3. Compatibility with widely available storage and retrieval media. Diskettes created with
VxWorks (that do not use dosFs extended filenames) and MSDOS PCs and other systems
can be freely interchanged. Hard disks are compatible even if the partition table is
accounted for.
21. LOCAL FILE SYSTEM CONT…
4. The ability to boot VxWorks from any local SCSI (Small Computer System Interface) device
that has a dosFs file system.
5. The ability to use longer file names than the 8- character file name plus 3-character
extension(8.3) convention allowed by MS-DOS.
6. NFS (Network File System) support
22. BASIC VIRTUAL MEMORY SUPPORT
For systems with an MMU, VxWorks allows to perform DMA and inter processor
communication more efficiently by rendering related buffers non-cacheable. This is
a necessary to ensure that data is not being buffered locally when other processors
or DMA devices are accessing the same memory location.
Virtual Memory Context:
A virtual memory context( VM_CONTEXT, defined in vmLib) is made up of a
translation table and other information used for mapping a virtual address to a
physical address. Multiple virtual memory contexts can be created and swapped in
and out as desired.
23. BASIC VIRTUAL MEMORY SUPPORT
• Global Virtual Memory:
Some system objects , such as text segments and semaphores, must be accessible to all
tasks in the system regardless of which virtual memory context is made current. These
objects are made accessible by means of global virtual memory.
• Private Virtual Memory:
Private virtual memory can be created by creating a new virtual memory context.
This is useful fot protecting data by making it inaccessible to other tasks or by
limiting access to specific routines.
25. APPLICATIONS FOR RTOS:
Some usage of RTOS:
• Flight Simulators
• Navigation systems
• Deep sea instrumentation
• Traffic control system
• Radio and optical telescope
….. Any system where rigid time requirment have been placed on the operation of
the processor or the flow of the data.
26. Notable uses
Vx Works was given
the responsibility to
drive this 2.1 Billion
Dollars Mars Rover.
33. Mars Reconnaissance
Orbiter
The US$720 million
spacecraft was built
by Lockheed Martin
under the supervision
of the Jet Propulsion
Laboratory. Italso
uses Vx Works.
34. What is a real-time operating system (RTOS), and
how does it differ from a kernel?
• A real-time kernel is software that manages the time and resources
of a microprocessor, microcontroller or Digital Signal Processor (DSP),
and provides indispensable services to your applications.
• A Real Time Operating System (RTOS) generally contains a real-time
kernel and other higher-level services such as file management,
protocol stacks, a Graphical User Interface (GUI), and other
components.