How would you decide between creating a sub-process vs creating a thread?

Anyone can explain this question?

Process -
A process is an executing program. A process may have one or more threads and

Child process -
A child process is a process created by another process. This technique is used in multitasking operating systems, and is sometimes called a sub-process or a sub-task.

Thread -
A thread is the basic unit to which the operating system allocates processor time. A thread can execute any part of the process code.

The typical difference is that threads run in a shared memory space, while processes run in separate memory spaces.. So, Its totally depend upon you what to create
If you want to know more about the shared memory. You can go though this -



Processes Vs Threads

what if you choose to create a thread ?

What if you choose to create a sub-process ?


I hope this will help you :slight_smile: