how to run two unix/linux programs on two different cpu cores


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how to run two unix/linux programs on two different cpu cores
# 1  
Old 08-20-2012
how to run two unix/linux programs on two different cpu cores

Hi folks,

I want to know how to run two unix programs on two different cpu cores on a 2-core or 4-core or 8-core CPU machine? Extending this how would i run four and eight unix programs on 4-core and 8-core machine respectively?

If this can be done, how to know which program is assigned to which core? I mean how would you collect statistics about the running program?

Thanks a lot for looking at my thread.


Kind Regards,
# 2  
Old 08-20-2012
Usually, there is no need to run them on specific cores. Just run them simultaneously and they'll use time on whatever CPU is available and the OS deems appropriate. It will do multiprocessing without further effort on your part.

If you really need to do so, install schedutils. Then you can do

taskset -c 1 -p 13545 to fix certain process ID's to certain processors.

These are instructions for Linux. It will be different for any other UNIX or UNIX-like.
This User Gave Thanks to Corona688 For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

Questions regarding CPU cores vs rctl limit

Hi, I am trying to gather cpu core details and used this script - Solaris & Scripting: Script - Find cpu - model / type / count / core / thread / speed - Solaris Sparc For auuditing purpose, we want to know how many cores are being used by Oracle, because oracle license will be charged on... (2 Replies)
Discussion started by: solaris_1977
2 Replies

2. Red Hat

CPU and Cores information

Hi all. I have a question about linux command to find number of CPU and Core. I usually use the command dmidecode -t processor to find cpu and core numbers . On this machine with Red Hat 4. 0 when I try to insert the command is returned the error -bash: dmidecode: command not found I try to... (8 Replies)
Discussion started by: piccolinomax
8 Replies

3. Solaris

Numbers-of-cpu-cores-in-Solaris-10

Hello All, How do I find the number of CPU's, virtual processors in solaris 10? Thank you Sunil Kumar (2 Replies)
Discussion started by: msgforsunil
2 Replies

4. Solaris

CPU/processor/cores in M4000

Hi Gurus Can someone help me in explaining the below outputs . psrinfo -p 4 /usr/sbin/psrinfo -pv The physical processor has 4 virtual processors (0-3) SPARC64-VI (portid 1024 impl 0x6 ver 0x93 clock 2150 MHz) The physical processor has 4 virtual processors (8-11) SPARC64-VI... (3 Replies)
Discussion started by: ningy
3 Replies

5. UNIX for Advanced & Expert Users

UNIX / LINUX OS CPU configuration details

Hi, How to find the cpu configuration details of Cores, Speed MHz, virtual processors for the following servers: LINUX OS Servers: Linux 2.6.9-89.0.3.ELsmp #1 SMP Sat Jun 13 07:05:54 EDT 2009 i686 i686 i386 GNU/Linux. (Cores, Speed, Processor) Linux 2.6.18-164.el5 #1 SMP Tue Aug 18... (5 Replies)
Discussion started by: jagtheesh
5 Replies

6. Red Hat

Lost CPU CORES

Hey all, dmidecode | grep -i CPU Socket Designation: CPU 0 Version: Intel(R) Xeon(R) CPU E5530 @ 2.40GHz Socket Designation: CPU 1 Version: Intel(R) Xeon(R) CPU E5530 @ 2.40GHz cat /proc/cpuinfo | grep -i cpu cpu family : 6... (24 Replies)
Discussion started by: rmokros
24 Replies

7. Shell Programming and Scripting

Is there a way to make bash [or another shell] use all CPU cores to execute a single script?

I wrote a very simple script that matches combinations of alphabetic characters (1-5). I want to use it to test CPU speeds of different hardware/platforms. The problem is that on multi-core/processor systems, only one CPU is being utilized to execute the script. Is there a way to change that?... (16 Replies)
Discussion started by: ph0enix
16 Replies

8. Programming

How to compile and run C++ programs in UNIX environment?

:( :confused: Does anybody here know how to compile and run C++ programs in UNIX enviroment? I am so confused. Any help on this would be greatly appreciated! Thanks! (5 Replies)
Discussion started by: Kahuashi
5 Replies
Login or Register to Ask a Question