I have a 4 core PC. I can either create 4 threads in my code for parallel execution or I can create 4 process using fork() in my program. I am not sure whether to go for multiple threads or multiple processes. Please explain when to use what.
I have a 4 core PC. I can either create 4 threads in my code for parallel execution or I can create 4 process using fork() in my program. I am not sure whether to go for multiple threads or multiple processes. Please explain when to use what.