How to grant real time to all important threads of an application?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I hope this is the good place to post this, since the subject is real-time capacity of a multi-thread application.

I have made an app that displays the harmonics in 3d, and I want to be able to run it in real-time; 

Audio is played with Gstreamer. I have tried to use the 'set_schedparam' code, but I got the 

'Invalid argument' during 'pthread_attr_setschedparam (&attr, &sched)' 

error... (as well as starting the app with 'chrt -r -p my-pid').  So I have used the 'rtpool-test' 
code from the Gstreamer core examples ( http://cgit.freedesktop.org/gstreamer/gstreamer/tree/tests/examples/streams ; ) and it
 works. 

 When I run the app, then when I run 'ps -cLe in a terminal, to see all runing threads of the app,  I see this (the app name is "spectrum3d":

 5265  5265 TS   19 pts/0    00:00:01 spectrum3d
 5265  5267 TS   19 pts/0    00:00:00 threaded-ml
 5265  5268 TS   19 pts/0    00:00:00 threaded-ml
 5265  5270 TS   19 pts/0    00:00:00 task0
 5265  5271 TS   19 pts/0    00:00:00 spectrum3d
 5265  5272 RR   90 pts/0    00:00:01 alsasrc:src

The 1st pid is the GTK GUI; the last one must be the gstreamer sound 
playing, since its policy is RR with a priority of 90; for the record, I'd like to run it with the FIFO policy and I have asked Gstreamer how to manage that.

but I don't know what the other pid represent... and my question is this :

The app is written like this : 
1) GTK GUI with a 'Play" button, that starts playing the sound, with Gstreamer, and the 'spectrum' element send messages to the bus that watches gstreamer 'pipeline'; 
2) everytime the "message handler" function of Gstreamer retrives the values of the spectrum, there is a call to a function that display the values of the 
spectrum in a SDL/OpenGL window. 

So the question is : is the display in the SDL/OpenGL window done also with the RR policy or back with TS policy? How can I give real-time to the OpenGL process (since it is the most CPU consuming (I'm aware that real-time won't change the CPU load, but only change the priorities of the scheduler).

Since it is very demanding, I'd like every 'real-time' part of the app has real-time policy (not the GTK GUI, I'm aware of that); furhermore, keyboard and mouse events are managed with SDL, and touch gestures are managed with the libutouch-geis API (multitouch input).

thank u for your help

Victor

Victor 		 	   		  --
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux