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:
“The greatest blunders, like the thickest ropes, are often compounded of a multitude of strands. Take the rope apart, separate it into the small threads that compose it, and you can break them one by one. You think, That is all there was! But twist them all together and you have something tremendous.”
—Victor Hugo (18021885)
“All opinions in the world agree in this, that pleasure is our end, although they differ as to the means of attaining it.”
—Michel de Montaigne (15331592)
“The higher processes are all processes of simplification. The novelist must learn to write, and then he must unlearn it; just as the modern painter learns to draw, and then learns when utterly to disregard his accomplishment, when to subordinate it to a higher and truer effect.”
—Willa Cather (18731947)