Face questions: summary

1. The difference between processes and threads

  A thread is running inside the process, the process can contain multiple threads, a thread can belong to only one process.

  Thread resource contention problems exist, because the data is shared with global variables, shared data between processes using a memory.

  Process consumes large resources, and more for compute-intensive, resource consumption is small thread, used for IO-intensive.

  

Guess you like

Origin www.cnblogs.com/meloncodezhang/p/11486549.html