You are on page 1of 15

RTLinux

RTLlNUX
National Institute of Science & Technology

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]


RTLinux
National Institute of Science & Technology

• WHAT IS REAL TIME SYSTEM.

• WHAT IS HARD REAL TIME.

• WHAT IS SOFT REAL TIME.

Aditya kumar pattnayak [2]


RTLinux
WHAT IS RTLINUX
National Institute of Science & Technology

•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]


RTLinux
WHY RTLINUX
National Institute of Science & Technology

Linux kernel is completely preemptible.

The kernel has the ability to suspend any user-


level task.

Linux kernel modified to support hard realtime .

Aditya kumar pattnayak [4]


RTLinux
BARE LINUX KERNEL
National Institute of Science & Technology

U ser P ro cesses

S y s te m L ia b r a r ie s
D e v ic e D r iv e r s U n ix /L in u x K e r n e l

I /O H a r d w a re In te r r u p ts

H ard w are

Aditya kumar pattnayak [5]


RTLinux
RTLinux KERNEL
National Institute of Science & Technology

U ser P rocesses

R e a l tim e ta s k
S y s te m L ia b r a r ie s
a b c D e v ic e D r iv e r s U n ix /L in u x K e r n e l

I /O S o ftw a re In te r r u p ts

R T -S c h e d u le r R T L in u x P lu g in

D ir e c t h a r d w a r e I /O
H a r d w a re In te r r u p ts
A ccess

H ard w are

Aditya kumar pattnayak [6]


RTLinux
VERSIONS
National Institute of Science & Technology

There are 3 versions for RTLinux


1. RTLinux V1

2. RTLinux V2

3. RTLinux V3

Aditya kumar pattnayak [7]


RTLinux
THE BASIC API
National Institute of Science & Technology

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]
RTLinux
STRUCTURE OF MODULES
National Institute of Science & Technology

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]


RTLinux
SCHEDULING THREADS
National Institute of Science & Technology

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]


RTLinux
INTER PROCESS COMMUNICATION
National Institute of Science & Technology

1. REALTIME FIFO
2. USING SHARED MEMORY

Aditya kumar pattnayak [11]


RTLinux
INTERRUPTS
National Institute of Science & Technology

1. HARD INTERRUPTS
2. SOFT INTERRUPTS

Aditya kumar pattnayak [12]


RTLinux
DIFFERENT PROJECTS UNDER
National Institute of Science & Technology

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]


RTLinux
CONCLUSION
National Institute of Science & Technology

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]


RTLinux
National Institute of Science & Technology

THANK YOU

Aditya kumar pattnayak [15]

You might also like