Operating System - HP-UX
1833016 Members
2595 Online
110048 Solutions
New Discussion

Re: Distributing Processes to processors

 
sjana
Occasional Advisor

Distributing Processes to processors

Hello ALL,

I want to distribute a single process (any kind of process) to be distributed to 2 or more processors running in a single system, whats the procedure? any commands (with options)

tar
siva
4 REPLIES 4
Ravi_8
Honored Contributor

Re: Distributing Processes to processors

Hi siva

if the process over burdening the 1st processors,system will allocate 2nd processor to execute that process automatically. There are no such commands to assign a processors to a process
never give up
Bill Hassell
Honored Contributor

Re: Distributing Processes to processors

It's impossible to share a processing load for a single process unless the process was specifically written to use threads (independent subprocesses). Computers are very simple and execute one instruction after another. Splitting the instructions across multiple CPUs would mean computations that depend on previous instructions would fail because the results are in a different CPU. If you start a second copy of the same program, then the two processes will indeed run at the same time.


Bill Hassell, sysadmin
Peter Godron
Honored Contributor

Re: Distributing Processes to processors

Hi,
assuming your code is not parallel designed,the instructions will be handled by the processor in sequence, so switching to another processor would have no benefit, as the code would take as long to run.

Why do you want to distribute the process ?
If it running too slow have a look at the resources it is using (memory swapping, disk throughput, database performance overhead)
Regards
Emil Velez
Honored Contributor

Re: Distributing Processes to processors

The above comment about threads is correct but I would like to add that the OS actually does load balancing across all of the processors at the thread level. So if 1 processor has more workload than the other the OS then moves a thread from the first processor to the 2nd in a effort to balance the workload. This is done every second on HPUX. So the answer really is on a multiprocessor HPUX system if there is sufficient busy programs running the OS will attempt to balance CPU useage.