http://forum.mandriva.com/en/viewtopic. ... 33#p851978
Rtprio with preempt kernel for real time scheduling in 2011
Previous reference guide (worked well until 2010.2):
Mdv come workstation-audio-midi professionale
http://mib.pianetalinux.org/mib/forum/v ... =21&t=2178
In Mandriva 2011 there are many changes from the past distributions, so the methods we used to achieve some results are no more working.
With previous Mandriva distro it was possible with a standard kernel, or better with a preempt one, to give rtprio to user tasks, in 2011.0 it seemed not be more possible to do, but Jon Remener writing in the Mandriva Forum affirmed he found a way to achieve the same past results without having the need using a kernel-rt
He did not specified well how, so yesterday I wrote him to ask to be more precise, explaining step by step the verified solution, he answered kindly, and I wished to copy here his solution to verify with our friends othoth-tux, oiram73, and others interested, if that solution is good even for them in Mandriva 2011.0
Bye, NicCoJon Remener wrote:Sorry for the long delay, I've been busy. This is a copy of my limits.conf file, which seems to be working fine, instead of going by groups you need to explicitly set users accounts. Make sure the default values are first(the ones with a *).
#<domain> <type> <item> <value>
* - nice 0
* - rtprio 0
anethema - nice -15
anethema - rtprio 80
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
deluge hard nofile 10000
To launch applications as a user using chrt, you will need to add the setuid flag to it's permissions. This way, whoever runs it runs, it will run as root. Your applications that it starts will run as root too. I know it's not the best solution, but it will work if you still can't grant the elevated privileges.
To set the flag:
chmod +s /usr/bin/chrt
chrt allows you to set programs to different scheduling policies. Check the man page for information and google for more information.
To use chrt to start a program to realtime with a priority of -51:
chrt -r 50 <program name>