2
My computer has 6 cores. I have to run 12 processes. Each process takes exactly 10 minutes.
I want to consider (for the sake of the argument only) two scenarios:
I run 2 processes successively on each core. It should take 20 minutes to finish.
I open 12 terminal windows and I am running all 12 processes independently. Each core will therefore need to switch back and forth between the different processes to give us a feeling that the 12 processes are parallelized.
Question
Does it matter? Does it make a big difference?
My basic thoughts
I would expect that the second solution would take a bit more time as it would need some time for the cores to jump back and forth to the different processes. However, there are many other small processes going on the computer in the meantime run by root for example. I'd expect the second scenario to take a little bit more time but that would be pretty negligible. I made a try and didn't notice any difference but my processes were maybe too short to notice anything.