[Bit-by-bit. NET] process and thread differences

Source: Internet
Author: User

A process is an "executing program" and is a dynamic concept. We use the IDE to write a program is static, static programs are compiled to form an EXE file, run up and form a process. Process is not only the code of the program, but also contains the activity information of the program runtime, which is usually represented by the value of the program counter or the contents of the register. We can use Windows Explorer to view basic information about a process.

Characteristics of the process:

  1. Is the owner of the physical resource.
  2. Different processes monopolize different program code and data spaces.
  3. The creation, destruction, and switching processes have very large performance costs.

threads are lightweight processes that produce backgrounds that are determined by the nature of the process itself.

Features of the thread:

  1. is a lightweight entity that itself does not occupy system resources. The entities of a thread include programs, data, and thread control blocks (TCB, execution stacks, and program counters that provide the basis for their context execution).
  2. is the smallest unit of CPU time slice allocation.
  3. can be executed concurrently.
  4. All threads in the same process share system resources and data space.

[Bit-by-bit. NET] process and thread differences

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.