Home > Software engineering >  Parallel process failure, how to do!
Parallel process failure, how to do!

Time:09-19

Recently wrote a program (source code is too long will not stick), probably function controller is used to start the debugger process, then every debugger to debug analysis results back to the controller through a pipeline, and then the controller to sort the results returned,
Then I in order to improve the efficiency of the method is: the controller start multiple threads at the same time, each thread internal CreateProcess up a debugger process again, and then receive the debugger process within the thread to return the result after the order of the returned results in the critical region (sorted list is a global variable, has achieved, the mutually exclusive access to tested no problem),
According to the original idea, I will start at the same time, for example the debugger process value is set to 5, it will start five threads at the same time, each thread can start a debugger process, finally realizes the five debugger process work together,
But actual test found that program can run up and the result is right, but the speed and the speed is the same as the original single process, open the task manager at found that do not start multiple processes at the same time, has been only a debugger process running,
No problem, in such aspects as communication, mutual exclusion has written two days is really have a headache, master save me!

CodePudding user response:

Write the log analysis step by step

CodePudding user response:

The CreateProcess call success? Some process is not supported at the same time open multiple,

CodePudding user response:

Use Microsoft's Process Explorer tool software look, several other debugging Process blocking in where
  • Related