Re: Threads and I/O
Threads are bad when they all read or write to the same source. If all four threads were writing to the same file the written text would get mixed up and you would get a lot of gibberish in that file. But that happens only when multiple threads use the same file, I don't see any problem with your design, all threads have separate outputs so it should work fine.
Performance-wise, there shouldn't be any problems, MPI might add some overhead but it won't be too big.
About the processes vs. threads, some languages (most notably Python and Ruby) have a Global Interpreter Lock (GIL) that prevents threaded programs from reaching maximum performance on a multi core processors.If your language has GIL and you need the performance of multiple cores, you should consider multiprocessing. If you don't have to worry about GIL then use threads, they are much more lightweight and have less overhead than processes.
Windows is not user friendly,it's just user familiar
Bookmarks