Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
XP Pro can set affinity on smp systems and change processor priority from low to "realtime" states... does Linux have any type of app or gui that allows this?
I'm not sure what you mean by 'affinity' to a processor on an SMP system (eitherways, WIndows XP Pro can only do up to two processors) if you mean the degree to which the program can utilise the processor in parallel threads, that should be up to the parallel programmer maybe.
As for scheduling on the processor, there's no gui necessary:
nice -n PID
where -n is the priority -20 is the lowest, 19 the highest. If it's already running, renice will change the process' priority on the processor.
Originally posted by Bert I'm not sure what you mean by 'affinity' to a processor on an SMP system (eitherways, WIndows XP Pro can only do up to two processors) if you mean the degree to which the program can utilise the processor in parallel threads, that should be up to the parallel programmer maybe.
As for scheduling on the processor, there's no gui necessary:
nice -n PID
where -n is the priority -20 is the lowest, 19 the highest. If it's already running, renice will change the process' priority on the processor.
Nice, huh?
Bert
Affinity basically boils down to how you wnat the job processed by the set of cpus or cpus anf virtual cpus (If hyper threading is enabled) If you have say a dual processor aware appilcation such as set@home and you start it up and look at the task manager's cpu utilization graph, everything should be started off even on both processors (granted you're on a dual or single ht enabled system) -What you can do is go to the app's process listing, right click on the app and at the bottum of the contextual menu that comes up should say "affinity" (XP Pro and 2000) When you choose this, a window will pop up with all the cpu's checked... what you can do from there is select, say the secondary cpu to do all of the seti@home stuff and uncheck your primary processor so you can use it to do photoshop or word or whatever else you want to run just on one app... it's quite nice on my dual amd... HT P4's... I'm not too sure what good it would do since it's a virtual processor... but anyway, you get the idea... well? Does linux have this?
Right so the affinity is the same as setting a bias towards a processor.
With a normal SMP kernel you can bias a process towards a CPU, which the kernel scheduler does by default. There is a patch somewhere out there which will bind a process (yes, bind a process to a CPU, not just smooch up against it), called PSET. You'll have to do some digging for it though, because the normally hosted site seems to be down.
Careful, negative numbers are *higher* priority. From "man nice":
DESCRIPTION
Run COMMAND with an adjusted scheduling priority. With no COMMAND, print the current scheduling priority.
ADJUST is 10 by default. Range goes from -20 (highest priority) to 19 (lowest).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.