A Process is an instance of a running application. And a thread is the Execution stream of the Process. A process can have multiple Thread.
When a process starts a specific memory area is allocated to it. When there are multiple threads in a process, each thread gets a memory for storing the variables in it, and plus they can access the global variables which are common for all the threads.
Thread: is used to execute more than one program at a time. The process can execute a single program.
Thread is a path of execution that runs on the CPU, a process is collection of threads that share the same virtual memory. A process has at least one thread of execution, and a thread always runs in a process context.
Comments
Post a Comment