Discussion in "Software" started by    coolmirza143    Jul 21, 2011.
Thu Jul 21 2011, 05:40 pm
#1
Hello every1 being an embedded developer did you ever think to use your PC for Real time Processing??

I thought about it some days back and now finally got solution for it.. you can use your PC to do Real Time Processing.

Normally PCs are General Purpose Operating Systems and you are not able to use these for real time processing of your data because there are a lot of processing delays are there to overcome these you need a pc that have no delay and that is called Real Time Operating System.

This can be done using Linux as i used Fedora 13, 64 bit OS as Real Time Operating system. all you need a pc running Fedora on it and any version of Linux Kernel which you can get from www.linux.org

they main problem for which we are moving from GPOS to RTOS is SMI, System Management Interrupts... and these have high priority... if u have made an application that works in real time and you insert USB stick in you PC by this SMI will b generated and processor will leave your application and will handle USB first!

In processing a term is used as Thread, a Thread is group of tasks which are assigned to processor for processing, lets get some idea of it....

say you have made an Application which will generate 100 tasks for processing so now we will convert these tasks in threads, there are many ways to generate a thread mostly it is done by using Intel TBB [Thread Building Blocks] this is a separate debate that how to assign threads to processor and why we not generate threads manually ..

so now if you have an application like Noise Cancellation from Audio Signal in real time, and you are using GPOS then it will be trouble for you application to work as per your requirements because in general purpose OS threads are assigned no priority and handled dynamically, in thread scheduling policy Evey thread is assigned a priority number so in case of GPOS these number can be changed priority can be shifted from one thread to an other and which is untoleratable !!!

in RTOS each thread is assigned a unique priority number statically which is never changed by thread scheduler!!! so this was an over view that why we need RTOS instead of GPOS all SMI (System Management Interrupts) are disabled in RTOS so application can work delay free without any interruption....

OK now lets start

first download Linux Kernel and extract it in a folder, you can make this folder any where on your drive [i]

now download RT patch for Linux Download from this LINK

make sure version of patch and your Linux kernel is same!!
Preview of Linux Kernel Patch site...


now command to extract Linux Kernel command is at last of highlighted area...


After Extraction


These are the required files in Folder


now command to run patch [see highlighted area last line]


Now go to Configuration of Kernel, you will see this window


Go to processor Type and Features..


Then go to Preemtion Mode and Select forth Option as shown in pic below...


Configuration Done Exit from this Window..and hit YES


After Exit you will be here...


Now you have to build this Kernel which now patched for RTOS and updates in Configuration too,,,

for this use this command make -js make sure you are loged in as Admin if you are not just tupe su in terminal press enter and give your password....

you can see command syntax in first line below....




now its time to make Modules for this use this command "Make Modules" and press enter


After this Install Modules by this command "make modules_install"


After Module Installation you will stand here...





Thats it you are done now you can use this system for real time processing.... i will share a project with this design in coming days....

if there is any trouble in above images see whole Album here

https://picasaweb.google.com/coolmirza143/ConversionFromGPOSToRTOSFedora1364BitSystem?authuser=0&feat=directlink


[ Edited Thu Jul 21 2011, 05:56 pm ]
Thu Jul 21 2011, 07:45 pm
#2
Awesome, I can think of using that on an embedded single board computer on an RC plane for flight modelling/simulation or so . Having that done, any thread will occupy the entire processor's time slice & only moving to the next thread on the waiting queue when terminated. Isn't it called disabling soft-interrupts?
Looking forward for your upcoming designs & keep up the great work sir =]
Fri Jul 22 2011, 08:08 am
#3
yeah in this all interrupts are disabled and each thread has high priority and it used full resources of processor, thread sleeping is prohibited in RTOS coz it generates delay that's why we should not have to use Spin Locking for threads coz of that a thread in waiting list uses more processor resources and it can cause dead lock.....

you can use it for flight simulation modules am using this for Real time Audio Feed back cancellation using FFT......

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Davidbab
Tue Apr 23 2024, 10:41 am
Richardrit
Tue Apr 23 2024, 09:54 am
HenryLaf
Mon Apr 22 2024, 03:50 pm
bleradrar
Mon Apr 22 2024, 06:38 am
ppu-pro_ka
Sun Apr 21 2024, 07:39 pm
Infewow
Sun Apr 21 2024, 06:30 pm
HumanTak
Sun Apr 21 2024, 12:26 pm
Zacharybus
Sun Apr 21 2024, 02:45 am