Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Thread (computing)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Threads vs processes=== Threads differ from traditional [[computer multitasking|multitasking]] operating-system [[process (computing)|processes]] in several ways: * processes are typically independent, while threads exist as subsets of a process * processes carry considerably more [[state (computer science)|state]] information than threads, whereas multiple threads within a process share process state as well as [[computer storage|memory]] and other [[resource (computer science)|resources]] * processes have separate [[address space]]s, whereas threads share their address space * processes interact only through system-provided [[inter-process communication]] mechanisms * [[context switch]]ing between threads in the same process typically occurs 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 in the cost of an [[address space|address-space]] switch, which on some architectures (notably [[x86]]) results in a [[translation lookaside buffer]] (TLB) flush. Advantages and disadvantages of threads vs processes include: * ''Lower resource consumption'' of threads: using threads, an application can operate using fewer resources than it would need when using multiple processes. * ''Simplified sharing and communication'' of threads: unlike processes, which require a [[message passing]] or shared memory mechanism to perform [[inter-process communication]] (IPC), threads can communicate through data, code and files they already share. * ''Thread crashes a process'': due to threads sharing the same address space, an illegal operation performed by a thread can crash the entire process; therefore, one misbehaving thread can disrupt the processing of all the other threads in the application.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Thread (computing)
(section)
Add topic