What is the technical difference between a process and a thread?

This question already has an answer here:

  • What is the difference between a process and a thread? 33 answers

  • Both processes and threads are independent sequences of execution. The typical difference is that threads (of the same process) run in a shared memory space, while processes run in separate memory spaces.

    Asked Earlier in Stack Overflow : What is the difference between a process and a thread?


    Really interesting question! For a (slightly sloppy) one line answer: a process can manage a number of threads (multiple threads to a process). See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms684841(v=vs.85).aspx

    The actual differences in memory allocation and access are best described here (multiple threads share a memory space, the process they belong to): What is the difference between a process and a thread?

    The wikipedia visual (and subsequent discussion about thread scheduling) provide a pretty good grounding. If you are more interested in more of the technicalities, consider reading the Silberschatz OS textbook!

    Always check to make sure a question hasn't already been answered on SO!

    链接地址: http://www.djcxy.com/p/55262.html

    上一篇: Python多处理库错误(AttributeError:

    下一篇: 进程和线程之间的技术区别是什么?