LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to run the linux process on multiple core (https://www.linuxquestions.org/questions/linux-general-1/how-to-run-the-linux-process-on-multiple-core-764596/)

saurin 10-26-2009 01:36 PM

How to run the linux process on multiple core
 
How can we run the linux process like tar on multiple core?
For example if we want to build the kernel we can use -j4 to distribute process of 4 different core. Is it possible to run long time consuming process on mulitple core?

ozanbaba 10-26-2009 02:01 PM

Quote:

Originally Posted by saurin (Post 3733177)
How can we run the linux process like tar on multiple core?
For example if we want to build the kernel we can use -j4 to distribute process of 4 different core. Is it possible to run long time consuming process on mulitple core?

there's some technical problems with multi core support in programs. easiest way to archive this is using multi thread design. however threads put too much pressure on uniprocessor systems and sometimes on multi core systems. and there's this problem, not anything can be done in multi threaded way. (i'm writing a program which parses a XML file and general XML parsing can not be done in multi thread, i can find special solutions for special XML combinations.)

as far as i know tar isn't really multi thread friendly system at all. a lot of things are. ask GNU people about multi thread support in their programs.

if in doubt, run two tars simultaneously.

and with make -j option, make do builds simultaneously. i don't know how they did it. maybe multi thread, maybe multi processes design.


All times are GMT -5. The time now is 07:30 PM.