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 (17131768)
“In things abstract, men but differ in the sounds that come from their mouths, and not in the wordless thoughts lying at the bottom of their beings.”
—Herman Melville (18191891)
“The vast results obtained by Science are won by no mystical faculties, by no mental processes other than those which are practiced by every one of us, in the humblest and meanest affairs of life. A detective policeman discovers a burglar from the marks made by his shoe, by a mental process identical with that by which Cuvier restored the extinct animals of Montmartre from fragments of their bones.”
—Thomas Henry Huxley (182595)