8/14/2019 National Institute of Science & Technology
1/15
RTLlNUX
ADITYA KUMAR PATTNAYAK ROLLNO: CS200117263
TECHNICAL SEMINARUNDER GUIDENCE OF
MR. P.K JENA
NATIONAL INSTITUTE OF SCIENCE AND TECHNOLOGY,
PALUR HILLS, BERHAMPUR.
[1]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
8/14/2019 National Institute of Science & Technology
2/15
WHAT IS REAL TIME SYSTEM.
WHAT IS HARD REAL TIME.
WHAT IS SOFT REAL TIME.
[2]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
8/14/2019 National Institute of Science & Technology
3/15
WHAT IS RTLINUX
RTLinux is a hard real-time operating system thatruns Linux as its lowest priority execution thread .
RTLinux, originally developed at the New MexicoInstitute of Technology .
It is an open-source product.
RTLinux-specific components are released underthe GPL .
Non-GPL versions of the RTL components areavailable from FSMLabs.
[3]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
8/14/2019 National Institute of Science & Technology
4/15
WHY RTLINUX
Linux kernel is completely preemptible.
The kernel has the ability to suspend any user-
level task.
Linux kernel modified to support hard realtime .
[4]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
8/14/2019 National Institute of Science & Technology
5/15
BARE LINUX KERNEL
[5]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
U s e r P r o c e s s e s
U n i x / L i n u x K e r
H a r d w a r e
D e v i c e D r i v e r s
S y s t e m L i a b r a r i e s
H a r d w a r e I n t e r rI / O
8/14/2019 National Institute of Science & Technology
6/15
RTLinux KERNEL
[6]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
U s e r P r o c e s s e s
U n i x / L i n u x K e
H a r d w a r e
D e v i c e D r i v e r s
S y s t e m L i a b r a r i e s
S o f t w a r e I n t e r r uI / O
R T L i n u x P l u g i nR T - S c h e d u l e r
a b c
R e a l t i m e t a s k
I / OH a r d w a r e I n t e r r
D i r e c t h a r d w a r e
A c c e s s
8/14/2019 National Institute of Science & Technology
7/15
VERSIONS
There are 3 versions for RTLinux
1. RTLinux V1
2. RTLinux V2
3. RTLinux V3
[7]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
8/14/2019 National Institute of Science & Technology
8/15
THE BASIC API
1. RTLinux programs modeled as modules whichare loaded into the Linux kernel space.
2. main() function is replaced by a pair of
init/cleanup functions:int init_module( );
void cleanup_module( );
3. A filename.c file is converted to a module bycompiling the file.
4. Then use insmod or rmmod command to insert
or remove the module into kernel.
[8]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
8/14/2019 National Institute of Science & Technology
9/15
STRUCTURE OF MODULES
CREATING POSIX THREADSFUNCTIONS
pthread_create(3) :- To create a new thread.
pthread_attr_getcpu_np(3):- getting general attributes
pthread_attr_setcpu_np(3):- setting general attribures
pthread_cancel (pthread thread):- cancelling a thread
int clock_gettime(clockid_t clock_id, struct
timespec *ts):-Get the current clock timinghrtime_t clock_gethrtime(clockid_t clock):-
It returns time in 64 bit number in nanoseconds.
[9]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
8/14/2019 National Institute of Science & Technology
10/15
SCHEDULING THREADS
pthread_attr_setschedparam(3)
pthread_setschedparam(3)
sched_get_priority_min(3)
pthread_make_periodic_np(3)
pthread_wait_np(3)
pthread_make_periodic_np(3)
[10]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
8/14/2019 National Institute of Science & Technology
11/15
INTER PROCESS COMMUNICATION
1. REALTIME FIFO
2. USING SHARED MEMORY
[11]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
8/14/2019 National Institute of Science & Technology
12/15
INTERRUPTS
1. HARD INTERRUPTS
2. SOFT INTERRUPTS
[12]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
8/14/2019 National Institute of Science & Technology
13/15
DIFFERENT PROJECTS UNDER
DEVELOPEMENT Space Robotics: an Experimental Set-up based onRTAI-Linux
Flash Storage in Linux-Based ResidentialGateways,
Real-time Linux in Chemical Process Control
A Digital PID Controller Using RTAI
Graphic Supervisor of Lung Ventilator Driver Architecture in a Linux World
[13]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
8/14/2019 National Institute of Science & Technology
14/15
CONCLUSION
Realtime tasks in RTLlNUX can communicatewith Linux processes via shared memory or a file-likeinterface. Thus, real-time applications can make useof all the powerful, non-real-time services of Linux,
including: Networking ,Graphics, Windowing systems,Data analysis packages ,Linux device drivers, andStandard POSIX API.
[14]NationalIns
tit
ute
ofScienc
e&
Technolo
gy
RTLinux
Aditya kumar pattnayak
8/14/2019 National Institute of Science & Technology
15/15
THANK YOU
[15]NationalIns
titute
ofScienc
e&
Technol
ogy
RTLinux
Aditya kumar pattnayak
Top Related