📜  过程映像和多线程过程映像之间的区别

📅  最后修改于: 2021-08-27 17:03:10             🧑  作者: Mango

1.过程映像:
进程映像是在执行任何进程期间所需的可执行文件。它由与流程执行相关的几个部分组成。
以下是过程映像的内容–

1. Process Control Block
2. Stack
3. Data
4. Code 

1.多线程进程映像:
多线程过程映像是在执行任何线程期间所需的可执行文件。它由与线程执行相关的几个部分组成。
以下是多线程过程映像的内容–

1. Process Control Block
2. Thread Control Block
3. Stack
4. Data
5. Code 

过程映像和多线程过程映像之间的区别:

PROCESS IMAGE MULTI THREAD PROCESS IMAGE
It is an executable file required during the execution of a process. It is an executable file required during the execution of a thread.
It consists of total four segments. It consists of 2 segments for each thread and 3 common segments.
Creation of process image takes more time. Creation of single thread image takes less time.
Switching between two process images takes more time. Switching between two thread images takes less time.
Different process share different memory and different images. Common address space in multi thread process image is shared by all threads.
It used user address space. It uses common address space.
Communication between process images is difficult. Communication between two thread images is simple.
Single control block is used in process image. One control block is used for parent process and one each for threads.