WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TCL and Priority  (Read 4698 times)

Offline glouw

  • Newbie
  • *
  • Posts: 4
TCL and Priority
« 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.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TCL and Priority
« Reply #1 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
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: TCL and Priority
« Reply #2 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TCL and Priority
« Reply #3 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.

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline glouw

  • Newbie
  • *
  • Posts: 4
Re: TCL and Priority
« Reply #4 on: March 05, 2013, 11:36:30 PM »
Very helpful.

Thankyou!

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: TCL and Priority
« Reply #5 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)