RE: Process Priority
RE: Process Priority
- Subject: RE: Process Priority
- From: "Gary L. Wade" <email@hidden>
- Date: Sat, 08 Nov 2008 18:47:36 -0500
The function you want is getpriority, but there are limits to what you can do on changing a process's priority; if I recall, you can lower it (going from 0 to 1 or 20), but you can't raise it (going from 0 to -20) without admin/sudo privileges. My quick-and-dirty app (it's really only effective for UI applications), DSS Process Speedometer, uses renice with authorization services to raise and lower each process's level.
http://www.desisoftsystems.com/products/DSSProcessSpeedometer/
>Hello I am trying to make sure I get this and also asking a few
>questions about it.
>So to change a process priority you use renice like so
>renice +20 -p PID
>
>Here are the questions
>is there a way to get the current priority?
>is there a way to set the priority to lets say 20 or 1?
>how can I make it normal after setting it?
>
>I am making an app that would help you speed up what your doing and so
>I am needing this info which I couldn't find anywhere. I am going to
>use NSTask to run the command and so on.
>I saw this type of function in Virtual PC where you can choose how
>much cpu to use for when it's in front or in the background.
>
>Thanks for helping me find this out,
>Mr. Gecko
>_______________________________________________
>
>Cocoa-dev mailing list (email@hidden)
>
>Please do not post admin requests or moderator comments to the list.
>Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
>Help/Unsubscribe/Update your Subscription:
>
>
>This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden