!!! Overview [{$pagename}] 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] or an [Application].[{$pagename}] is a locus of control inside a running [Application]. Think of it as a place in the [Application] that is being run, plus the stack of method calls that led to that place to which it will be necessary to return through. Just as a [process|Processes] represents a [Virtual Machine], the [{$pagename}] abstraction represents a virtual [CPU]. Making a new thread simulates making a fresh processor inside the [Virtual Machine] represented by the [process|Processes]. This new virtual [CPU] runs the same program and shares the same memory as other threads in [process|Processes]. [{$pagename}] 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|Processes] 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 [Operating System]-provided [Inter-Process Communication] ([IPC]) mechanisms * [context] switching between [threads] in the same process is typically faster than [context] switching between [processes]. Systems such as [Windows NT] and [OS2] 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. (as in [Light-Weight Process]) !! More Information There might be more information for this subject on one of the following: [{ReferringPagesPlugin before='*' after='\n' }] ---- * [#1] - [Concurrency_(computer_science)|Wikipedia:Concurrency_(computer_science)|target='_blank'] - based on information obtained 2018-03-20 * [#2] - [Reading 17: Concurrency|https://web.mit.edu/6.005/www/fa14/classes/17-concurrency/|target='_blank'] - based on information obtained 2019-12-27