Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Let's say I have a bash script like the following:

prog list1.txt &
prog list2.txt &
prog list3.txt &
wait

will the "prog" instances be launched in a multithreaded environment (like, 1 process per core), or will all of them be launched in the same core?

Thank you for your valuable inputs.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

It's up to the operating system to schedule processes. Cygwin doesn't do anything special.

Assuming your OS isn't horribly broken, it will schedule the processes to cores in whatever way it thinks is best. That should be pretty close to whatever actually is best since OSes worth using are designed by people who know what they're doing.

share|improve this answer
    
I see... thanks for the concise explanation. I don't have much choice regarding the OS, though... :-) –  pepoluan Jan 28 '13 at 12:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.