LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-11-2013, 09:31 AM   #1
iliyatz
LQ Newbie
 
Registered: Aug 2013
Posts: 2

Rep: Reputation: Disabled
Setting high priority for program


Hello
I am bit new tu linux,and i have simple question(ot not).
I am writing an application and the first thing i do is setting priority with
sched_get_priority_max,
Q:if i call new thread from this program will it get also same priority as the my main process?
thx
I am running on ruspberry pi
 
Old 08-12-2013, 05:15 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Usually, it is not a good idea to "request penultimate priority for" whatever-it-is that you are doing.

The scheduler's job is "to be as fair as possible," and "to keep all of the computer's hardware as busy as possible," but without "starving" any of the units-of-work that are contending for it. (In other words, "if there is something for (say ...) the CPU to do right now, the CPU will be doing it.")

Priority-numbers, therefore, are merely a hint to the scheduler about "what to do, 'all other things being equal' ... which, usually, they are not, in which case the priority has very little effect at all. Nonetheless, reckless assignment of priorities can result in starvation. Therefore, Don't.
 
Old 08-12-2013, 11:04 PM   #3
iliyatz
LQ Newbie
 
Registered: Aug 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Priority

Thx,
Can pls helpme with understanding this issues any good tutorial link would be great.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent flash from running threads in high priority? Ulysses_ Linux - Server 10 11-24-2010 09:33 PM
LXer: What the High Priority Free Software Projects Should Be LXer Syndicated Linux News 0 10-26-2008 05:00 AM
process priority,nice -- small question regarding high/low priority values beeblequix Linux - Newbie 1 10-11-2006 10:22 AM
LXer: High Priority Free Software Projects LXer Syndicated Linux News 0 01-10-2006 07:46 PM
high priority process? gongli Slackware 5 08-08-2003 01:03 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration