Tiny Core Linux

Tiny Core Base => Micro Core => Topic started by: glouw on March 05, 2013, 10:49:53 PM

Title: TCL and Priority
Post by: glouw on March 05, 2013, 10:49:53 PM
Hello!

How do I set the priority of a certain process to a higher state? I have a Java program running on a TCL kiosk machine at work that is collecting data from several data acquisition devices. Is it possible to get the linux kernel to dedicate all CPU resources to my program to get it running in real time? I know you can do this in Windows with the task manager by right clicking a process, selecting 'set priority' and then selecting 'real time'.

I read somewhere about 'niceness' in Linux; but I don't know if TCL supports 'niceness''.

Any help is appreciated.
Title: Re: TCL and Priority
Post by: bmarkus on March 05, 2013, 11:00:05 PM
Is it possible to get the linux kernel to dedicate all CPU resources to my program to get it running in real time? I

It is not a realtime system. Also, there are no way to dedicate ALL CPU resources to your program even in a realtime system. However you can increase priority:

http://www.nixtutor.com/linux/changing-priority-on-linux-processes/

or

http://www.ibm.com/developerworks/linux/library/l-lpic1-v3-103-6/index.html
Title: Re: TCL and Priority
Post by: tinypoodle on March 05, 2013, 11:23:30 PM
You could find an unofficial user contributed rt kernel under /contrib in repo.

You might want to have a look at htop which while monitoring the system and giving real time visual feedback also allows for interactive renicing.
Title: Re: TCL and Priority
Post by: bmarkus on March 05, 2013, 11:29:23 PM
If application need all CPU resources to work properly it has nothing to do heaving realtime kernel or not, it is a generic resource issue or most probably an issue with the application. Before changing anything analyse current situation. htop is a nice tool to do that.

Title: Re: TCL and Priority
Post by: glouw on March 05, 2013, 11:36:30 PM
Very helpful.

Thankyou!
Title: Re: TCL and Priority
Post by: tinypoodle on March 05, 2013, 11:43:42 PM
If application need all CPU resources to work properly it has nothing to do heaving realtime kernel or not, it is a generic resource issue or most probably an issue with the application. Before changing anything analyse current situation. htop is a nice tool to do that.
Fully agreed on that, I just threw in the existence of a rt kernel as a bit of info, because OP mentioned "real time" and I am not really sure about the details of their planning.