How threads differ from processes

How threads differ from processes

Threads differ from traditional multitasking operating system processes in that:

  • processes are typically independent, while threads exist as subsets of a process
  • processes carry considerably more state information than threads, whereas multiple threads within a process share process state as well as memory and other resources
  • processes have separate address spaces, whereas threads share their address space
  • processes interact only through system-provided inter-process communication mechanisms
  • Context switching between threads in the same process is typically faster than context switching between processes.
上一篇:(三十九)数据的持久化存储-plist实现(XML属性表)


下一篇:c++11 delete禁用函数