National Institute of Science & Technology
RTLinux
RTLlNUX ADITYA KUMAR PATTNAYAK
ROLLNO: CS200117263
TECHNICAL SEMINAR UNDER GUIDENCE OF MR. P.K JENA NATIONAL INSTITUTE OF SCIENCE AND TECHNOLOGY, PALUR HILLS, BERHAMPUR.
Aditya kumar pattnayak
[1]
National Institute of Science & Technology
RTLinux
• WHAT IS REAL TIME SYSTEM. • WHAT IS HARD REAL TIME. • WHAT IS SOFT REAL TIME.
Aditya kumar pattnayak
[2]
National Institute of Science & Technology
RTLinux WHAT IS RTLINUX •RTLinux is a hard real-time operating system that runs Linux as its lowest priority execution thread . •RTLinux, originally developed at the New Mexico Institute of Technology . •It is an open-source product. •RTLinux-specific components are released under the GPL . •Non-GPL versions of the RTL components are available from FSMLabs.
Aditya kumar pattnayak
[3]
National Institute of Science & Technology
RTLinux WHY RTLINUX Linux kernel is completely preemptible. The kernel has the ability to suspend any userlevel task. Linux kernel modified to support hard realtime .
Aditya kumar pattnayak
[4]
National Institute of Science & Technology
RTLinux BARE LINUX KERNEL U
S D
s e r
P
y s t e m
e v i c e
i a b r a r i e s r i U v en r i xs / L i n u x K
D
I / O
H H
r o c e s s e s
L
a r d
a r d
Aditya kumar pattnayak
w
w
a r e
I n
e r
t e r r u
a r e
[5]
National Institute of Science & Technology
RTLinux RTLinux KERNEL U
R
e a l
t i m
e
D
c
b
y s t e m
e v i c e
D A
T
- S
c h
i r e c t h c c e s s
e d
a r d
H
r o c e s s e s
u
l e r
S
R
T
wI / a O r e
a r d
L
i n H
w
Aditya kumar pattnayak
L
i a b
r a r i e s
r U i v n e i rx s / L
D
I / O R
P
t a s k S
a
s e r
o f t w
u
a r e
x
a r d
i n
P w
l u a r e
u I n
x
K
e r
t e r r u
g i n I n
t e r r
a r e
[6]
RTLinux National Institute of Science & Technology
VERSIONS There are 3 versions for RTLinux 1. RTLinux V1 2. RTLinux V2 3. RTLinux V3
Aditya kumar pattnayak
[7]
National Institute of Science & Technology
RTLinux THE BASIC API 1. RTLinux programs modeled as modules which are 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 by compiling the file. 4. Then use insmod or rmmod command to insert or remove the module into kernel. Aditya kumar pattnayak
[8]
National Institute of Science & Technology
RTLinux STRUCTURE OF MODULES CREATING POSIX THREADS FUNCTIONS 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 timing hrtime_t clock_gethrtime(clockid_t clock):It returns time in 64 bit number in nanoseconds. Aditya kumar pattnayak
[9]
National Institute of Science & Technology
RTLinux 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)
Aditya kumar pattnayak
[10]
National Institute of Science & Technology
RTLinux INTER PROCESS COMMUNICATION
1. REALTIME FIFO 2.
USING SHARED MEMORY
Aditya kumar pattnayak
[11]
National Institute of Science & Technology
RTLinux INTERRUPTS 1. HARD INTERRUPTS 2. SOFT INTERRUPTS
Aditya kumar pattnayak
[12]
National Institute of Science & Technology
RTLinux DIFFERENT PROJECTS UNDER DEVELOPEMENT Space Robotics: an Experimental Set-up based on RTAI-Linux Flash Storage in Linux-Based Residential Gateways, Real-time Linux in Chemical Process Control A Digital PID Controller Using RTAI Graphic Supervisor of Lung Ventilator Driver Architecture in a Linux World Aditya kumar pattnayak
[13]
National Institute of Science & Technology
RTLinux CONCLUSION Realtime tasks in RTLlNUX can communicate with Linux processes via shared memory or a file-like interface. Thus, real-time applications can make use of all the powerful, non-real-time services of Linux, including: Networking ,Graphics, Windowing systems ,Data analysis packages ,Linux device drivers, and Standard POSIX API.
Aditya kumar pattnayak
[14]
National Institute of Science & Technology
RTLinux
THANK YOU
Aditya kumar pattnayak
[15]