2. TOPICS:
INDRODUCTION
REAL TIME LINUX FUNCTIONS
LINUX HAS THE FOLLOWING FEATURES
LINUX MODULES
LINUX FUNCTIONS FOR THE SIGNAL,MULTITHREADING,SEMAPHORE AND MESSAGE QUEUE
INTERPROCESS COMMUNICATION
1/25/2015J.SUDARSHANREDDY
3. INTRODUCTION:
Linux is increasingly used in embedded systems and real time enhancements of that
introduced As linux2.6.x
The linux provide preemptive scheduling , high resolution timers and preemptive
interrupt service threads
Linux latest version is linux 2.6.24 ,released in January 2008
Reasons for the popularity of linux OS are that it is a freeware, device driver
feature,expandability of the kernel codes at runtime and has provision of registering
and deregistering device driver modules
The modules are scheduled like the process Sections 10.3.1 and 10.3.2.
1/25/2015J.SUDARSHANREDDY
4. Real time linux functions :
The os named linux is after linus Torvalds ,father of the linux os
Embedded linux systems combine the linux kernel with a small set of free software
utilities
The glibc is often replaced as the C standard library by less resource consuming
alternatives such as dietlibc ,uclibc or newlib
Embedded linux application program makes the systems calls for the functions at a
kernel
1.process management
2.memory management EX (allocation,delocation )
3.file system
4.shared memory
5.networking systems functions
6.device control functions for any peripheral present into a system
7.graphic editors for kernel configuration
8.soft realtime scheduling
1/25/2015J.SUDARSHANREDDY
5. The following are the three important classes of
devices in embedded linux:
1.realtime linux scheduler has all functions as 0(1)functions:
Which means that size of input to a function and function run time are linearly correlated.
2.the task scheduler supports spin lock (section 7.11) :
It is a preemptive scheduler.
3.linux supports characters and block devices:
A device type can be a char device for example a parallel port , lcd matrix .
The character acess is byte to byte and analogous to the access from and to a printer device.
Systems call functions are also like an I/O device open (), close () write (), read (), functions.
1/25/2015J.SUDARSHANREDDY
6. Linux has the following features useful for embedded system
design:
1.linux is multiuser OS and supports user groups
2.linux has root directory (represented by /sign)
3.linux has large number of editor,file,directory,I/O commands .Each command can
Consists of a number of words .First word is command and remaining words are arguments .
4. Linux has number of interfaces for users .For example X-WINDOWS for GUI and csh
5.Process always creates as child process in the process that uses fork()function
6.linux has modules for the character,block,socket,network device drivers and linux 2.6.x
Support 4095.
7.Linux supports a module initialization,handeling of errors,prevention of un authorized port acess,
8.The linux OS supports registering of the driver configuration and functions
9.The linux kernel use of sequential acess ,specific memory address only by the registering
and de registering mechanisam.
1/25/2015J.SUDARSHANREDDY
7. Registering and de registering and related
functions of linux modules :
init :
Insmod:
Rmmod:
Cleanup:
Register-
capability:
Unregister
capability:
Register
symtab:
The init module()is called before the module is inserted into the kernel
Inserts module into the linux kernel the object file module 1.0,inserts by
Command and insmod module 1.0
A module file module 1.0 is delated from the kernel by command and
rmmod module1.
A kernel level void function,which perform by action on an rmmod call from
the execution module .
A kernel level function for registering
A kernel level function for de register
A symbol table function support ,which exist an alternatively to declaring
functions .
1/25/2015J.SUDARSHANREDDY
8. Linux has following feauters useful for
embedded system design:
1.Linux 2.6.x all tasks are assigned static priorities between -19 to +20 .time
slicies are varied as per priority
2.Realtime linux 2.6.24 a latest realease supports a new set of group scheduling
functions,Which improves cups load
3.Linux 2.6.24 provides high resolution timers as well as tick less timer
4.Linux 2.6.24 supports functions to improve system performance by restricting
the block device from teaking larger cu load
1/25/2015J.SUDARSHANREDDY
9. Linux functions
Features
1.thread properties:
2.signal functions:
3.thread functions:
4.Semaphore
functions
5.Mutex functions
Description
1.Threads of same process share the memory space and manage acess
premises
1.Struct sigaction signal 1;/*statement in c defines a struacture signal1 .*/
Signal1 .sa-flags=0;/*sets flags=0*/
1.Pthread-self();/*reaturns gets id of the function pthread-self calling
thread self */
2.();/*sends ‘kill’ signal to the thread*/
1.Sem-wait (&sem1);/*wait for the semaphore sem1*/
2.Sem-post (&sem1)/*post the semaphore sem1*/
1.Pthread –mutex-lock();the argument is mutex ms1or ms2 or other*/
2.Pthread –mutex-unlock();the argument is mutex ms1or ms2 or other*/
1/25/2015J.SUDARSHANREDDY