1833042 Members
2175 Online
110049 Solutions
New Discussion

Re: affect process

 
SupraTeam_1
Regular Advisor

affect process

Hello,
I would like to launch a program just on one core of my dual-core processor.
How can i do that ?

Thanks
3 REPLIES 3
TwoProc
Honored Contributor

Re: affect process

If it is a single process program (not multi-threaded) it will do that automatically.

Other than that you can use partitions to create a single proc partition.

I don't believe HP has come up with the idea of "affinity" for processing, though I hear it's in the works.
We are the people our parents warned us about --Jimmy Buffett
Bill Hassell
Honored Contributor

Re: affect process

man mpctl

You have to write a program to accomplish this task--there is no shell command to make this happen. mpctl() has been around for many years but most tests show that choosing a processor for a specific program does nothing at all for the program's execution time. This is because SMP system like HP-UX allocates processors as needed and nothing is different between context switching among multiple processors and using just one for a specific program. Programs are not 'loaded' into a processor for execution--they are loaded into memory. To get a process started or context-switched, the registers are loaded and the processor starts executing. This occurs no matter what processor is being used. The steps needed to switch to a specific processor are identical to those needed to choose the next available processor.


Bill Hassell, sysadmin
Emil Velez
Honored Contributor

Re: affect process

You can use this program.. I have included its source in C. Compile it and use it..

IT is called pbind