On Tue, 2014-11-04 at 14:23 +0530, Shriramana Sharma wrote: > Hello. I learnt that I can use make -j to have make execute multiple > jobs in parallel. Does this somehow guarantee that my 4 cores of an i5 > will be used simultaneously or is that left to the (Linux) kernel?
It means that instead of running one instance of your compiler (or whatever command) at a time, make will run more than one at a time. So if make would run these commands: cc -o foo.o -c foo.c cc -o bar.o -c bar.c cc -o baz.o -c baz.c (run one, wait for it to exit, run the next), make -j3 will run the shell equivalent of: cc -o foo.o -c foo.c & cc -o bar.o -c bar.c & cc -o baz.o -c baz.c & then wait for them to complete. As each one completes make will start another command, until all of them are done. It's up to the operating system to schedule how these processes should be run, based on your hardware, other processes running on the system, etc. _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
