©M. S. Ramaiah University of Applied Sciences
1
Faculty of Engineering & Technology
Linux and Xenomai Platform
Sree Nikhilendra Prasad DJ
FT 2014 Batch, Reg. No.: 14ETCS037010
M. Tech. in Real Time Embedded Systems
Module Leader: Ms. Jishmi J. Choondal and Mr. Deepak V.
Module Name: Real Time Operating Systems and System
Programming
Module Code : CSN502
©M. S. Ramaiah University of Applied Sciences
2
Faculty of Engineering & Technology
Marking
Head Maximum Score
Technical Content 5
Grasp and Explanation 5
Quality of Slides and
Delivery
5
Q & A 5
Total 20
©M. S. Ramaiah University of Applied Sciences
3
Faculty of Engineering & Technology
Presentation Outline
• Introduction
• Xenomai
• RTAI
• Linux Code Snippet
• Linux Output
• Xenomai Code Snippet
• Xenomai Output
• Conclusion
• References
©M. S. Ramaiah University of Applied Sciences
4
Faculty of Engineering & Technology
Introduction
• A real time system is the one in which the
correctness of the computation is depended upon
the logical but also upon the span of the
computation carried out.
• A system can be said to be deterministic if the
computation are logically correct and produced on
time without the any interrupts.
©M. S. Ramaiah University of Applied Sciences
5
Faculty of Engineering & Technology
Xenomai
• In xenomai, the module will use the standard way
of loading modules in Linux kernel as its entry
point.
• Xenomai consists of the several abstract layers in
which it introduce an enormous flexibility.
©M. S. Ramaiah University of Applied Sciences
6
Faculty of Engineering & Technology
RTAI
• RTAI attempts to cut the response times even
further.
• Incoming interrupts that are not registered with
the RTAI are forwarded to the ADEOS and allowing
its nano-kernel to do usual work.
©M. S. Ramaiah University of Applied Sciences
7
Faculty of Engineering & Technology
Linux Code Snippet
//function
for(p=1;p<=k;p++)
{
if(x[p]==1)
{ for(m=l;m<tid;m++)
printf("moving upwards %dn",m);
}
else
{ for(m=l;m>tid;m--)
printf("moving downwards %dn",m);
}
}
//Thread Creation
for(j=1;j<=k;j++)
{
printf("ndoor ceasesn");
rc = pthread_create(&threads, NULL, printfloor, (void *)o[j]);
pthread_join(threads,NULL);
}
©M. S. Ramaiah University of Applied Sciences
8
Faculty of Engineering & Technology
Linux Output
©M. S. Ramaiah University of Applied Sciences
9
Faculty of Engineering & Technology
Xenomai Code snippet
//Task creation and start
for(p=1;p<=n;p++)
{
printf("door ceasesn");
if(x[p]==1)
{
rt_task_spawn(&task_desc2,"MyTaskname2",TASK_STKSZ,TASK_PRIO,TASK_MODE,&
task_body2,NULL);
}
if(x[p]==2)
{
rt_task_spawn(&task_desc,"MyTaskname",TASK_STKSZ,TASK_PRIO,TASK_MODE,&ta
sk_body,NULL);
}
}
©M. S. Ramaiah University of Applied Sciences
10
Faculty of Engineering & Technology
Xenomai Output
©M. S. Ramaiah University of Applied Sciences
11
Faculty of Engineering & Technology
Conclusion
• Xenomai is best suitable platform to simulate the
real-time application than the RTAI in Linux
operating system.
• RTAI introduces the latency which leads to wrong
computation of the real-time system output.
©M. S. Ramaiah University of Applied Sciences
12
Faculty of Engineering & Technology
References
• Jae Hwan Koh and Byoung Wook Choi. (2013)
Real-time Performance of Real-time Mechanisms
for RTAI and Xenomai in Various Running
Conditions, Internationall Journal of Control and
Automation, Vol. 6, No. 1.
• Markus Franke. (2007) A Quantitative Comparison
of Real-time Linux Solutions, Department of
Computer Science, Chemnitz University of
Technology.

Linux_and_Xenomai

  • 1.
    ©M. S. RamaiahUniversity of Applied Sciences 1 Faculty of Engineering & Technology Linux and Xenomai Platform Sree Nikhilendra Prasad DJ FT 2014 Batch, Reg. No.: 14ETCS037010 M. Tech. in Real Time Embedded Systems Module Leader: Ms. Jishmi J. Choondal and Mr. Deepak V. Module Name: Real Time Operating Systems and System Programming Module Code : CSN502
  • 2.
    ©M. S. RamaiahUniversity of Applied Sciences 2 Faculty of Engineering & Technology Marking Head Maximum Score Technical Content 5 Grasp and Explanation 5 Quality of Slides and Delivery 5 Q & A 5 Total 20
  • 3.
    ©M. S. RamaiahUniversity of Applied Sciences 3 Faculty of Engineering & Technology Presentation Outline • Introduction • Xenomai • RTAI • Linux Code Snippet • Linux Output • Xenomai Code Snippet • Xenomai Output • Conclusion • References
  • 4.
    ©M. S. RamaiahUniversity of Applied Sciences 4 Faculty of Engineering & Technology Introduction • A real time system is the one in which the correctness of the computation is depended upon the logical but also upon the span of the computation carried out. • A system can be said to be deterministic if the computation are logically correct and produced on time without the any interrupts.
  • 5.
    ©M. S. RamaiahUniversity of Applied Sciences 5 Faculty of Engineering & Technology Xenomai • In xenomai, the module will use the standard way of loading modules in Linux kernel as its entry point. • Xenomai consists of the several abstract layers in which it introduce an enormous flexibility.
  • 6.
    ©M. S. RamaiahUniversity of Applied Sciences 6 Faculty of Engineering & Technology RTAI • RTAI attempts to cut the response times even further. • Incoming interrupts that are not registered with the RTAI are forwarded to the ADEOS and allowing its nano-kernel to do usual work.
  • 7.
    ©M. S. RamaiahUniversity of Applied Sciences 7 Faculty of Engineering & Technology Linux Code Snippet //function for(p=1;p<=k;p++) { if(x[p]==1) { for(m=l;m<tid;m++) printf("moving upwards %dn",m); } else { for(m=l;m>tid;m--) printf("moving downwards %dn",m); } } //Thread Creation for(j=1;j<=k;j++) { printf("ndoor ceasesn"); rc = pthread_create(&threads, NULL, printfloor, (void *)o[j]); pthread_join(threads,NULL); }
  • 8.
    ©M. S. RamaiahUniversity of Applied Sciences 8 Faculty of Engineering & Technology Linux Output
  • 9.
    ©M. S. RamaiahUniversity of Applied Sciences 9 Faculty of Engineering & Technology Xenomai Code snippet //Task creation and start for(p=1;p<=n;p++) { printf("door ceasesn"); if(x[p]==1) { rt_task_spawn(&task_desc2,"MyTaskname2",TASK_STKSZ,TASK_PRIO,TASK_MODE,& task_body2,NULL); } if(x[p]==2) { rt_task_spawn(&task_desc,"MyTaskname",TASK_STKSZ,TASK_PRIO,TASK_MODE,&ta sk_body,NULL); } }
  • 10.
    ©M. S. RamaiahUniversity of Applied Sciences 10 Faculty of Engineering & Technology Xenomai Output
  • 11.
    ©M. S. RamaiahUniversity of Applied Sciences 11 Faculty of Engineering & Technology Conclusion • Xenomai is best suitable platform to simulate the real-time application than the RTAI in Linux operating system. • RTAI introduces the latency which leads to wrong computation of the real-time system output.
  • 12.
    ©M. S. RamaiahUniversity of Applied Sciences 12 Faculty of Engineering & Technology References • Jae Hwan Koh and Byoung Wook Choi. (2013) Real-time Performance of Real-time Mechanisms for RTAI and Xenomai in Various Running Conditions, Internationall Journal of Control and Automation, Vol. 6, No. 1. • Markus Franke. (2007) A Quantitative Comparison of Real-time Linux Solutions, Department of Computer Science, Chemnitz University of Technology.