Thread (computing) - 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.

Systems like 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 address space switch which implies a TLB flush.

Read more about this topic:  Thread (computing)

Famous quotes containing the words threads, differ and/or processes:

    ‘Tis sweet to feel by what fine-spun threads our affections are drawn together.
    Laurence Sterne (1713–1768)

    Complete courage and absolute cowardice are extremes that very few men fall into. The vast middle space contains all the intermediate kinds and degrees of courage; and these differ as much from one another as men’s faces or their humors do.
    François, Duc De La Rochefoucauld (1613–1680)

    It has become a people’s war, and peoples of all sorts and races, of every degree of power and variety of fortune, are involved in its sweeping processes of change and settlement.
    Woodrow Wilson (1856–1924)