Ios_ the differences and connections between threads and processes

Source: Internet
Author: User

Call ~ Tomorrow there is an interview, do not know why, a little nervous ...

The first is the connection between threads and processes:

Threads and processes are the basic units that are run by the operating system, and the system uses this basic unit to implement concurrency to the application.

The next step is the difference between threads and processes:

The biggest difference between threads and processes is that they are two kinds of resource management methods of the operating system, the process has a separate address space, a process is collapsed, in protected mode will not affect other processes, and the thread is just a process of different execution routes, the thread has its own stack and local variables, However, there is no separate address space between the threads, a thread dead is equal to the entire process dead, so the multi-process program is more robust than multithreaded programs, but in the process of switching, expensive resources, less efficient, but for some of the concurrent operations that require simultaneous and share certain variables, can only use the thread, The process cannot be used.

The blog is not very thin about some knowledge, just satisfied with the interview needs, welcome to criticize the pointer.

Ios_ the differences and connections between threads and processes

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.