What is the difference between a thread/process/task?

后端 未结 7 2115
离开以前
离开以前 2021-01-29 20:04

What is the difference between a thread/process/task?

相关标签:
7条回答
  • 2021-01-29 20:37

    A process invokes or initiates a program. It is an instance of a program that can be multiple and running the same application. A thread is the smallest unit of execution that lies within the process. A process can have multiple threads running. An execution of thread results in a task. Hence, in a multithreading environment, multithreading takes place.

    A program in execution is known as process. A program can have any number of processes. Every process has its own address space.

    Threads uses address spaces of the process. The difference between a thread and a process is, when the CPU switches from one process to another the current information needs to be saved in Process Descriptor and load the information of a new process. Switching from one thread to another is simple.

    A task is simply a set of instructions loaded into the memory. Threads can themselves split themselves into two or more simultaneously running tasks.

    for more Understanding refer the link: http://www.careerride.com/os-thread-process-and-task.aspx

    0 讨论(0)
提交回复
热议问题