1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% paper.tex = template for real-time Linux workshop papers
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[10pt,a4paper]{article}
\usepackage[english]{babel}
\usepackage{multicol}
\usepackage{listings}
\usepackage{epsfig}
\newcounter{figcounter}
\def\epsin #1#2#3#4{
\refstepcounter{figcounter} \label{#3}
\[
\mbox{
\epsfxsize=#2mm
\epsffile{./img/#1.eps}
}
\]
\begin{center}
\parbox{7cm}{{\bf FIGURE \arabic{figcounter}:}\quad {\it #4 } } \\
\end{center}
}
\setlength{\paperheight}{297mm}
\setlength{\paperwidth}{210mm}
\setlength{\voffset}{-12mm}
\setlength{\topmargin}{0mm}
\setlength{\headsep}{8mm}
\setlength{\headheight}{10mm}
\setlength{\textheight}{235mm}
\setlength{\hoffset}{-4mm}
\setlength{\textwidth}{166mm}
\setlength{\oddsidemargin}{0mm}
\setlength{\evensidemargin}{0mm}
\setlength{\marginparwidth}{0mm}
\setlength{\marginparpush}{0mm}
\setlength{\columnsep}{6mm}
\setlength{\parindent}{6mm}
%% insert eps pictures
%% use as \epsin{epsfile}{width_in_mm}{label}{caption}
%% insert table
%% use as \tabin{size_in_mm}{label}{caption}{table_data}
\newcounter{tabcounter}
\def\tabin #1#2#3#4{
\refstepcounter{tabcounter} \label{#2}
\[ \makebox[#1mm][c]{#4} \]
%\vspace{0mm}
\begin{center}
\parbox{7cm}{{\bf TABLE \arabic{tabcounter}:}\quad {\it #3 } } \\
\end{center}
}
\title{\LARGE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TITLE OF PAPER (REQUIRED)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Real-Time CORBA performance on Linux-RT\_PREEMPT
}
\author{\large
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% AUTHOR (REQUIRED)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\bf Manuel Traut }\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% AFFILIATION (REQUIRED)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Linutronix GmbH\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% STREET ADDRESS (REQUIRED)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Auf dem Berg 3, 88690 Uhldingen, Germany\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% E-MAIL (REQUIRED)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
manut$@$linutronix.de \\
\vspace{8mm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% AUTHOR (REQUIRED)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%{\bf Li Su}\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% AFFILIATION (REQUIRED)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%CASC Long March Launch Vehicle Technology CO. LTD\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% STREET ADDRESS (REQUIRED)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%7 Building, 15 Block, NO.188 West Road, the forth South Round, BeiJing\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% E-MAIL (REQUIRED)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%sudanlina$@$yahoo.com.cn \\
}
\date{}
\begin{document}
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ABSTRACT (REQUIRED)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{abstract}
Automation technology lacks an established platform independent, high-level, object oriented real-time capable communication standard, which is based on standard Ethernet hardware and drivers. ACE/TAO is an Open Source implementation of the OMG Real-Time CORBA Specification and might fill this gap. It is designed platform independent, implemented in C++ and provides a standardized communication framework. Real-Time CORBA is already used in industrial environments, e.g. aircraft, naval equipment and others. This paper explains the basics of the ACE/TAO framework and its usage in industrial communication. On the basis of a real-world example - transmission of an 1 KiB data frame - two communication methods are evaluated: the RT-CORBA Remote Procedure Call and the TAO Real-Time Event-Channel. The performance measurement methods are explained in detail. Measurement results under various system loads and a comparison of ACE/TAO on top of a vanilla Linux kernel and a RT\_PREEMPT enabled Linux kernel provide a meaningful insight in the capabilities of RT-CORBA. Finally, the paper provides an analysis of functionality which needs to be improved in the operating system to provide real deterministic communication through a standardized framework.
\end{abstract}
\vspace{10mm}
\begin{multicols}{2}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% SECTION (REQUIRED)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
Currently communication in automation is mainly realized with a huge number of different fieldbuses. However since 2005 there is an increasing trend, for using ethernet based communication methods. Another trend is, using PCs and software for simulating PLCs. But why not combine these two trends, to control machines in real-time with object-orientated middleware? The infrastructure is already given\dots
\subsection{CORBA}
CORBA is a Middleware, which allows RPC\footnote{Remote Procedure Call}-based IPC\footnote{Inter Process Communication} between different operating systems and different programming languages (Figure 1).
\epsin{orb}{80}{fig1:f1}{CORBA Architecture}
The communication interfaces are defined in IDL\footnote{Interface Definition Language}. The IDL files are compiled into, e.g. c++, java, \dots, code which does the (de)serialization of the datatypes. The interface implementations (CORBA objects) are registered at language specific ORB\footnote{Object Request Broker}s. Each CORBA process owns one ORB, which handles the function requests and returns the calculated values.
\subsection{real-time CORBA}
\epsin{rtcorbaext}{70}{fig1:f2}{Real-time CORBA}
As shown in figure 2, a real-time capable ORB extends a standard ORB with the following features: locating objects in constant time, preallocation of resources, operating system independent priority handling, priority based scheduling.
\subsection{ACE/TAO}
ACE is an open-source c++ framework for platform-independent system- and network-programming. TAO is a real-time CORBA implementation build on top of ACE (Figure 3).
\epsin{ace}{80}{fig1:f3}{ACE/TAO framework}
The ACE/TAO package is available for all important operating systems. The hole framework is trimmed for embedded systems: Each application described in this paper consumes less than 1 MByte of RAM. Also the consumed CPU time is suprisingly low.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% NEXT SECTION (OPTIONAL)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Performance Measurements}
The measurements were made on embedded systems (Intel Mobile CPU 600 MHz, 512 MB RAM, Intel e100 NIC) with digital I/0 ports. A square-pulse generator is connected with the digital input on the first embedded system (supplier) and channel 1 of the oscilloscope. The digital outputs of the embedded systems 2 and 3 (receivers) are connected with channel 2 and 3 of the oscilloscope.
\epsin{versuch4}{80}{fig1:f4}{Measurement environment}
\subsection{RPC}
Each receiver hosts an object, for writting values to its digital output:
\begin{lstlisting}
module benchmark{
interface Put{
void Port( in short portNo,
in short value,
in string data );
};
};
\end{lstlisting}
The \textit{Port} function is called by the \textit{sender} as soon as the state of one of its digital inputs changes. The real end to end latency is meassured with the oscilloscope.
To simulate the transmission of bigger process data images, the parameter \textit{in string data} is read in from a text file, so his length, could be changed after compile time, by editing the text file.
\epsin{sequenzV1}{80}{fig1:f5}{RPC measurement: sequence diagramm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% SUB SECTION (OPTIONAL)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{TAO real-time Event-Channel}
The TAO real-time Event-Channel is a CORBA Messaging Service. Suppliers are sending messages to the Messaging Service. A client can subscribe for messages at the Messaging Service.
As soon as the value of the digital input of the Supplier changes, the new value of the digital input port is send to the Messaging Service. The Messaging Service sends this value, to all subscribed clients. A client writes the values from the messages, to their digital output.
\epsin{sequenzV2}{80}{fig1:f6}{Event-Channel measurement: sequence diagramm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% NEXT SECTION (OPTIONAL)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Needed operating system functionalities}
An TAO ORB can only schedule its CORBA requests correctly, if the underlying operating system has an priorization based scheduler, with a defined maximum scheduling latency. The timer and scheduling latency of a linux system can be determined with cyclictest. For example, the worst case latency on a RT\_PREEMPT enabled box is $26 \mu s$. The same test, on the same box, but with RT\_PREEMPT disabled is $39.6 ms$.
The operating system should support priorization of device i/o data. The real-time application must not beeing interrupted by incomming traffic on any device, excepted data the real-time application must react on (e.g. digital inputs). On a RT\_PREEMPT enabled linux, the most part of all ISR\footnote{interrupt service routine}s are done in kernel threads, which can be priorized from userspace. This solution has two little cons: IRQ sharing and the softirqs for networking. IRQ sharing prevents from a real per device priorization. The softirqs for networking handle the traffic of all NICs in the system. So the priorization of network data from a specific device is not possible. But in case real-time networking gets more and more important, the community works on a solution for this issue.
Not all NICs (especially their firmware and driver) are good for real-time networking. Many modern NICs don't request an interrupt for each received package. They only request an interrupt if a defined amount of data is received, or a defined timeout is over. Esspecially for real-time network communications with little data transfer, these cards causes high latencies.
\section{Conclusion}
Using an object-orientated middleware for real-time communication over standard ethernet hardware, is especially in the automation industrie, not a trivial thing. But with ACE/TAO and RT\_PREEMPT enabled Linux it is no longer science-fiction.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% REFERNCES (REQUIRED)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{thebibliography}{9}%use this if you have <=9 bib refs
%\begin{thebibliography}{99}%use this if you have >9 bib refs
\bibitem{book1},{\it PCI 9656BA Data Book Version 1.0},2003, PLX Technology, Inc.
\bibitem {book2},{\it RTLinux3.1 Getting Started with RTLinux},2001, {\sc FSM Labs, Inc.}
\bibitem {paper1},{\it Advanced filesystem implementer¡¯s guide, introducing XFS}, Daniel Robbins,01 Jan 2002,{\sc Gentoo Technologies£¬Inc.}
\bibitem {paper2},{\it http://www.realtimelinuxfoundation.org/home.html}
\bibitem {paper3},{\it http://compreviews.about.com/od/storage/l/aaRAIDPage1.htm}
\end{thebibliography}
\end{multicols}
\end{document}
|