Assume you have 3 given tasks. You can run them either using process or thread. I means 3 different process or combining them and run 3 different threads. Which one will you prefer and why?
I told him that if I will use process then at a time i will use one process when it will completed then I will swap with another process. Lets assume that if one task is taking 4 bytes of memory then in this way I will be able to complete my task in only 4 bytes. But if I use 3 threads within one process then I have to use 12 bytes. Then he told me lets assume you have lot of space, which one you would prefer?
Any other explanation would be helpful.
Actually, the process based approach is generally more reliable. Threads are okay iff the processes share most of the data and code…