"Real-time control software" third week work

Source: Internet
Author: User

I. Introduction to Xenomai

1. Introduction

Xenomai is a strong real-time extension of a Linux kernel with a dual-core mechanism. The priority is higher than the Linux kernel, which handles the real-time tasks of the system. Xenomai seamless integration into the Linux operating system, so that all the Linux software stack source code and more things Xenomai real-time kernel for the development of strong real-time applications to provide a wealth of features, The main include real-time thread scheduling and management user space real-time task support Interrupt Service thread Synchronization service real-time object registration service and dynamic memory request.

Compared with the typical Linux real-time solution (RTLinux and Rtai), Xenomai has its own two features: one is to support the full performance of the user-mode real-time; Second, it is compatible with the common VxWorks psos+ vrtx and other mature real-time operating system APIs, which provides the convenience of rapid porting of real-time programs of various traditional real-time operating systems to new platforms, as well as the native API and real-time driver Model (RTDM).

2. Structure

The Xenomai project started in 2001. Since the summer of 2003, Xenomai and Rtai have been cooperating for more than two years, during which a well-known Rtai/fusion project branch was developed. By 2005, the Xenomai project was again independent. Starting with version 2.0.0, the porting of Xenomai on the hardware platform has been based on the ADEOS architecture.


In Xenomai systems based on ADEOS technology, there are typically a, B, C, and D four types of interactions. :


1. A-class interaction is the direct contact of each domain and hardware device, including access to memory, etc.;
2. Class B interaction means that when the ADEOS receives a hardware interrupt, the corresponding domain is interrupted according to the interrupt;
3. C-Type interaction means that the operating system within the current domain proactively requests certain services from ADEOS;
4. Class D interactions refer to interrupts and exceptions generated by the ADEOS receiving hardware, as well as direct control of the hardware

Xenomai the domain priority in the ADEOS system is higher than the standard Linux domain, each time the interrupt arrives, the ADEOS first dispatches Xenomai to the interrupt to process the execution interrupt corresponding realtime task, only when the Xenomai does not have the real-time task and the interrupt needs processing, ADEOS only dispatches Linux to run, which ensures that Xenomai's interrupt response speed and real-time tasks are not affected by Linux, providing a deterministic real-time system.

Xenomai also provides a mixed execution mode of tasks under User-State, that is, when the task runs in the primary domain, the task is dispatched directly by Xenomai and can preempt the non-real-time tasks of standard Linux at any time; When a task runs from a domain, the task is scheduled by the standard Linux kernel, the task is switched for a longer time and does not support preemption at any time, but can be applied to all system calls of Linux However, because some specific tasks have priority inheritance characteristics, standard Linux interrupts may Preemptive real-time task scheduling right, the real-time task caused unnecessary delay in this, Xenomai introduced the interrupt masking mechanism, that is, in the real-time task execution process, any interrupt from the standard Linux kernel will be deferred processing it supports the priority inheritance policy, You can prevent it from detecting a rollover when a synchronization object occurs.

The real-time performance of real-time operating system is an evaluation indicator is the task response delay, one of which is the interrupt delay time in order to fundamentally solve the problem of excessive delay time, ADEOS skillfully through a virtual interrupt technology to effectively reduce interrupt service time and interrupt dispatch time, so as to achieve better task response time When a hard interrupt is generated, the system neither looks at the interrupt vector table nor executes the corresponding interrupt service program, but logs the event directly into an event table, and then immediately returns the control of the CPU to the operating system. This process only needs to save the interrupt simulator register. This eliminates the time to save the context in the hardware service.

Ii. views on the task of the group

For a software development including a lot of steps, from the beginning of the needs analysis, to the system architecture, each part of the writing implementation, and so on, everyone needs to work together to play their own characteristics and advantages, complete the software.
For the two-axis manipulator simulation, I am interested in the trajectory interpolation task, this part of the requirements of the calculation of the algorithm is better, design a better model for easy programming. My software writing ability is weak, but has a better logical thinking ability and mathematical computing ability, so in the function analysis, algorithm design is more interested.

Third, programming work

The programming job has been handed over to GitHub.

"Real-time control software" third week work

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.