jspωiki
Thread

Overview#

Thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the Operating System.

Thread differ from traditional multitasking Operating System processes in that:

  • processes are typically independent, while threads exist as subsets of a Processes
  • 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.
Systems such as Windows NT and OS/2 are said to have cheap threads and expensive processes; in other operating systems there is not so great a difference except the cost of an address space switch which on some architectures (notably x86) results in a translation lookaside buffer (TLB) flush.

More Information#

There might be more information for this subject on one of the following: