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