CINXE.COM

Thread (computing) - Wikipedia

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Thread (computing) - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"48c8ff8c-d031-4c26-9914-d4b9a1c1cef3","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Thread_(computing)","wgTitle":"Thread (computing)","wgCurRevisionId":1264827543,"wgRevisionId":1264827543,"wgArticleId":45303,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["CS1 maint: bot: original URL status unknown","Articles with short description","Short description matches Wikidata","Wikipedia articles needing page number citations from December 2022","Articles to be expanded from February 2021","All articles to be expanded","Wikipedia articles needing clarification from June 2020","Concurrent computing","Threads (computing)"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName": "Thread_(computing)","wgRelevantArticleId":45303,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":30000,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q213092","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"], "GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","mediawiki.page.media","site","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar", "ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=ext.cite.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.15"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Multithreaded_process.svg/1200px-Multithreaded_process.svg.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="1133"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Multithreaded_process.svg/800px-Multithreaded_process.svg.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="756"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Multithreaded_process.svg/640px-Multithreaded_process.svg.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="604"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Thread (computing) - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Thread_(computing)"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Thread_(computing)&amp;action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Thread_(computing)"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Thread_computing rootpage-Thread_computing skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" title="Main menu" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page&#039;s font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/?wmf_source=donate&amp;wmf_medium=sidebar&amp;wmf_campaign=en.wikipedia.org&amp;uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&amp;returnto=Thread+%28computing%29" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&amp;returnto=Thread+%28computing%29" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/?wmf_source=donate&amp;wmf_medium=sidebar&amp;wmf_campaign=en.wikipedia.org&amp;uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&amp;returnto=Thread+%28computing%29" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=Thread+%28computing%29" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-History" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#History"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>History</span> </div> </a> <ul id="toc-History-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Related_concepts" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Related_concepts"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Related concepts</span> </div> </a> <button aria-controls="toc-Related_concepts-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Related concepts subsection</span> </button> <ul id="toc-Related_concepts-sublist" class="vector-toc-list"> <li id="toc-Processes" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Processes"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>Processes</span> </div> </a> <ul id="toc-Processes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Kernel_threads" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Kernel_threads"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Kernel threads</span> </div> </a> <ul id="toc-Kernel_threads-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-User_threads" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#User_threads"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>User threads</span> </div> </a> <ul id="toc-User_threads-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Fibers" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Fibers"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>Fibers</span> </div> </a> <ul id="toc-Fibers-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Threads_vs_processes" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Threads_vs_processes"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>Threads vs processes</span> </div> </a> <ul id="toc-Threads_vs_processes-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Scheduling" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Scheduling"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Scheduling</span> </div> </a> <button aria-controls="toc-Scheduling-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Scheduling subsection</span> </button> <ul id="toc-Scheduling-sublist" class="vector-toc-list"> <li id="toc-Preemptive_vs_cooperative_scheduling" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Preemptive_vs_cooperative_scheduling"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.1</span> <span>Preemptive vs cooperative scheduling</span> </div> </a> <ul id="toc-Preemptive_vs_cooperative_scheduling-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Single-_vs_multi-processor_systems" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Single-_vs_multi-processor_systems"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.2</span> <span>Single- vs multi-processor systems</span> </div> </a> <ul id="toc-Single-_vs_multi-processor_systems-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Threading_models" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Threading_models"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3</span> <span>Threading models</span> </div> </a> <ul id="toc-Threading_models-sublist" class="vector-toc-list"> <li id="toc-1:1_(kernel-level_threading)" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#1:1_(kernel-level_threading)"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3.1</span> <span>1:1 (kernel-level threading)</span> </div> </a> <ul id="toc-1:1_(kernel-level_threading)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-M:1_(user-level_threading)" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#M:1_(user-level_threading)"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3.2</span> <span><i>M</i>:1 (user-level threading)</span> </div> </a> <ul id="toc-M:1_(user-level_threading)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-M:N_(hybrid_threading)" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#M:N_(hybrid_threading)"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3.3</span> <span><i>M</i>:<i>N</i> (hybrid threading)</span> </div> </a> <ul id="toc-M:N_(hybrid_threading)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Hybrid_implementation_examples" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Hybrid_implementation_examples"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3.4</span> <span>Hybrid implementation examples</span> </div> </a> <ul id="toc-Hybrid_implementation_examples-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-History_of_threading_models_in_Unix_systems" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#History_of_threading_models_in_Unix_systems"> <div class="vector-toc-text"> <span class="vector-toc-numb">3.3.5</span> <span>History of threading models in Unix systems</span> </div> </a> <ul id="toc-History_of_threading_models_in_Unix_systems-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </li> <li id="toc-Single-threaded_vs_multithreaded_programs" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Single-threaded_vs_multithreaded_programs"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Single-threaded vs multithreaded programs</span> </div> </a> <button aria-controls="toc-Single-threaded_vs_multithreaded_programs-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Single-threaded vs multithreaded programs subsection</span> </button> <ul id="toc-Single-threaded_vs_multithreaded_programs-sublist" class="vector-toc-list"> <li id="toc-Threads_and_data_synchronization" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Threads_and_data_synchronization"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>Threads and data synchronization</span> </div> </a> <ul id="toc-Threads_and_data_synchronization-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Thread_pools" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Thread_pools"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.2</span> <span>Thread pools</span> </div> </a> <ul id="toc-Thread_pools-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Multithreaded_programs_vs_single-threaded_programs_pros_and_cons" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Multithreaded_programs_vs_single-threaded_programs_pros_and_cons"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.3</span> <span>Multithreaded programs vs single-threaded programs pros and cons</span> </div> </a> <ul id="toc-Multithreaded_programs_vs_single-threaded_programs_pros_and_cons-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Programming_language_support" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Programming_language_support"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Programming language support</span> </div> </a> <ul id="toc-Programming_language_support-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Further_reading" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Further_reading"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>Further reading</span> </div> </a> <ul id="toc-Further_reading-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" title="Table of Contents" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Thread (computing)</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 38 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-38" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">38 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-af mw-list-item"><a href="https://af.wikipedia.org/wiki/Liggewigproses" title="Liggewigproses – Afrikaans" lang="af" hreflang="af" data-title="Liggewigproses" data-language-autonym="Afrikaans" data-language-local-name="Afrikaans" class="interlanguage-link-target"><span>Afrikaans</span></a></li><li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%AA%D8%B4%D8%B9%D8%A8_(%D8%AD%D9%88%D8%B3%D8%A8%D8%A9)" title="تشعب (حوسبة) – Arabic" lang="ar" hreflang="ar" data-title="تشعب (حوسبة)" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/Tred_(informatika)" title="Tred (informatika) – Azerbaijani" lang="az" hreflang="az" data-title="Tred (informatika)" data-language-autonym="Azərbaycanca" data-language-local-name="Azerbaijani" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Fil_d%27execuci%C3%B3" title="Fil d&#039;execució – Catalan" lang="ca" hreflang="ca" data-title="Fil d&#039;execució" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Vl%C3%A1kno_(informatika)" title="Vlákno (informatika) – Czech" lang="cs" hreflang="cs" data-title="Vlákno (informatika)" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/Tr%C3%A5d_(datalogi)" title="Tråd (datalogi) – Danish" lang="da" hreflang="da" data-title="Tråd (datalogi)" data-language-autonym="Dansk" data-language-local-name="Danish" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Thread_(Informatik)" title="Thread (Informatik) – German" lang="de" hreflang="de" data-title="Thread (Informatik)" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-et mw-list-item"><a href="https://et.wikipedia.org/wiki/L%C3%B5im_(informaatika)" title="Lõim (informaatika) – Estonian" lang="et" hreflang="et" data-title="Lõim (informaatika)" data-language-autonym="Eesti" data-language-local-name="Estonian" class="interlanguage-link-target"><span>Eesti</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikipedia.org/wiki/%CE%9D%CE%AE%CE%BC%CE%B1_(%CF%85%CF%80%CE%BF%CE%BB%CE%BF%CE%B3%CE%B9%CF%83%CF%84%CE%AD%CF%82)" title="Νήμα (υπολογιστές) – Greek" lang="el" hreflang="el" data-title="Νήμα (υπολογιστές)" data-language-autonym="Ελληνικά" data-language-local-name="Greek" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Hilo_(inform%C3%A1tica)" title="Hilo (informática) – Spanish" lang="es" hreflang="es" data-title="Hilo (informática)" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%B1%DB%8C%D8%B3%D9%85%D8%A7%D9%86_(%D8%B1%D8%A7%DB%8C%D8%A7%D9%86%D8%B4)" title="ریسمان (رایانش) – Persian" lang="fa" hreflang="fa" data-title="ریسمان (رایانش)" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Thread_(informatique)" title="Thread (informatique) – French" lang="fr" hreflang="fr" data-title="Thread (informatique)" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EC%8A%A4%EB%A0%88%EB%93%9C_(%EC%BB%B4%ED%93%A8%ED%8C%85)" title="스레드 (컴퓨팅) – Korean" lang="ko" hreflang="ko" data-title="스레드 (컴퓨팅)" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Utas_(ilmu_komputer)" title="Utas (ilmu komputer) – Indonesian" lang="id" hreflang="id" data-title="Utas (ilmu komputer)" data-language-autonym="Bahasa Indonesia" data-language-local-name="Indonesian" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-ia mw-list-item"><a href="https://ia.wikipedia.org/wiki/Filo_(informatica)" title="Filo (informatica) – Interlingua" lang="ia" hreflang="ia" data-title="Filo (informatica)" data-language-autonym="Interlingua" data-language-local-name="Interlingua" class="interlanguage-link-target"><span>Interlingua</span></a></li><li class="interlanguage-link interwiki-is mw-list-item"><a href="https://is.wikipedia.org/wiki/%C3%9Er%C3%A1%C3%B0ur_(t%C3%B6lvunarfr%C3%A6%C3%B0i)" title="Þráður (tölvunarfræði) – Icelandic" lang="is" hreflang="is" data-title="Þráður (tölvunarfræði)" data-language-autonym="Íslenska" data-language-local-name="Icelandic" class="interlanguage-link-target"><span>Íslenska</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Thread_(informatica)" title="Thread (informatica) – Italian" lang="it" hreflang="it" data-title="Thread (informatica)" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/%D7%AA%D7%94%D7%9C%D7%99%D7%9B%D7%95%D7%9F" title="תהליכון – Hebrew" lang="he" hreflang="he" data-title="תהליכון" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Sz%C3%A1l_(programoz%C3%A1s)" title="Szál (programozás) – Hungarian" lang="hu" hreflang="hu" data-title="Szál (programozás)" data-language-autonym="Magyar" data-language-local-name="Hungarian" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikipedia.org/wiki/%E0%B4%A4%E0%B5%8D%E0%B4%B0%E0%B5%86%E0%B4%A1%E0%B5%8D%E0%B4%A1%E0%B4%BF%E0%B4%99%E0%B5%8D" title="ത്രെഡ്ഡിങ് – Malayalam" lang="ml" hreflang="ml" data-title="ത്രെഡ്ഡിങ്" data-language-autonym="മലയാളം" data-language-local-name="Malayalam" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-mn mw-list-item"><a href="https://mn.wikipedia.org/wiki/Thread" title="Thread – Mongolian" lang="mn" hreflang="mn" data-title="Thread" data-language-autonym="Монгол" data-language-local-name="Mongolian" class="interlanguage-link-target"><span>Монгол</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Thread_(informatica)" title="Thread (informatica) – Dutch" lang="nl" hreflang="nl" data-title="Thread (informatica)" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E3%82%B9%E3%83%AC%E3%83%83%E3%83%89_(%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF)" title="スレッド (コンピュータ) – Japanese" lang="ja" hreflang="ja" data-title="スレッド (コンピュータ)" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/Tr%C3%A5d_(informatikk)" title="Tråd (informatikk) – Norwegian Bokmål" lang="nb" hreflang="nb" data-title="Tråd (informatikk)" data-language-autonym="Norsk bokmål" data-language-local-name="Norwegian Bokmål" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/W%C4%85tek_(informatyka)" title="Wątek (informatyka) – Polish" lang="pl" hreflang="pl" data-title="Wątek (informatyka)" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Thread_(computa%C3%A7%C3%A3o)" title="Thread (computação) – Portuguese" lang="pt" hreflang="pt" data-title="Thread (computação)" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/Fir_de_execu%C8%9Bie" title="Fir de execuție – Romanian" lang="ro" hreflang="ro" data-title="Fir de execuție" data-language-autonym="Română" data-language-local-name="Romanian" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%9F%D0%BE%D1%82%D0%BE%D0%BA_%D0%B2%D1%8B%D0%BF%D0%BE%D0%BB%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F" title="Поток выполнения – Russian" lang="ru" hreflang="ru" data-title="Поток выполнения" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sq mw-list-item"><a href="https://sq.wikipedia.org/wiki/Fijet_(threads)" title="Fijet (threads) – Albanian" lang="sq" hreflang="sq" data-title="Fijet (threads)" data-language-autonym="Shqip" data-language-local-name="Albanian" class="interlanguage-link-target"><span>Shqip</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Thread_(computer_science)" title="Thread (computer science) – Simple English" lang="en-simple" hreflang="en-simple" data-title="Thread (computer science)" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://sk.wikipedia.org/wiki/Thread_(multithreading)" title="Thread (multithreading) – Slovak" lang="sk" hreflang="sk" data-title="Thread (multithreading)" data-language-autonym="Slovenčina" data-language-local-name="Slovak" class="interlanguage-link-target"><span>Slovenčina</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/%D0%9D%D0%B8%D1%82_(%D1%80%D0%B0%D1%87%D1%83%D0%BD%D0%B0%D1%80%D1%81%D1%82%D0%B2%D0%BE)" title="Нит (рачунарство) – Serbian" lang="sr" hreflang="sr" data-title="Нит (рачунарство)" data-language-autonym="Српски / srpski" data-language-local-name="Serbian" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Tr%C3%A5d_(datavetenskap)" title="Tråd (datavetenskap) – Swedish" lang="sv" hreflang="sv" data-title="Tråd (datavetenskap)" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%AA%E0%B8%B2%E0%B8%A2%E0%B9%82%E0%B8%A2%E0%B8%87%E0%B9%83%E0%B8%A2" title="สายโยงใย – Thai" lang="th" hreflang="th" data-title="สายโยงใย" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/%C4%B0%C5%9F_par%C3%A7ac%C4%B1%C4%9F%C4%B1" title="İş parçacığı – Turkish" lang="tr" hreflang="tr" data-title="İş parçacığı" data-language-autonym="Türkçe" data-language-local-name="Turkish" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%9F%D0%BE%D1%82%D1%96%D0%BA_%D0%B2%D0%B8%D0%BA%D0%BE%D0%BD%D0%B0%D0%BD%D0%BD%D1%8F" title="Потік виконання – Ukrainian" lang="uk" hreflang="uk" data-title="Потік виконання" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/Lu%E1%BB%93ng_(%C4%91i%E1%BB%87n_to%C3%A1n)" title="Luồng (điện toán) – Vietnamese" lang="vi" hreflang="vi" data-title="Luồng (điện toán)" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E7%BA%BF%E7%A8%8B" title="线程 – Chinese" lang="zh" hreflang="zh" data-title="线程" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q213092#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Thread_(computing)" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Thread_(computing)" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Thread_(computing)"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Thread_(computing)&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Thread_(computing)&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Thread_(computing)"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Thread_(computing)&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Thread_(computing)&amp;action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Thread_(computing)" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Thread_(computing)" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Thread_(computing)&amp;oldid=1264827543" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Thread_(computing)&amp;action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&amp;page=Thread_%28computing%29&amp;id=1264827543&amp;wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FThread_%28computing%29"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FThread_%28computing%29"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=Thread_%28computing%29&amp;action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Thread_(computing)&amp;printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Category:Threads_(computing)" hreflang="en"><span>Wikimedia Commons</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q213092" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable">This article is about the concurrency concept. For multithreading in hardware, see <a href="/wiki/Multithreading_(computer_architecture)" title="Multithreading (computer architecture)">Multithreading (computer architecture)</a>. For the form of code consisting entirely of <a href="/wiki/Subroutine" class="mw-redirect" title="Subroutine">subroutine</a> calls, see <a href="/wiki/Threaded_code" title="Threaded code">Threaded code</a>. For other uses, see <a href="/wiki/Thread_(disambiguation)" class="mw-redirect mw-disambig" title="Thread (disambiguation)">Thread (disambiguation)</a>.</div> <div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Smallest sequence of programmed instructions that can be managed independently by a scheduler</div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Multithreaded_process.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Multithreaded_process.svg/220px-Multithreaded_process.svg.png" decoding="async" width="220" height="208" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Multithreaded_process.svg/330px-Multithreaded_process.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Multithreaded_process.svg/440px-Multithreaded_process.svg.png 2x" data-file-width="450" data-file-height="425" /></a><figcaption>A process with two threads of execution, running on one <a href="/wiki/Processor_(computing)" title="Processor (computing)">processor</a></figcaption></figure> <figure typeof="mw:File/Thumb"><a href="/wiki/File:Concepts-_Program_vs._Process_vs._Thread.jpg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/2/25/Concepts-_Program_vs._Process_vs._Thread.jpg/400px-Concepts-_Program_vs._Process_vs._Thread.jpg" decoding="async" width="400" height="231" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/2/25/Concepts-_Program_vs._Process_vs._Thread.jpg/600px-Concepts-_Program_vs._Process_vs._Thread.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/2/25/Concepts-_Program_vs._Process_vs._Thread.jpg/800px-Concepts-_Program_vs._Process_vs._Thread.jpg 2x" data-file-width="1448" data-file-height="836" /></a><figcaption><a href="/wiki/Computer_program" title="Computer program">Program</a> vs. <a href="/wiki/Process_(computing)" title="Process (computing)">Process</a> vs. Thread <br /><a href="/wiki/Scheduling_(computing)" title="Scheduling (computing)">Scheduling</a>, <a href="/wiki/Preemption_(computing)" title="Preemption (computing)">Preemption</a>, <a href="/wiki/Context_switch" title="Context switch">Context Switching</a></figcaption></figure> <p>In <a href="/wiki/Computer_science" title="Computer science">computer science</a>, a <b>thread</b> of <a href="/wiki/Execution_(computing)" title="Execution (computing)">execution</a> is the smallest sequence of programmed instructions that can be managed independently by a <a href="/wiki/Scheduling_(computing)" title="Scheduling (computing)">scheduler</a>, which is typically a part of the <a href="/wiki/Operating_system" title="Operating system">operating system</a>.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup> In many cases, a thread is a component of a <a href="/wiki/Process_(computing)" title="Process (computing)">process</a>. </p><p>The multiple threads of a given process may be executed <a href="/wiki/Concurrent_computation" class="mw-redirect" title="Concurrent computation">concurrently</a> (via multithreading capabilities), sharing resources such as <a href="/wiki/Shared_memory_(interprocess_communication)" class="mw-redirect" title="Shared memory (interprocess communication)">memory</a>, while different processes do not share these resources. In particular, the threads of a process share its executable code and the values of its <a href="/wiki/Memory_management#HEAP" title="Memory management">dynamically allocated</a> variables and non-<a href="/wiki/Thread-local_storage" title="Thread-local storage">thread-local</a> <a href="/wiki/Global_variable" title="Global variable">global variables</a> at any given time. </p><p>The implementation of threads and <a href="/wiki/Process_(computing)" title="Process (computing)">processes</a> differs between operating systems.<sup id="cite_ref-tanenbaum199200_2-0" class="reference"><a href="#cite_note-tanenbaum199200-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup><sup class="noprint Inline-Template" style="white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Citing_sources" title="Wikipedia:Citing sources"><span title="This citation requires a reference to the specific page or range of pages in which the material appears. (December 2022)">page&#160;needed</span></a></i>&#93;</sup> </p> <style data-mw-deduplicate="TemplateStyles:r886046785">.mw-parser-output .toclimit-2 .toclevel-1 ul,.mw-parser-output .toclimit-3 .toclevel-2 ul,.mw-parser-output .toclimit-4 .toclevel-3 ul,.mw-parser-output .toclimit-5 .toclevel-4 ul,.mw-parser-output .toclimit-6 .toclevel-5 ul,.mw-parser-output .toclimit-7 .toclevel-6 ul{display:none}</style><div class="toclimit-3"><meta property="mw:PageProp/toc" /></div> <div class="mw-heading mw-heading2"><h2 id="History">History</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=1" title="Edit section: History"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1251242444">.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}</style><table class="box-Expand_section plainlinks metadata ambox mbox-small-left ambox-content" role="presentation"><tbody><tr><td class="mbox-image"><span typeof="mw:File"><a href="/wiki/File:Wiki_letter_w_cropped.svg" class="mw-file-description"><img alt="[icon]" src="//upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Wiki_letter_w_cropped.svg/20px-Wiki_letter_w_cropped.svg.png" decoding="async" width="20" height="14" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Wiki_letter_w_cropped.svg/30px-Wiki_letter_w_cropped.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Wiki_letter_w_cropped.svg/40px-Wiki_letter_w_cropped.svg.png 2x" data-file-width="44" data-file-height="31" /></a></span></td><td class="mbox-text"><div class="mbox-text-span">This section <b>needs expansion</b>. You can help by <a class="external text" href="https://en.wikipedia.org/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=">adding to it</a>. <span class="date-container"><i>(<span class="date">February 2021</span>)</i></span></div></td></tr></tbody></table> <p>Threads made an early appearance under the name of "tasks" in IBM's batch processing operating system, OS/360, in 1967. It provided users with three available configurations of the <a href="/wiki/OS/360" class="mw-redirect" title="OS/360">OS/360</a> control system, of which <a href="/wiki/OS/360_and_successors#MVT" title="OS/360 and successors">Multiprogramming with a Variable Number of Tasks</a> (MVT) was one. Saltzer (1966) credits <a href="/wiki/Victor_A._Vyssotsky" title="Victor A. Vyssotsky">Victor A. Vyssotsky</a> with the term "thread".<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">&#91;</span>3<span class="cite-bracket">&#93;</span></a></sup> </p><p>The use of threads in software applications became more common in the early 2000s as CPUs began to utilize multiple cores. Applications wishing to take advantage of multiple cores for performance advantages were required to employ concurrency to utilize the multiple cores.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">&#91;</span>4<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Related_concepts">Related concepts</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=2" title="Edit section: Related concepts"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Scheduling can be done at the kernel level or user level, and multitasking can be done <a href="/wiki/Preemption_(computing)" title="Preemption (computing)">preemptively</a> or <a href="/wiki/Cooperative_multitasking" title="Cooperative multitasking">cooperatively</a>. This yields a variety of related concepts. </p> <div class="mw-heading mw-heading3"><h3 id="Processes">Processes</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=3" title="Edit section: Processes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Process_(computing)" title="Process (computing)">Process (computing)</a></div> <p>At the kernel level, a <i>process</i> contains one or more <i>kernel threads</i>, which share the process's resources, such as memory and file handles – a process is a unit of resources, while a thread is a unit of scheduling and execution. Kernel scheduling is typically uniformly done preemptively or, less commonly, cooperatively. At the user level a process such as a <a href="/wiki/Runtime_system" title="Runtime system">runtime system</a> can itself schedule multiple threads of execution. If these do not share data, as in Erlang, they are usually analogously called processes,<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">&#91;</span>5<span class="cite-bracket">&#93;</span></a></sup> while if they share data they are usually called <i>(user) threads</i>, particularly if preemptively scheduled. Cooperatively scheduled user threads are known as <i><a href="/wiki/Fiber_(computer_science)" title="Fiber (computer science)">fibers</a></i>; different processes may schedule user threads differently. User threads may be executed by kernel threads in various ways (one-to-one, many-to-one, many-to-many). The term "<a href="/wiki/Light-weight_process" title="Light-weight process">light-weight process</a>" variously refers to user threads or to kernel mechanisms for scheduling user threads onto kernel threads. </p><p>A <i>process</i> is a "heavyweight" unit of kernel scheduling, as creating, destroying, and switching processes is relatively expensive. Processes own <a href="/wiki/Resource_(computer_science)" class="mw-redirect" title="Resource (computer science)">resources</a> allocated by the operating system. Resources include memory (for both code and data), <a href="/wiki/Handle_(computing)" title="Handle (computing)">file handles</a>, sockets, device handles, windows, and a <a href="/wiki/Process_control_block" title="Process control block">process control block</a>. Processes are <i>isolated</i> by <a href="/wiki/Process_isolation" title="Process isolation">process isolation</a>, and do not share address spaces or file resources except through explicit methods such as inheriting file handles or shared memory segments, or mapping the same file in a shared way – see <a href="/wiki/Interprocess_communication" class="mw-redirect" title="Interprocess communication">interprocess communication</a>. Creating or destroying a process is relatively expensive, as resources must be acquired or released. Processes are typically preemptively multitasked, and process switching is relatively expensive, beyond basic cost of <a href="/wiki/Context_switching" class="mw-redirect" title="Context switching">context switching</a>, due to issues such as cache flushing (in particular, process switching changes virtual memory addressing, causing invalidation and thus flushing of an untagged <a href="/wiki/Translation_lookaside_buffer" title="Translation lookaside buffer">translation lookaside buffer</a> (TLB), notably on x86). </p> <div class="mw-heading mw-heading3"><h3 id="Kernel_threads">Kernel threads</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=4" title="Edit section: Kernel threads"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span class="anchor" id="kernel_thread"></span> A <i>kernel thread</i> is a "lightweight" unit of kernel scheduling. At least one kernel thread exists within each process. If multiple kernel threads exist within a process, then they share the same memory and file resources. Kernel threads are preemptively multitasked if the operating system's process <a href="/wiki/Scheduling_(computing)" title="Scheduling (computing)">scheduler</a> is preemptive. Kernel threads do not own resources except for a <a href="/wiki/Call_stack" title="Call stack">stack</a>, a copy of the <a href="/wiki/Processor_register" title="Processor register">registers</a> including the <a href="/wiki/Program_counter" title="Program counter">program counter</a>, and <a href="/wiki/Thread-local_storage" title="Thread-local storage">thread-local storage</a> (if any), and are thus relatively cheap to create and destroy. Thread switching is also relatively cheap: it requires a context switch (saving and restoring registers and stack pointer), but does not change virtual memory and is thus cache-friendly (leaving TLB valid). The kernel can assign one or more software threads to each core in a CPU (it being able to assign itself multiple software threads depending on its support for multithreading), and can swap out threads that get blocked. However, kernel threads take much longer than user threads to be swapped. </p> <div class="mw-heading mw-heading3"><h3 id="User_threads">User threads</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=5" title="Edit section: User threads"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span class="anchor" id="user_thread"></span> Threads are sometimes implemented in <a href="/wiki/User_space" class="mw-redirect" title="User space">userspace</a> libraries, thus called <i>user threads</i>. The kernel is unaware of them, so they are managed and scheduled in userspace. Some implementations base their user threads on top of several kernel threads, to benefit from <a href="/wiki/Multiprocessing" title="Multiprocessing">multi-processor</a> machines (<a href="#Threading_models">M:N model</a>). User threads as implemented by <a href="/wiki/Virtual_machine" title="Virtual machine">virtual machines</a> are also called <a href="/wiki/Green_threads" class="mw-redirect" title="Green threads">green threads</a>. </p><p>As user thread implementations are typically entirely in userspace, context switching between user threads within the same process is extremely efficient because it does not require any interaction with the kernel at all: a context switch can be performed by locally saving the CPU registers used by the currently executing user thread or fiber and then loading the registers required by the user thread or fiber to be executed. Since scheduling occurs in userspace, the scheduling policy can be more easily tailored to the requirements of the program's workload. </p><p>However, the use of blocking system calls in user threads (as opposed to kernel threads) can be problematic. If a user thread or a fiber performs a system call that blocks, the other user threads and fibers in the process are unable to run until the system call returns. A typical example of this problem is when performing I/O: most programs are written to perform I/O synchronously. When an I/O operation is initiated, a system call is made, and does not return until the I/O operation has been completed. In the intervening period, the entire process is "blocked" by the kernel and cannot run, which starves other user threads and fibers in the same process from executing. </p><p>A common solution to this problem (used, in particular, by many green threads implementations) is providing an I/O API that implements an interface that blocks the calling thread, rather than the entire process, by using non-blocking I/O internally, and scheduling another user thread or fiber while the I/O operation is in progress. Similar solutions can be provided for other blocking system calls. Alternatively, the program can be written to avoid the use of synchronous I/O or other blocking system calls (in particular, using non-blocking I/O, including lambda continuations and/or async/<a href="/wiki/Await" class="mw-redirect" title="Await">await</a> primitives<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup>). </p> <div class="mw-heading mw-heading3"><h3 id="Fibers">Fibers</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=6" title="Edit section: Fibers"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Fiber_(computer_science)" title="Fiber (computer science)">Fiber (computer science)</a></div> <p><a href="/wiki/Fiber_(computer_science)" title="Fiber (computer science)">Fibers</a> are an even lighter unit of scheduling which are <a href="/wiki/Cooperative_multitasking" title="Cooperative multitasking">cooperatively scheduled</a>: a running fiber must explicitly "<a href="/wiki/Yield_(multithreading)" title="Yield (multithreading)">yield</a>" to allow another fiber to run, which makes their implementation much easier than kernel or <a href="#User_threads">user threads</a>. A fiber can be scheduled to run in any thread in the same process. This permits applications to gain performance improvements by managing scheduling themselves, instead of relying on the kernel scheduler (which may not be tuned for the application). Some research implementations of the <a href="/wiki/OpenMP" title="OpenMP">OpenMP</a> parallel programming model implement their tasks through fibers.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">&#91;</span>7<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">&#91;</span>8<span class="cite-bracket">&#93;</span></a></sup> Closely related to fibers are <a href="/wiki/Coroutine" title="Coroutine">coroutines</a>, with the distinction being that coroutines are a language-level construct, while fibers are a system-level construct. </p> <div class="mw-heading mw-heading3"><h3 id="Threads_vs_processes">Threads vs processes</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=7" title="Edit section: Threads vs processes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Threads differ from traditional <a href="/wiki/Computer_multitasking" title="Computer multitasking">multitasking</a> operating-system <a href="/wiki/Process_(computing)" title="Process (computing)">processes</a> in several ways: </p> <ul><li>processes are typically independent, while threads exist as subsets of a process</li> <li>processes carry considerably more <a href="/wiki/State_(computer_science)" title="State (computer science)">state</a> information than threads, whereas multiple threads within a process share process state as well as <a href="/wiki/Computer_storage" class="mw-redirect" title="Computer storage">memory</a> and other <a href="/wiki/Resource_(computer_science)" class="mw-redirect" title="Resource (computer science)">resources</a></li> <li>processes have separate <a href="/wiki/Address_space" title="Address space">address spaces</a>, whereas threads share their address space</li> <li>processes interact only through system-provided <a href="/wiki/Inter-process_communication" title="Inter-process communication">inter-process communication</a> mechanisms</li> <li><a href="/wiki/Context_switch" title="Context switch">context switching</a> between threads in the same process typically occurs faster than context switching between processes</li></ul> <p>Systems such as <a href="/wiki/Windows_NT" title="Windows NT">Windows NT</a> and <a href="/wiki/OS/2" title="OS/2">OS/2</a> are said to have <i>cheap</i> threads and <i>expensive</i> processes; in other operating systems there is not so great a difference except in the cost of an <a href="/wiki/Address_space" title="Address space">address-space</a> switch, which on some architectures (notably <a href="/wiki/X86" title="X86">x86</a>) results in a <a href="/wiki/Translation_lookaside_buffer" title="Translation lookaside buffer">translation lookaside buffer</a> (TLB) flush. </p><p>Advantages and disadvantages of threads vs processes include: </p> <ul><li><i>Lower resource consumption</i> of threads: using threads, an application can operate using fewer resources than it would need when using multiple processes.</li> <li><i>Simplified sharing and communication</i> of threads: unlike processes, which require a <a href="/wiki/Message_passing" title="Message passing">message passing</a> or shared memory mechanism to perform <a href="/wiki/Inter-process_communication" title="Inter-process communication">inter-process communication</a> (IPC), threads can communicate through data, code and files they already share.</li> <li><i>Thread crashes a process</i>: 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.</li></ul> <div class="mw-heading mw-heading2"><h2 id="Scheduling">Scheduling</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=8" title="Edit section: Scheduling"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Preemptive_vs_cooperative_scheduling">Preemptive vs cooperative scheduling</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=9" title="Edit section: Preemptive vs cooperative scheduling"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Operating systems schedule threads either <a href="/wiki/Preemption_(computing)" title="Preemption (computing)">preemptively</a> or <a href="/wiki/Cooperative_multitasking" title="Cooperative multitasking">cooperatively</a>. <a href="/wiki/Operating_system#Single-_and_multi-user" title="Operating system"> Multi-user operating systems</a> generally favor <a href="/wiki/Preemptive_multithreading" class="mw-redirect" title="Preemptive multithreading">preemptive multithreading</a> for its finer-grained control over execution time via <a href="/wiki/Context_switch" title="Context switch">context switching</a>. However, preemptive scheduling may context-switch threads at moments unanticipated by programmers, thus causing <a href="/wiki/Lock_convoy" title="Lock convoy">lock convoy</a>, <a href="/wiki/Priority_inversion" title="Priority inversion">priority inversion</a>, or other side-effects. In contrast, <a href="/wiki/Cooperative_multithreading" class="mw-redirect" title="Cooperative multithreading">cooperative multithreading</a> relies on threads to relinquish control of execution, thus ensuring that threads <a href="/wiki/Run_to_completion_scheduling" class="mw-redirect" title="Run to completion scheduling">run to completion</a>. This can cause problems if a cooperatively multitasked thread <a href="/wiki/Blocking_(computing)" title="Blocking (computing)">blocks</a> by waiting on a <a href="/wiki/Resource_(computer_science)" class="mw-redirect" title="Resource (computer science)"> resource</a> or if it <a href="/wiki/Starvation_(computer_science)" title="Starvation (computer science)">starves</a> other threads by not yielding control of execution during intensive computation. </p> <div class="mw-heading mw-heading3"><h3 id="Single-_vs_multi-processor_systems">Single- vs multi-processor systems</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=10" title="Edit section: Single- vs multi-processor systems"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Until the early 2000s, most desktop computers had only one single-core CPU, with no support for <a href="/wiki/Hardware_thread" class="mw-redirect" title="Hardware thread">hardware threads</a>, although threads were still used on such computers because switching between threads was generally still quicker than full-process <a href="/wiki/Context_switch" title="Context switch">context switches</a>. In 2002, <a href="/wiki/Intel" title="Intel">Intel</a> added support for <a href="/wiki/Simultaneous_multithreading" title="Simultaneous multithreading">simultaneous multithreading</a> to the <a href="/wiki/Pentium_4" title="Pentium 4">Pentium&#160;4</a> processor, under the name <i><a href="/wiki/Hyper-threading" title="Hyper-threading">hyper-threading</a></i>; in 2005, they introduced the dual-core <a href="/wiki/Pentium_D" title="Pentium D">Pentium&#160;D</a> processor and <a href="/wiki/AMD" title="AMD">AMD</a> introduced the dual-core <a href="/wiki/Athlon_64_X2" title="Athlon 64 X2">Athlon&#160;64&#160;X2</a> processor. </p><p>Systems with a single processor generally implement multithreading by <a href="/wiki/Preemption_(computing)#Time_slice" title="Preemption (computing)">time slicing</a>: the <a href="/wiki/Central_processing_unit" title="Central processing unit">central processing unit</a> (CPU) switches between different <i>software threads</i>. This <a href="/wiki/Context_switch" title="Context switch">context switching</a> usually occurs frequently enough that users perceive the threads or tasks as running in parallel (for popular server/desktop operating systems, maximum time slice of a thread, when other threads are waiting, is often limited to 100–200ms). On a <a href="/wiki/Multiprocessor" class="mw-redirect" title="Multiprocessor">multiprocessor</a> or <a href="/wiki/Multi-core" class="mw-redirect" title="Multi-core">multi-core</a> system, multiple threads can execute in <a href="/wiki/Parallel_computing" title="Parallel computing">parallel</a>, with every processor or core executing a separate thread simultaneously; on a processor or core with <i><a href="/wiki/Hardware_thread" class="mw-redirect" title="Hardware thread">hardware threads</a></i>, separate software threads can also be executed concurrently by separate hardware threads. </p> <div class="mw-heading mw-heading3"><h3 id="Threading_models">Threading models</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=11" title="Edit section: Threading models"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading4"><h4 id="1:1_(kernel-level_threading)"><span id="1:1_.28kernel-level_threading.29"></span>1:1 (kernel-level threading)</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=12" title="Edit section: 1:1 (kernel-level threading)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Threads created by the user in a 1:1 correspondence with schedulable entities in the kernel<sup id="cite_ref-OSConcepts_9-0" class="reference"><a href="#cite_note-OSConcepts-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup> are the simplest possible threading implementation. <a href="/wiki/OS/2" title="OS/2">OS/2</a> and <a href="/wiki/Win32" class="mw-redirect" title="Win32">Win32</a> used this approach from the start, while on <a href="/wiki/Linux" title="Linux">Linux</a> the <a href="/wiki/GNU_C_Library" class="mw-redirect" title="GNU C Library">GNU C Library</a> implements this approach (via the <a href="/wiki/Native_POSIX_Thread_Library" title="Native POSIX Thread Library">NPTL</a> or older <a href="/wiki/LinuxThreads" title="LinuxThreads">LinuxThreads</a>). This approach is also used by <a href="/wiki/Solaris_(operating_system)" class="mw-redirect" title="Solaris (operating system)">Solaris</a>, <a href="/wiki/NetBSD" title="NetBSD">NetBSD</a>, <a href="/wiki/FreeBSD" title="FreeBSD">FreeBSD</a>, <a href="/wiki/MacOS" title="MacOS">macOS</a>, and <a href="/wiki/IOS" title="IOS">iOS</a>. </p> <div class="mw-heading mw-heading4"><h4 id="M:1_(user-level_threading)"><span id="M:1_.28user-level_threading.29"></span><i>M</i>:1 (user-level threading)</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=13" title="Edit section: M:1 (user-level threading)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>An <i>M</i>:1 model implies that all application-level threads map to one kernel-level scheduled entity;<sup id="cite_ref-OSConcepts_9-1" class="reference"><a href="#cite_note-OSConcepts-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup> the kernel has no knowledge of the application threads. With this approach, context switching can be done very quickly and, in addition, it can be implemented even on simple kernels which do not support threading. One of the major drawbacks, however, is that it cannot benefit from the hardware acceleration on <a href="/wiki/Multithreading_(computer_hardware)" class="mw-redirect" title="Multithreading (computer hardware)">multithreaded</a> processors or <a href="/wiki/Multiprocessing" title="Multiprocessing">multi-processor</a> computers: there is never more than one thread being scheduled at the same time.<sup id="cite_ref-OSConcepts_9-2" class="reference"><a href="#cite_note-OSConcepts-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup> For example: If one of the threads needs to execute an I/O request, the whole process is blocked and the threading advantage cannot be used. The <a href="/wiki/GNU_Portable_Threads" title="GNU Portable Threads">GNU Portable Threads</a> uses User-level threading, as does <a href="/wiki/State_Threads" title="State Threads">State Threads</a>. </p> <div class="mw-heading mw-heading4"><h4 id="M:N_(hybrid_threading)"><span id="M:N_.28hybrid_threading.29"></span><i>M</i>:<i>N</i> (hybrid threading)</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=14" title="Edit section: M:N (hybrid threading)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><i>M</i>:<i>N</i> maps some <var style="padding-right: 1px;">M</var> number of application threads onto some <var style="padding-right: 1px;">N</var> number of kernel entities,<sup id="cite_ref-OSConcepts_9-3" class="reference"><a href="#cite_note-OSConcepts-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup> or "virtual processors." This is a compromise between kernel-level ("1:1") and user-level ("<i>N</i>:1") threading. In general, "<i>M</i>:<i>N</i>" threading systems are more complex to implement than either kernel or user threads, because changes to both kernel and user-space code are required<sup class="noprint Inline-Template" style="margin-left:0.1em; white-space:nowrap;">&#91;<i><a href="/wiki/Wikipedia:Please_clarify" title="Wikipedia:Please clarify"><span title="no kernel modifications are needed (June 2020)">clarification needed</span></a></i>&#93;</sup>. In the M:N implementation, the threading library is responsible for scheduling user threads on the available schedulable entities; this makes context switching of threads very fast, as it avoids system calls. However, this increases complexity and the likelihood of <a href="/wiki/Priority_inversion" title="Priority inversion">priority inversion</a>, as well as suboptimal scheduling without extensive (and expensive) coordination between the userland scheduler and the kernel scheduler. </p> <div class="mw-heading mw-heading4"><h4 id="Hybrid_implementation_examples">Hybrid implementation examples</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=15" title="Edit section: Hybrid implementation examples"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Scheduler_activations" title="Scheduler activations">Scheduler activations</a> used by older versions of the NetBSD native POSIX threads library implementation (an <i>M</i>:<i>N</i> model as opposed to a 1:1 kernel or userspace implementation model)</li> <li><a href="/wiki/Light-weight_process" title="Light-weight process">Light-weight processes</a> used by older versions of the <a href="/wiki/Solaris_(operating_system)" class="mw-redirect" title="Solaris (operating system)">Solaris</a> operating system</li> <li>Marcel from the <a href="/wiki/PM2" title="PM2">PM2</a> project.</li> <li>The OS for the Tera-<a href="/wiki/Cray_MTA-2" title="Cray MTA-2">Cray MTA-2</a></li> <li>The <a href="/wiki/Glasgow_Haskell_Compiler" title="Glasgow Haskell Compiler">Glasgow Haskell Compiler</a> (GHC) for the language <a href="/wiki/Haskell_(programming_language)" class="mw-redirect" title="Haskell (programming language)">Haskell</a> uses lightweight threads which are scheduled on operating system threads.</li></ul> <div class="mw-heading mw-heading4"><h4 id="History_of_threading_models_in_Unix_systems">History of threading models in Unix systems</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=16" title="Edit section: History of threading models in Unix systems"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/SunOS" title="SunOS">SunOS</a> 4.x implemented <i><a href="/wiki/Light-weight_process" title="Light-weight process">light-weight processes</a></i> or LWPs. <a href="/wiki/NetBSD" title="NetBSD">NetBSD</a> 2.x+, and <a href="/wiki/DragonFly_BSD" title="DragonFly BSD">DragonFly BSD</a> implement LWPs as kernel threads (1:1 model). SunOS 5.2 through SunOS 5.8 as well as NetBSD 2 to NetBSD 4 implemented a two level model, multiplexing one or more user level threads on each kernel thread (M:N model). SunOS 5.9 and later, as well as NetBSD 5 eliminated user threads support, returning to a 1:1 model.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup> FreeBSD 5 implemented M:N model. FreeBSD 6 supported both 1:1 and M:N, users could choose which one should be used with a given program using /etc/libmap.conf. Starting with FreeBSD 7, the 1:1 became the default. FreeBSD 8 no longer supports the M:N model. </p> <div class="mw-heading mw-heading2"><h2 id="Single-threaded_vs_multithreaded_programs">Single-threaded vs multithreaded programs</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=17" title="Edit section: Single-threaded vs multithreaded programs"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In <a href="/wiki/Computer_programming" title="Computer programming">computer programming</a>, <i>single-threading</i> is the processing of one <a href="/wiki/Machine_code" title="Machine code">instruction</a> at a time.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> In the formal analysis of the variables' <a href="/wiki/Semantics_(computer_science)" title="Semantics (computer science)">semantics</a> and process state, the term <i>single threading</i> can be used differently to mean "backtracking within a single thread", which is common in the <a href="/wiki/Functional_programming" title="Functional programming">functional programming</a> community.<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> </p><p>Multithreading is mainly found in multitasking operating systems. Multithreading is a widespread programming and execution model that allows multiple threads to exist within the context of one process. These threads share the process's resources, but are able to execute independently. The threaded programming model provides developers with a useful abstraction of concurrent execution. Multithreading can also be applied to one process to enable <a href="/wiki/Parallel_computing" title="Parallel computing">parallel execution</a> on a <a href="/wiki/Multiprocessing" title="Multiprocessing">multiprocessing</a> system. </p><p>Multithreading libraries tend to provide a function call to create a new thread, which takes a function as a parameter. A concurrent thread is then created which starts running the passed function and ends when the function returns. The thread libraries also offer data synchronization functions. </p> <div class="mw-heading mw-heading3"><h3 id="Threads_and_data_synchronization">Threads and data synchronization</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=18" title="Edit section: Threads and data synchronization"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span class="anchor" id="Synchronization"></span> </p> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Thread_safety" title="Thread safety">Thread safety</a></div> <p>Threads in the same process share the same address space. This allows concurrently running code to <a href="/wiki/Coupling_(computer_science)" class="mw-redirect" title="Coupling (computer science)">couple</a> tightly and conveniently exchange data without the overhead or complexity of an <a href="/wiki/Inter-process_communication" title="Inter-process communication">IPC</a>. When shared between threads, however, even simple data structures become prone to <a href="/wiki/Race_condition#Computing" title="Race condition">race conditions</a> if they require more than one CPU instruction to update: two threads may end up attempting to update the data structure at the same time and find it unexpectedly changing underfoot. Bugs caused by race conditions can be very difficult to reproduce and isolate. </p><p>To prevent this, threading <a href="/wiki/Application_programming_interface" class="mw-redirect" title="Application programming interface">application programming interfaces</a> (APIs) offer <a href="/wiki/Synchronization_primitive" class="mw-redirect" title="Synchronization primitive">synchronization primitives</a> such as <a href="/wiki/Mutex" class="mw-redirect" title="Mutex">mutexes</a> to <a href="/wiki/Lock_(computer_science)" title="Lock (computer science)">lock</a> data structures against concurrent access. On uniprocessor systems, a thread running into a locked mutex must sleep and hence trigger a context switch. On multi-processor systems, the thread may instead poll the mutex in a <a href="/wiki/Spinlock" title="Spinlock">spinlock</a>. Both of these may sap performance and force processors in <a href="/wiki/Symmetric_multiprocessing" title="Symmetric multiprocessing">symmetric multiprocessing</a> (SMP) systems to contend for the memory bus, especially if the <a href="/wiki/Lock_(computer_science)#Granularity" title="Lock (computer science)">granularity</a> of the locking is too fine. </p><p>Other synchronization APIs include <a href="/wiki/Condition_variables" class="mw-redirect" title="Condition variables">condition variables</a>, <a href="/wiki/Critical_section" title="Critical section">critical sections</a>, <a href="/wiki/Semaphore_(programming)" title="Semaphore (programming)">semaphores</a>, and <a href="/wiki/Monitor_(synchronization)" title="Monitor (synchronization)">monitors</a>. </p> <div class="mw-heading mw-heading3"><h3 id="Thread_pools">Thread pools</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=19" title="Edit section: Thread pools"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236090951"><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="/wiki/Thread_pool_pattern" class="mw-redirect" title="Thread pool pattern">Thread pool pattern</a></div> <p>A popular programming pattern involving threads is that of <a href="/wiki/Thread_pool_pattern" class="mw-redirect" title="Thread pool pattern">thread pools</a> where a set number of threads are created at startup that then wait for a task to be assigned. When a new task arrives, it wakes up, completes the task and goes back to waiting. This avoids the relatively expensive thread creation and destruction functions for every task performed and takes thread management out of the application developer's hand and leaves it to a library or the operating system that is better suited to optimize thread management. </p> <div class="mw-heading mw-heading3"><h3 id="Multithreaded_programs_vs_single-threaded_programs_pros_and_cons">Multithreaded programs vs single-threaded programs pros and cons</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=20" title="Edit section: Multithreaded programs vs single-threaded programs pros and cons"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Multithreaded applications have the following advantages vs single-threaded ones: </p> <ul><li><i>Responsiveness</i>: multithreading can allow an application to remain responsive to input. In a one-thread program, if the main execution thread blocks on a long-running task, the entire application can appear to freeze. By moving such long-running tasks to a <i>worker thread</i> that runs concurrently with the main execution thread, it is possible for the application to remain responsive to user input while executing tasks in the background. On the other hand, in most cases multithreading is not the only way to keep a program responsive, with <a href="/wiki/Non-blocking_I/O" class="mw-redirect" title="Non-blocking I/O">non-blocking I/O</a> and/or <a href="/wiki/Unix_signals" class="mw-redirect" title="Unix signals">Unix signals</a> being available for obtaining similar results.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup></li> <li><i>Parallelization</i>: applications looking to use multicore or multi-CPU systems can use multithreading to split data and tasks into parallel subtasks and let the underlying architecture manage how the threads run, either concurrently on one core or in parallel on multiple cores. GPU computing environments like <a href="/wiki/CUDA" title="CUDA">CUDA</a> and <a href="/wiki/OpenCL" title="OpenCL">OpenCL</a> use the multithreading model where dozens to hundreds of threads run in <a href="/wiki/Data_parallelism" title="Data parallelism">parallel across data</a> on a <a href="/wiki/Manycore" class="mw-redirect" title="Manycore">large number of cores</a>. This, in turn, enables better system utilization, and (provided that synchronization costs don't eat the benefits up), can provide faster program execution.</li></ul> <p>Multithreaded applications have the following drawbacks: </p> <ul><li><i><a href="#Synchronization">Synchronization</a></i> complexity and related bugs: when using shared resources typical for threaded programs, the <a href="/wiki/Programmer" title="Programmer">programmer</a> must be careful to avoid <a href="/wiki/Race_condition#Computing" title="Race condition">race conditions</a> and other non-intuitive behaviors. In order for data to be correctly manipulated, threads will often need to <a href="/wiki/Rendezvous_problem" title="Rendezvous problem">rendezvous</a> in time in order to process the data in the correct order. Threads may also require <a href="/wiki/Mutual_exclusion" title="Mutual exclusion">mutually exclusive</a> operations (often implemented using <a href="/wiki/Lock_(computer_science)" title="Lock (computer science)">mutexes</a>) to prevent common data from being read or overwritten in one thread while being modified by another. Careless use of such primitives can lead to <a href="/wiki/Deadlock_(computer_science)" title="Deadlock (computer science)">deadlocks</a>, livelocks or <a href="/wiki/Race_condition" title="Race condition">races</a> over resources. As <a href="/wiki/Edward_A._Lee" title="Edward A. Lee">Edward A. Lee</a> has written: "Although threads seem to be a small step from sequential computation, in fact, they represent a huge step. They discard the most essential and appealing properties of sequential computation: understandability, predictability, and determinism. Threads, as a model of computation, are wildly non-deterministic, and the job of the programmer becomes one of pruning that nondeterminism."<sup id="cite_ref-Lee_14-0" class="reference"><a href="#cite_note-Lee-14"><span class="cite-bracket">&#91;</span>14<span class="cite-bracket">&#93;</span></a></sup></li> <li><i>Being untestable</i>. In general, multithreaded programs are non-deterministic, and as a result, are untestable. In other words, a multithreaded program can easily have bugs which never manifest on a test system, manifesting only in production.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">&#91;</span>15<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-Lee_14-1" class="reference"><a href="#cite_note-Lee-14"><span class="cite-bracket">&#91;</span>14<span class="cite-bracket">&#93;</span></a></sup> This can be alleviated by restricting inter-thread communications to certain well-defined patterns (such as message-passing).</li> <li><i>Synchronization costs</i>. As thread context switch on modern CPUs can cost up to 1 million CPU cycles,<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">&#91;</span>16<span class="cite-bracket">&#93;</span></a></sup> it makes writing efficient multithreading programs difficult. In particular, special attention has to be paid to avoid inter-thread synchronization from being too frequent.</li></ul> <div class="mw-heading mw-heading2"><h2 id="Programming_language_support">Programming language support</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=21" title="Edit section: Programming language support"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Many programming languages support threading in some capacity. </p> <ul><li>IBM <a href="/wiki/PL/I" title="PL/I">PL/I</a>(F) included support for multithreading (called <i>multitasking</i>) as early as in the late 1960s, and this was continued in the Optimizing Compiler and later versions. The IBM Enterprise PL/I compiler introduced a new model "thread" API. Neither version was part of the PL/I standard.</li> <li>Many implementations of <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a> and <a href="/wiki/C%2B%2B" title="C++">C++</a> support threading, and provide access to the native threading APIs of the operating system. A standardized interface for thread implementation is <a href="/wiki/POSIX_Threads" class="mw-redirect" title="POSIX Threads">POSIX Threads</a> (Pthreads), which is a set of C-function library calls. OS vendors are free to implement the interface as desired, but the application developer should be able to use the same interface across multiple platforms. Most <a href="/wiki/Unix" title="Unix">Unix</a> platforms, including Linux, support Pthreads. Microsoft Windows has its own set of thread functions in the <a href="/wiki/Process.h" title="Process.h">process.h</a> interface for multithreading, like <a href="/wiki/Beginthread" title="Beginthread">beginthread</a>.</li> <li>Some <a href="/wiki/High-level_programming_language" title="High-level programming language">higher level</a> (and usually <a href="/wiki/Cross-platform" class="mw-redirect" title="Cross-platform">cross-platform</a>) programming languages, such as <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a>, <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a>, and <a href="/wiki/.NET_Framework" title=".NET Framework">.NET Framework</a> languages, expose threading to developers while abstracting the platform specific differences in threading implementations in the runtime. Several other programming languages and language extensions also try to abstract the concept of concurrency and threading from the developer fully (<a href="/wiki/Cilk" title="Cilk">Cilk</a>, <a href="/wiki/OpenMP" title="OpenMP">OpenMP</a>, <a href="/wiki/Message_Passing_Interface" title="Message Passing Interface">Message Passing Interface</a> (MPI)). Some languages are designed for sequential parallelism instead (especially using GPUs), without requiring concurrency or threads (<a href="/wiki/Ateji_PX" title="Ateji PX">Ateji PX</a>, <a href="/wiki/CUDA" title="CUDA">CUDA</a>).</li> <li>A few interpreted programming languages have implementations (e.g., <a href="/wiki/Ruby_MRI" title="Ruby MRI">Ruby MRI</a> for Ruby, <a href="/wiki/CPython" title="CPython">CPython</a> for Python) which support threading and concurrency but not parallel execution of threads, due to a <a href="/wiki/Global_interpreter_lock" title="Global interpreter lock">global interpreter lock</a> (GIL). The GIL is a mutual exclusion lock held by the interpreter that can prevent the interpreter from simultaneously interpreting the application's code on two or more threads at once. This effectively limits the parallelism on multiple core systems. It also limits performance for processor-bound threads (which require the processor), but doesn't effect I/O-bound or network-bound ones as much. Other implementations of interpreted programming languages, such as <a href="/wiki/Tcl" title="Tcl">Tcl</a> using the Thread extension, avoid the GIL limit by using an Apartment model where data and code must be explicitly "shared" between threads. In Tcl each thread has one or more interpreters.</li> <li>In programming models such as <a href="/wiki/CUDA" title="CUDA">CUDA</a> designed for <a href="/wiki/Data_parallel_computation" class="mw-redirect" title="Data parallel computation">data parallel computation</a>, an array of threads run <a href="/wiki/Compute_kernel" title="Compute kernel">the same code</a> in parallel using only its ID to find its data in memory. In essence, the application must be designed so that each thread performs the same operation on different segments of memory so that they can operate in parallel and use the GPU architecture.</li> <li><a href="/wiki/Hardware_description_language" title="Hardware description language">Hardware description languages</a> such as <a href="/wiki/Verilog" title="Verilog">Verilog</a> have a different threading model that supports extremely large numbers of threads (for modeling hardware).</li></ul> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=22" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1266661725">.mw-parser-output .portalbox{padding:0;margin:0.5em 0;display:table;box-sizing:border-box;max-width:175px;list-style:none}.mw-parser-output .portalborder{border:1px solid var(--border-color-base,#a2a9b1);padding:0.1em;background:var(--background-color-neutral-subtle,#f8f9fa)}.mw-parser-output .portalbox-entry{display:table-row;font-size:85%;line-height:110%;height:1.9em;font-style:italic;font-weight:bold}.mw-parser-output .portalbox-image{display:table-cell;padding:0.2em;vertical-align:middle;text-align:center}.mw-parser-output .portalbox-link{display:table-cell;padding:0.2em 0.2em 0.2em 0.3em;vertical-align:middle}@media(min-width:720px){.mw-parser-output .portalleft{margin:0.5em 1em 0.5em 0}.mw-parser-output .portalright{clear:right;float:right;margin:0.5em 0 0.5em 1em}}</style><ul role="navigation" aria-label="Portals" class="noprint portalbox portalborder portalright"> <li class="portalbox-entry"><span class="portalbox-image"><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Octicons-terminal.svg" class="mw-file-description"><img alt="icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Octicons-terminal.svg/24px-Octicons-terminal.svg.png" decoding="async" width="24" height="28" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Octicons-terminal.svg/37px-Octicons-terminal.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Octicons-terminal.svg/49px-Octicons-terminal.svg.png 2x" data-file-width="896" data-file-height="1024" /></a></span></span><span class="portalbox-link"><a href="/wiki/Portal:Computer_programming" title="Portal:Computer programming">Computer programming portal</a></span></li></ul> <style data-mw-deduplicate="TemplateStyles:r1184024115">.mw-parser-output .div-col{margin-top:0.3em;column-width:30em}.mw-parser-output .div-col-small{font-size:90%}.mw-parser-output .div-col-rules{column-rule:1px solid #aaa}.mw-parser-output .div-col dl,.mw-parser-output .div-col ol,.mw-parser-output .div-col ul{margin-top:0}.mw-parser-output .div-col li,.mw-parser-output .div-col dd{page-break-inside:avoid;break-inside:avoid-column}</style><div class="div-col" style="column-width: 20em;"> <ul><li><a href="/wiki/Clone_(Linux_system_call)" class="mw-redirect" title="Clone (Linux system call)">Clone (Linux system call)</a></li> <li><a href="/wiki/Communicating_sequential_processes" title="Communicating sequential processes">Communicating sequential processes</a></li> <li><a href="/wiki/Computer_multitasking" title="Computer multitasking">Computer multitasking</a></li> <li><a href="/wiki/Multi-core_(computing)" class="mw-redirect" title="Multi-core (computing)">Multi-core (computing)</a></li> <li><a href="/wiki/Multithreading_(computer_hardware)" class="mw-redirect" title="Multithreading (computer hardware)">Multithreading (computer hardware)</a></li> <li><a href="/wiki/Non-blocking_algorithm" title="Non-blocking algorithm">Non-blocking algorithm</a></li> <li><a href="/wiki/Priority_inversion" title="Priority inversion">Priority inversion</a></li> <li><a href="/wiki/Protothreads" class="mw-redirect" title="Protothreads">Protothreads</a></li> <li><a href="/wiki/Simultaneous_multithreading" title="Simultaneous multithreading">Simultaneous multithreading</a></li> <li><a href="/wiki/Thread_pool_pattern" class="mw-redirect" title="Thread pool pattern">Thread pool pattern</a></li> <li><a href="/wiki/Thread_safety" title="Thread safety">Thread safety</a></li> <li><a href="/wiki/Win32_Thread_Information_Block" title="Win32 Thread Information Block">Win32 Thread Information Block</a></li></ul> </div> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=23" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap mw-references-columns"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite id="CITEREFLamport1979" class="citation journal cs1"><a href="/wiki/Leslie_Lamport" title="Leslie Lamport">Lamport, Leslie</a> (September 1979). <a rel="nofollow" class="external text" href="http://research.microsoft.com/en-us/um/people/lamport/pubs/multi.pdf">"How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs"</a> <span class="cs1-format">(PDF)</span>. <i>IEEE Transactions on Computers</i>. <b>C-28</b> (9): <span class="nowrap">690–</span>691. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2Ftc.1979.1675439">10.1109/tc.1979.1675439</a>. <a href="/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&#160;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:5679366">5679366</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=IEEE+Transactions+on+Computers&amp;rft.atitle=How+to+Make+a+Multiprocessor+Computer+That+Correctly+Executes+Multiprocess+Programs&amp;rft.volume=C-28&amp;rft.issue=9&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E690-%3C%2Fspan%3E691&amp;rft.date=1979-09&amp;rft_id=info%3Adoi%2F10.1109%2Ftc.1979.1675439&amp;rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A5679366%23id-name%3DS2CID&amp;rft.aulast=Lamport&amp;rft.aufirst=Leslie&amp;rft_id=http%3A%2F%2Fresearch.microsoft.com%2Fen-us%2Fum%2Fpeople%2Flamport%2Fpubs%2Fmulti.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-tanenbaum199200-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-tanenbaum199200_2-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFTanenbaum1992" class="citation book cs1"><a href="/wiki/Andrew_S._Tanenbaum" title="Andrew S. Tanenbaum">Tanenbaum, Andrew S.</a> (1992). <i>Modern Operating Systems</i>. Prentice-Hall International Editions. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-13-595752-4" title="Special:BookSources/0-13-595752-4"><bdi>0-13-595752-4</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Modern+Operating+Systems&amp;rft.pub=Prentice-Hall+International+Editions&amp;rft.date=1992&amp;rft.isbn=0-13-595752-4&amp;rft.aulast=Tanenbaum&amp;rft.aufirst=Andrew+S.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFSaltzer1966" class="citation thesis cs1"><a href="/wiki/Jerry_Saltzer" title="Jerry Saltzer">Saltzer, Jerome Howard</a> (July 1966). <a rel="nofollow" class="external text" href="http://web.mit.edu/Saltzer/www/publications/MIT-MAC-TR-030.ocr.pdf"><i>Traffic Control in a Multiplexed Computer System</i></a> <span class="cs1-format">(PDF)</span> (Doctor of Science thesis). p.&#160;20.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adissertation&amp;rft.title=Traffic+Control+in+a+Multiplexed+Computer+System&amp;rft.degree=Doctor+of+Science&amp;rft.date=1966-07&amp;rft.aulast=Saltzer&amp;rft.aufirst=Jerome+Howard&amp;rft_id=http%3A%2F%2Fweb.mit.edu%2FSaltzer%2Fwww%2Fpublications%2FMIT-MAC-TR-030.ocr.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFSutter2005" class="citation journal cs1"><a href="/wiki/Herb_Sutter" title="Herb Sutter">Sutter, Herb</a> (March 2005). <a rel="nofollow" class="external text" href="http://gotw.ca/publications/concurrency-ddj.htm">"The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software"</a>. <i><a href="/wiki/Dr._Dobb%27s_Journal" title="Dr. Dobb&#39;s Journal">Dr. Dobb's Journal</a></i>. <b>30</b> (3).</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Dr.+Dobb%27s+Journal&amp;rft.atitle=The+Free+Lunch+Is+Over%3A+A+Fundamental+Turn+Toward+Concurrency+in+Software&amp;rft.volume=30&amp;rft.issue=3&amp;rft.date=2005-03&amp;rft.aulast=Sutter&amp;rft.aufirst=Herb&amp;rft_id=http%3A%2F%2Fgotw.ca%2Fpublications%2Fconcurrency-ddj.htm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.erlang.org/doc/getting_started/conc_prog.html">"Erlang: 3.1 Processes"</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Erlang%3A+3.1+Processes&amp;rft_id=http%3A%2F%2Fwww.erlang.org%2Fdoc%2Fgetting_started%2Fconc_prog.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIgnatchenko" class="citation audio-visual cs1">Ignatchenko, Sergey. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20201125224240/https://www.youtube.com/watch?v=6lXUrvlMXNU&amp;gl=US&amp;hl=en"><i>Eight Ways to Handle Non-blocking Returns in Message-passing Programs: from C++98 via C++11 to C++20</i></a>. CPPCON. Archived from the original on 2020-11-25<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Eight+Ways+to+Handle+Non-blocking+Returns+in+Message-passing+Programs%3A+from+C%2B%2B98+via+C%2B%2B11+to+C%2B%2B20&amp;rft.pub=CPPCON&amp;rft.aulast=Ignatchenko&amp;rft.aufirst=Sergey&amp;rft_id=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6lXUrvlMXNU&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span><span class="cs1-maint citation-comment"><code class="cs1-code">{{<a href="/wiki/Template:Cite_AV_media" title="Template:Cite AV media">cite AV media</a>}}</code>: CS1 maint: bot: original URL status unknown (<a href="/wiki/Category:CS1_maint:_bot:_original_URL_status_unknown" title="Category:CS1 maint: bot: original URL status unknown">link</a>)</span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFFeratPereiraRousselCarribault2022" class="citation conference cs1">Ferat, Manuel; Pereira, Romain; Roussel, Adrien; Carribault, Patrick; Steffenel, Luiz-Angelo; Gautier, Thierry (September 2022). <a rel="nofollow" class="external text" href="https://hal-cea.archives-ouvertes.fr/cea-03749364/file/2022_iwomp_omp-target.pdf">"Enhancing MPI+OpenMP Task Based Applications for Heterogeneous Architectures with GPU support"</a> <span class="cs1-format">(PDF)</span>. <i>OpenMP in a Modern World: From Multi-device Support to Meta Programming</i>. IWOMP 2022: 18th International Workshop on OpenMP. Lecture Notes in Computer Science. Vol.&#160;13527. pp.&#160;<span class="nowrap">3–</span>16. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-3-031-15922-0_1">10.1007/978-3-031-15922-0_1</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-3-031-15921-3" title="Special:BookSources/978-3-031-15921-3"><bdi>978-3-031-15921-3</bdi></a>. <a href="/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&#160;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:251692327">251692327</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=conference&amp;rft.atitle=Enhancing+MPI%2BOpenMP+Task+Based+Applications+for+Heterogeneous+Architectures+with+GPU+support&amp;rft.btitle=OpenMP+in+a+Modern+World%3A+From+Multi-device+Support+to+Meta+Programming.&amp;rft.series=Lecture+Notes+in+Computer+Science&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E3-%3C%2Fspan%3E16&amp;rft.date=2022-09&amp;rft_id=https%3A%2F%2Fapi.semanticscholar.org%2FCorpusID%3A251692327%23id-name%3DS2CID&amp;rft_id=info%3Adoi%2F10.1007%2F978-3-031-15922-0_1&amp;rft.isbn=978-3-031-15921-3&amp;rft.aulast=Ferat&amp;rft.aufirst=Manuel&amp;rft.au=Pereira%2C+Romain&amp;rft.au=Roussel%2C+Adrien&amp;rft.au=Carribault%2C+Patrick&amp;rft.au=Steffenel%2C+Luiz-Angelo&amp;rft.au=Gautier%2C+Thierry&amp;rft_id=https%3A%2F%2Fhal-cea.archives-ouvertes.fr%2Fcea-03749364%2Ffile%2F2022_iwomp_omp-target.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIwasakiAmerTauraSeo" class="citation conference cs1">Iwasaki, Shintaro; Amer, Abdelhalim; Taura, Kenjiro; Seo, Sangmin; Balaji, Pavan. <a rel="nofollow" class="external text" href="https://www.mcs.anl.gov/~iwasaki/pdfs/papers/PACT2019_paper.pdf"><i>BOLT: Optimizing OpenMP Parallel Regions with User-Level Threads</i></a> <span class="cs1-format">(PDF)</span>. The 28th International Conference on Parallel Architectures and Compilation Techniques.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=conference&amp;rft.btitle=BOLT%3A+Optimizing+OpenMP+Parallel+Regions+with+User-Level+Threads&amp;rft.aulast=Iwasaki&amp;rft.aufirst=Shintaro&amp;rft.au=Amer%2C+Abdelhalim&amp;rft.au=Taura%2C+Kenjiro&amp;rft.au=Seo%2C+Sangmin&amp;rft.au=Balaji%2C+Pavan&amp;rft_id=https%3A%2F%2Fwww.mcs.anl.gov%2F~iwasaki%2Fpdfs%2Fpapers%2FPACT2019_paper.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-OSConcepts-9"><span class="mw-cite-backlink">^ <a href="#cite_ref-OSConcepts_9-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-OSConcepts_9-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-OSConcepts_9-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-OSConcepts_9-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFSilberschatzGalvinGagne2013" class="citation book cs1"><a href="/wiki/Abraham_Silberschatz" title="Abraham Silberschatz">Silberschatz, Abraham</a>; Galvin, Peter Baer; Gagne, Greg (2013). <i>Operating system concepts</i> (9th&#160;ed.). Hoboken, N.J.: Wiley. pp.&#160;<span class="nowrap">170–</span>171. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/9781118063330" title="Special:BookSources/9781118063330"><bdi>9781118063330</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Operating+system+concepts&amp;rft.place=Hoboken%2C+N.J.&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E170-%3C%2Fspan%3E171&amp;rft.edition=9th&amp;rft.pub=Wiley&amp;rft.date=2013&amp;rft.isbn=9781118063330&amp;rft.aulast=Silberschatz&amp;rft.aufirst=Abraham&amp;rft.au=Galvin%2C+Peter+Baer&amp;rft.au=Gagne%2C+Greg&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20090226174929/http://www.sun.com/software/whitepapers/solaris9/multithread.pdf">"Multithreading in the Solaris Operating Environment"</a> <span class="cs1-format">(PDF)</span>. 2002. Archived from <a rel="nofollow" class="external text" href="http://www.sun.com/software/whitepapers/solaris9/multithread.pdf">the original</a> <span class="cs1-format">(PDF)</span> on February 26, 2009.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Multithreading+in+the+Solaris+Operating+Environment&amp;rft.date=2002&amp;rft_id=http%3A%2F%2Fwww.sun.com%2Fsoftware%2Fwhitepapers%2Fsolaris9%2Fmultithread.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFMenéndezLowe2001" class="citation book cs1">Menéndez, Raúl; Lowe, Doug (2001). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=j1t1u_UniU0C&amp;q=%22single+threading%22"><i>Murach's CICS for the COBOL Programmer</i></a>. Mike Murach &amp; Associates. p.&#160;512. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-1-890774-09-7" title="Special:BookSources/978-1-890774-09-7"><bdi>978-1-890774-09-7</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Murach%27s+CICS+for+the+COBOL+Programmer&amp;rft.pages=512&amp;rft.pub=Mike+Murach+%26+Associates&amp;rft.date=2001&amp;rft.isbn=978-1-890774-09-7&amp;rft.aulast=Men%C3%A9ndez&amp;rft.aufirst=Ra%C3%BAl&amp;rft.au=Lowe%2C+Doug&amp;rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3Dj1t1u_UniU0C%26q%3D%2522single%2Bthreading%2522&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFO&#39;HearnTennent1997" class="citation book cs1">O'Hearn, Peter William; Tennent, R. D. (1997). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=btp58ihqgccC&amp;pg=PA157"><i>ALGOL-like languages</i></a>. Vol.&#160;2. <a href="/wiki/Birkh%C3%A4user_Verlag" class="mw-redirect" title="Birkhäuser Verlag">Birkhäuser Verlag</a>. p.&#160;157. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-8176-3937-2" title="Special:BookSources/978-0-8176-3937-2"><bdi>978-0-8176-3937-2</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=ALGOL-like+languages&amp;rft.pages=157&amp;rft.pub=Birkh%C3%A4user+Verlag&amp;rft.date=1997&amp;rft.isbn=978-0-8176-3937-2&amp;rft.aulast=O%27Hearn&amp;rft.aufirst=Peter+William&amp;rft.au=Tennent%2C+R.+D.&amp;rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3Dbtp58ihqgccC%26pg%3DPA157&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIgnatchenko2010" class="citation journal cs1">Ignatchenko, Sergey (August 2010). <a rel="nofollow" class="external text" href="http://accu.org/index.php/journals/1634">"Single-Threading: Back to the Future?"</a>. <i><a href="/wiki/Overload_(magazine)" title="Overload (magazine)">Overload</a></i> (97). <a href="/wiki/ACCU_(organisation)" title="ACCU (organisation)">ACCU</a>: <span class="nowrap">16–</span>19.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Overload&amp;rft.atitle=Single-Threading%3A+Back+to+the+Future%3F&amp;rft.issue=97&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E16-%3C%2Fspan%3E19&amp;rft.date=2010-08&amp;rft.aulast=Ignatchenko&amp;rft.aufirst=Sergey&amp;rft_id=http%3A%2F%2Faccu.org%2Findex.php%2Fjournals%2F1634&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-Lee-14"><span class="mw-cite-backlink">^ <a href="#cite_ref-Lee_14-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Lee_14-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFLee2006" class="citation web cs1">Lee, Edward (January 10, 2006). <a rel="nofollow" class="external text" href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.html">"The Problem with Threads"</a>. UC Berkeley.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=The+Problem+with+Threads&amp;rft.pub=UC+Berkeley&amp;rft.date=2006-01-10&amp;rft.aulast=Lee&amp;rft.aufirst=Edward&amp;rft_id=http%3A%2F%2Fwww.eecs.berkeley.edu%2FPubs%2FTechRpts%2F2006%2FEECS-2006-1.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIgnatchenko2015" class="citation journal cs1">Ignatchenko, Sergey (August 2015). <a rel="nofollow" class="external text" href="https://accu.org/journals/overload/23/128/ignatchenko_2134/">"Multi-threading at Business-logic Level is Considered Harmful"</a>. <i><a href="/wiki/Overload_(magazine)" title="Overload (magazine)">Overload</a></i> (128). <a href="/wiki/ACCU_(organisation)" title="ACCU (organisation)">ACCU</a>: <span class="nowrap">4–</span>7.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Overload&amp;rft.atitle=Multi-threading+at+Business-logic+Level+is+Considered+Harmful&amp;rft.issue=128&amp;rft.pages=%3Cspan+class%3D%22nowrap%22%3E4-%3C%2Fspan%3E7&amp;rft.date=2015-08&amp;rft.aulast=Ignatchenko&amp;rft.aufirst=Sergey&amp;rft_id=https%3A%2F%2Faccu.org%2Fjournals%2Foverload%2F23%2F128%2Fignatchenko_2134%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREF&#39;No_Bugs&#39;_Hare2016" class="citation web cs1">'No Bugs' Hare (12 September 2016). <a rel="nofollow" class="external text" href="http://ithare.com/infographics-operation-costs-in-cpu-clock-cycles/">"Operation Costs in CPU Clock Cycles"</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Operation+Costs+in+CPU+Clock+Cycles&amp;rft.date=2016-09-12&amp;rft.au=%27No+Bugs%27+Hare&amp;rft_id=http%3A%2F%2Fithare.com%2Finfographics-operation-costs-in-cpu-clock-cycles%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AThread+%28computing%29" class="Z3988"></span></span> </li> </ol></div></div> <style data-mw-deduplicate="TemplateStyles:r1239549316">.mw-parser-output .refbegin{margin-bottom:0.5em}.mw-parser-output .refbegin-hanging-indents>ul{margin-left:0}.mw-parser-output .refbegin-hanging-indents>ul>li{margin-left:0;padding-left:3.2em;text-indent:-3.2em}.mw-parser-output .refbegin-hanging-indents ul,.mw-parser-output .refbegin-hanging-indents ul li{list-style:none}@media(max-width:720px){.mw-parser-output .refbegin-hanging-indents>ul>li{padding-left:1.6em;text-indent:-1.6em}}.mw-parser-output .refbegin-columns{margin-top:0.3em}.mw-parser-output .refbegin-columns ul{margin-top:0}.mw-parser-output .refbegin-columns li{page-break-inside:avoid;break-inside:avoid-column}@media screen{.mw-parser-output .refbegin{font-size:90%}}</style><div class="refbegin refbegin-columns references-column-width" style="column-width: 30em"> </div> <div class="mw-heading mw-heading2"><h2 id="Further_reading">Further reading</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Thread_(computing)&amp;action=edit&amp;section=24" title="Edit section: Further reading"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1184024115"><div class="div-col" style="column-width: 30em;"> <ul><li>David R. Butenhof: <i>Programming with POSIX Threads</i>, Addison-Wesley, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-201-63392-2" title="Special:BookSources/0-201-63392-2">0-201-63392-2</a></li> <li>Bradford Nichols, Dick Buttlar, Jacqueline Proulx Farell: <i>Pthreads Programming</i>, O'Reilly &amp; Associates, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/1-56592-115-1" title="Special:BookSources/1-56592-115-1">1-56592-115-1</a></li> <li>Paul Hyde: <i>Java Thread Programming</i>, Sams, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-672-31585-8" title="Special:BookSources/0-672-31585-8">0-672-31585-8</a></li> <li>Jim Beveridge, Robert Wiener: <i>Multithreading Applications in Win32</i>, Addison-Wesley, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-201-44234-5" title="Special:BookSources/0-201-44234-5">0-201-44234-5</a></li> <li>Uresh Vahalia: <i>Unix Internals: the New Frontiers</i>, Prentice Hall, <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-13-101908-2" title="Special:BookSources/0-13-101908-2">0-13-101908-2</a></li></ul> </div> <style data-mw-deduplicate="TemplateStyles:r1235681985">.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}</style><style data-mw-deduplicate="TemplateStyles:r1237033735">@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}</style><div class="side-box side-box-right plainlinks sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}</style> <div class="side-box-flex"> <div class="side-box-image"><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Wikiversity_logo_2017.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Wikiversity_logo_2017.svg/40px-Wikiversity_logo_2017.svg.png" decoding="async" width="40" height="33" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Wikiversity_logo_2017.svg/60px-Wikiversity_logo_2017.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Wikiversity_logo_2017.svg/80px-Wikiversity_logo_2017.svg.png 2x" data-file-width="626" data-file-height="512" /></a></span></div> <div class="side-box-text plainlist">Wikiversity has learning resources about <i><b><a href="https://en.wikiversity.org/wiki/Processes_and_Threads" class="extiw" title="v:Processes and Threads">Processes and Threads</a></b></i> at <div style="margin-left: 10px;"><a href="https://en.wikiversity.org/wiki/Operating_Systems/Process_and_Thread" class="extiw" title="v:Operating Systems/Process and Thread">Operating Systems/Process and Thread</a></div></div></div> </div> <div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r1236075235">.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}</style></div><div role="navigation" class="navbox" aria-labelledby="Parallel_computing346" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><style data-mw-deduplicate="TemplateStyles:r1239400231">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Parallel_computing" title="Template:Parallel computing"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Parallel_computing" title="Template talk:Parallel computing"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Parallel_computing" title="Special:EditPage/Template:Parallel computing"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Parallel_computing346" style="font-size:114%;margin:0 4em"><a href="/wiki/Parallel_computing" title="Parallel computing">Parallel computing</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">General</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Distributed_computing" title="Distributed computing">Distributed computing</a></li> <li><a href="/wiki/Parallel_computing" title="Parallel computing">Parallel computing</a></li> <li><a href="/wiki/Massively_parallel" title="Massively parallel">Massively parallel</a></li> <li><a href="/wiki/Cloud_computing" title="Cloud computing">Cloud computing</a></li> <li><a href="/wiki/High-performance_computing" title="High-performance computing">High-performance computing</a></li> <li><a href="/wiki/Multiprocessing" title="Multiprocessing">Multiprocessing</a></li> <li><a href="/wiki/Manycore_processor" title="Manycore processor">Manycore processor</a></li> <li><a href="/wiki/General-purpose_computing_on_graphics_processing_units" title="General-purpose computing on graphics processing units">GPGPU</a></li> <li><a href="/wiki/Computer_network" title="Computer network">Computer network</a></li> <li><a href="/wiki/Systolic_array" title="Systolic array">Systolic array</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Levels</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Bit-level_parallelism" title="Bit-level parallelism">Bit</a></li> <li><a href="/wiki/Instruction-level_parallelism" title="Instruction-level parallelism">Instruction</a></li> <li><a href="/wiki/Task_parallelism" title="Task parallelism">Thread</a></li> <li><a href="/wiki/Task_parallelism" title="Task parallelism">Task</a></li> <li><a href="/wiki/Data_parallelism" title="Data parallelism">Data</a></li> <li><a href="/wiki/Memory-level_parallelism" title="Memory-level parallelism">Memory</a></li> <li><a href="/wiki/Loop-level_parallelism" title="Loop-level parallelism">Loop</a></li> <li><a href="/wiki/Pipeline_(computing)" title="Pipeline (computing)">Pipeline</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Multithreading_(computer_architecture)" title="Multithreading (computer architecture)">Multithreading</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Temporal_multithreading" title="Temporal multithreading">Temporal</a></li> <li><a href="/wiki/Simultaneous_multithreading" title="Simultaneous multithreading">Simultaneous</a> (SMT)</li> <li><a href="/wiki/Simultaneous_and_heterogeneous_multithreading" title="Simultaneous and heterogeneous multithreading">Simultaneous and heterogenous</a></li> <li><a href="/wiki/Speculative_multithreading" title="Speculative multithreading">Speculative</a> (SpMT)</li> <li><a href="/wiki/Preemption_(computing)" title="Preemption (computing)">Preemptive</a></li> <li><a href="/wiki/Computer_multitasking#Cooperative_multitasking" title="Computer multitasking">Cooperative</a></li> <li><a href="/wiki/Bulldozer_(microarchitecture)#Bulldozer_core" title="Bulldozer (microarchitecture)">Clustered multi-thread</a> (CMT)</li> <li><a href="/wiki/Hardware_scout" title="Hardware scout">Hardware scout</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Theory</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Parallel_RAM" title="Parallel RAM">PRAM model</a></li> <li><a href="/wiki/Parallel_external_memory" title="Parallel external memory">PEM model</a></li> <li><a href="/wiki/Analysis_of_parallel_algorithms" title="Analysis of parallel algorithms">Analysis of parallel algorithms</a></li> <li><a href="/wiki/Amdahl%27s_law" title="Amdahl&#39;s law">Amdahl's law</a></li> <li><a href="/wiki/Gustafson%27s_law" title="Gustafson&#39;s law">Gustafson's law</a></li> <li><a href="/wiki/Cost_efficiency" title="Cost efficiency">Cost efficiency</a></li> <li><a href="/wiki/Karp%E2%80%93Flatt_metric" title="Karp–Flatt metric">Karp–Flatt metric</a></li> <li><a href="/wiki/Parallel_slowdown" title="Parallel slowdown">Slowdown</a></li> <li><a href="/wiki/Speedup" title="Speedup">Speedup</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Elements</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Process_(computing)" title="Process (computing)">Process</a></li> <li><a class="mw-selflink selflink">Thread</a></li> <li><a href="/wiki/Fiber_(computer_science)" title="Fiber (computer science)">Fiber</a></li> <li><a href="/wiki/Instruction_window" title="Instruction window">Instruction window</a></li> <li><a href="/wiki/Array_(data_structure)" title="Array (data structure)">Array</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Coordination</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Multiprocessing" title="Multiprocessing">Multiprocessing</a></li> <li><a href="/wiki/Memory_coherence" title="Memory coherence">Memory coherence</a></li> <li><a href="/wiki/Cache_coherence" title="Cache coherence">Cache coherence</a></li> <li><a href="/wiki/Cache_invalidation" title="Cache invalidation">Cache invalidation</a></li> <li><a href="/wiki/Barrier_(computer_science)" title="Barrier (computer science)">Barrier</a></li> <li><a href="/wiki/Synchronization_(computer_science)" title="Synchronization (computer science)">Synchronization</a></li> <li><a href="/wiki/Application_checkpointing" title="Application checkpointing">Application checkpointing</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Computer_programming" title="Computer programming">Programming</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Stream_processing" title="Stream processing">Stream processing</a></li> <li><a href="/wiki/Dataflow_programming" title="Dataflow programming">Dataflow programming</a></li> <li><a href="/wiki/Parallel_programming_model" title="Parallel programming model">Models</a> <ul><li><a href="/wiki/Implicit_parallelism" title="Implicit parallelism">Implicit parallelism</a></li> <li><a href="/wiki/Explicit_parallelism" title="Explicit parallelism">Explicit parallelism</a></li> <li><a href="/wiki/Concurrency_(computer_science)" title="Concurrency (computer science)">Concurrency</a></li></ul></li> <li><a href="/wiki/Non-blocking_algorithm" title="Non-blocking algorithm">Non-blocking algorithm</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Computer_hardware" title="Computer hardware">Hardware</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Flynn%27s_taxonomy" title="Flynn&#39;s taxonomy">Flynn's taxonomy</a> <ul><li><a href="/wiki/Single_instruction,_single_data" title="Single instruction, single data">SISD</a></li> <li><a href="/wiki/Single_instruction,_multiple_data" title="Single instruction, multiple data">SIMD</a> <ul><li><a href="/wiki/Single_instruction,_multiple_threads" title="Single instruction, multiple threads">Array processing</a> (SIMT)</li> <li><a href="/wiki/Flynn%27s_taxonomy#Pipelined_processor" title="Flynn&#39;s taxonomy">Pipelined processing</a></li> <li><a href="/wiki/Flynn%27s_taxonomy#Associative_processor" title="Flynn&#39;s taxonomy">Associative processing</a></li></ul></li> <li><a href="/wiki/Multiple_instruction,_single_data" title="Multiple instruction, single data">MISD</a></li> <li><a href="/wiki/Multiple_instruction,_multiple_data" title="Multiple instruction, multiple data">MIMD</a></li></ul></li> <li><a href="/wiki/Dataflow_architecture" title="Dataflow architecture">Dataflow architecture</a></li> <li><a href="/wiki/Instruction_pipelining" title="Instruction pipelining">Pipelined processor</a></li> <li><a href="/wiki/Superscalar_processor" title="Superscalar processor">Superscalar processor</a></li> <li><a href="/wiki/Vector_processor" title="Vector processor">Vector processor</a></li> <li><a href="/wiki/Multiprocessing" title="Multiprocessing">Multiprocessor</a> <ul><li><a href="/wiki/Symmetric_multiprocessing" title="Symmetric multiprocessing">symmetric</a></li> <li><a href="/wiki/Asymmetric_multiprocessing" title="Asymmetric multiprocessing">asymmetric</a></li></ul></li> <li><a href="/wiki/Semiconductor_memory" title="Semiconductor memory">Memory</a> <ul><li><a href="/wiki/Shared_memory" title="Shared memory">shared</a></li> <li><a href="/wiki/Distributed_memory" title="Distributed memory">distributed</a></li> <li><a href="/wiki/Distributed_shared_memory" title="Distributed shared memory">distributed shared</a></li> <li><a href="/wiki/Uniform_memory_access" title="Uniform memory access">UMA</a></li> <li><a href="/wiki/Non-uniform_memory_access" title="Non-uniform memory access">NUMA</a></li> <li><a href="/wiki/Cache-only_memory_architecture" title="Cache-only memory architecture">COMA</a></li></ul></li> <li><a href="/wiki/Massively_parallel" title="Massively parallel">Massively parallel</a> computer</li> <li><a href="/wiki/Computer_cluster" title="Computer cluster">Computer cluster</a> <ul><li><a href="/wiki/Beowulf_cluster" title="Beowulf cluster">Beowulf cluster</a></li></ul></li> <li><a href="/wiki/Grid_computing" title="Grid computing">Grid computer</a></li> <li><a href="/wiki/Hardware_acceleration" title="Hardware acceleration">Hardware acceleration</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/API" title="API">APIs</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Ateji_PX" title="Ateji PX">Ateji PX</a></li> <li><a href="/wiki/Boost_(C%2B%2B_libraries)" title="Boost (C++ libraries)">Boost</a></li> <li><a href="/wiki/Chapel_(programming_language)" title="Chapel (programming language)">Chapel</a></li> <li><a href="/wiki/HPX" title="HPX">HPX</a></li> <li><a href="/wiki/Charm%2B%2B" title="Charm++">Charm++</a></li> <li><a href="/wiki/Cilk" title="Cilk">Cilk</a></li> <li><a href="/wiki/Coarray_Fortran" title="Coarray Fortran">Coarray Fortran</a></li> <li><a href="/wiki/CUDA" title="CUDA">CUDA</a></li> <li><a href="/wiki/Dryad_(programming)" title="Dryad (programming)">Dryad</a></li> <li><a href="/wiki/C%2B%2B_AMP" title="C++ AMP">C++ AMP</a></li> <li><a href="/wiki/Global_Arrays" title="Global Arrays">Global Arrays</a></li> <li><a href="/wiki/GPUOpen" title="GPUOpen">GPUOpen</a></li> <li><a href="/wiki/Message_Passing_Interface" title="Message Passing Interface">MPI</a></li> <li><a href="/wiki/OpenMP" title="OpenMP">OpenMP</a></li> <li><a href="/wiki/OpenCL" title="OpenCL">OpenCL</a></li> <li><a href="/wiki/OpenHMPP" title="OpenHMPP">OpenHMPP</a></li> <li><a href="/wiki/OpenACC" title="OpenACC">OpenACC</a></li> <li><a href="/wiki/Parallel_Extensions" title="Parallel Extensions">Parallel Extensions</a></li> <li><a href="/wiki/Parallel_Virtual_Machine" title="Parallel Virtual Machine">PVM</a></li> <li><a href="/wiki/Pthreads" title="Pthreads">pthreads</a></li> <li><a href="/wiki/RaftLib" title="RaftLib">RaftLib</a></li> <li><a href="/wiki/ROCm" title="ROCm">ROCm</a></li> <li><a href="/wiki/Unified_Parallel_C" title="Unified Parallel C">UPC</a></li> <li><a href="/wiki/Threading_Building_Blocks" title="Threading Building Blocks">TBB</a></li> <li><a href="/wiki/ZPL_(programming_language)" class="mw-redirect" title="ZPL (programming language)">ZPL</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Problems</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Automatic_parallelization" title="Automatic parallelization">Automatic parallelization</a></li> <li><a href="/wiki/Deadlock_(computer_science)" title="Deadlock (computer science)">Deadlock</a></li> <li><a href="/wiki/Deterministic_algorithm" title="Deterministic algorithm">Deterministic algorithm</a></li> <li><a href="/wiki/Embarrassingly_parallel" title="Embarrassingly parallel">Embarrassingly parallel</a></li> <li><a href="/wiki/Parallel_slowdown" title="Parallel slowdown">Parallel slowdown</a></li> <li><a href="/wiki/Race_condition" title="Race condition">Race condition</a></li> <li><a href="/wiki/Software_lockout" title="Software lockout">Software lockout</a></li> <li><a href="/wiki/Scalability" title="Scalability">Scalability</a></li> <li><a href="/wiki/Starvation_(computer_science)" title="Starvation (computer science)">Starvation</a></li></ul> </div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div> <ul><li><span class="noviewer" typeof="mw:File"><span title="Category"><img alt="" src="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/16px-Symbol_category_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/23px-Symbol_category_class.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/31px-Symbol_category_class.svg.png 2x" data-file-width="180" data-file-height="185" /></span></span>&#160;<a href="/wiki/Category:Parallel_computing" title="Category:Parallel computing">Category: Parallel computing</a></li></ul> </div></td></tr></tbody></table></div> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235"></div><div role="navigation" class="navbox" aria-labelledby="Operating_systems310" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239400231"><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Operating_systems" title="Template:Operating systems"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Operating_systems" title="Template talk:Operating systems"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Operating_systems" title="Special:EditPage/Template:Operating systems"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Operating_systems310" style="font-size:114%;margin:0 4em"><a href="/wiki/Operating_system" title="Operating system">Operating systems</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">General</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Comparison_of_operating_systems" title="Comparison of operating systems">Comparison</a></li> <li><a href="/wiki/Forensic_software_engineering" title="Forensic software engineering">Forensic engineering</a></li> <li><a href="/wiki/History_of_operating_systems" title="History of operating systems">History</a></li> <li><a href="/wiki/List_of_operating_systems" title="List of operating systems">List</a></li> <li><a href="/wiki/Timeline_of_operating_systems" title="Timeline of operating systems">Timeline</a></li> <li><a href="/wiki/Usage_share_of_operating_systems" title="Usage share of operating systems">Usage share</a></li> <li><a href="/wiki/Comparison_of_user_features_of_operating_systems" title="Comparison of user features of operating systems">User features comparison</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Variants</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Disk_operating_system" title="Disk operating system">Disk operating system</a></li> <li><a href="/wiki/Distributed_operating_system" title="Distributed operating system">Distributed operating system</a></li> <li><a href="/wiki/Embedded_operating_system" title="Embedded operating system">Embedded operating system</a></li> <li><a href="/wiki/Hobbyist_operating_system" title="Hobbyist operating system">Hobbyist operating system</a></li> <li><a href="/wiki/Just_enough_operating_system" title="Just enough operating system">Just enough operating system</a></li> <li><a href="/wiki/Mobile_operating_system" title="Mobile operating system">Mobile operating system</a></li> <li><a href="/wiki/Network_operating_system" title="Network operating system">Network operating system</a></li> <li><a href="/wiki/Object-oriented_operating_system" title="Object-oriented operating system">Object-oriented operating system</a></li> <li><a href="/wiki/Real-time_operating_system" title="Real-time operating system">Real-time operating system</a></li> <li><a href="/wiki/Supercomputer_operating_system" title="Supercomputer operating system">Supercomputer operating system</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Kernel_(operating_system)" title="Kernel (operating system)">Kernel</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:6em"><a href="/wiki/Computer_architecture" title="Computer architecture">Architectures</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Exokernel" title="Exokernel">Exokernel</a></li> <li><a href="/wiki/Hybrid_kernel" title="Hybrid kernel">Hybrid</a></li> <li><a href="/wiki/Microkernel" title="Microkernel">Microkernel</a></li> <li><a href="/wiki/Monolithic_kernel" title="Monolithic kernel">Monolithic</a></li> <li><a href="/wiki/Multikernel" title="Multikernel">Multikernel</a></li> <li><a href="/wiki/Vkernel" title="Vkernel">vkernel</a></li> <li><a href="/wiki/Rump_kernel" title="Rump kernel">Rump kernel</a></li> <li><a href="/wiki/Unikernel" title="Unikernel">Unikernel</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:6em">Components</th><td class="navbox-list-with-group navbox-list navbox-even" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Device_driver" title="Device driver">Device driver</a></li> <li><a href="/wiki/Loadable_kernel_module" title="Loadable kernel module">Loadable kernel module</a></li> <li><a href="/wiki/User_space_and_kernel_space" title="User space and kernel space">User space and kernel space</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Process_management_(computing)" title="Process management (computing)">Process management</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:6em">Concepts</th><td class="navbox-list-with-group navbox-list navbox-odd" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Computer_multitasking" title="Computer multitasking">Computer multitasking</a> (<a href="/wiki/Cooperative_multitasking" title="Cooperative multitasking">Cooperative</a>, <a href="/wiki/Preemption_(computing)" title="Preemption (computing)">Preemptive</a>)</li> <li><a href="/wiki/Context_switch" title="Context switch">Context switch</a></li> <li><a href="/wiki/Interrupt" title="Interrupt">Interrupt</a></li> <li><a href="/wiki/Inter-process_communication" title="Inter-process communication">IPC</a></li> <li><a href="/wiki/Process_(computing)" title="Process (computing)">Process</a></li> <li><a href="/wiki/Process_control_block" title="Process control block">Process control block</a></li> <li><a href="/wiki/Real-time_operating_system" title="Real-time operating system">Real-time</a></li> <li><a class="mw-selflink selflink">Thread</a></li> <li><a href="/wiki/Time-sharing" title="Time-sharing">Time-sharing</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:6em"><a href="/wiki/Scheduling_(computing)" title="Scheduling (computing)">Scheduling<br />algorithms</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Fixed-priority_pre-emptive_scheduling" title="Fixed-priority pre-emptive scheduling">Fixed-priority preemptive</a></li> <li><a href="/wiki/Multilevel_feedback_queue" title="Multilevel feedback queue">Multilevel feedback queue</a></li> <li><a href="/wiki/Round-robin_scheduling" title="Round-robin scheduling">Round-robin</a></li> <li><a href="/wiki/Shortest_job_next" title="Shortest job next">Shortest job next</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Memory_management_(operating_systems)" title="Memory management (operating systems)">Memory management</a>,<br /><a href="/wiki/System_resource" title="System resource">resource</a> protection</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Bus_error" title="Bus error">Bus error</a></li> <li><a href="/wiki/General_protection_fault" title="General protection fault">General protection fault</a></li> <li><a href="/wiki/Memory_paging" title="Memory paging">Memory paging</a></li> <li><a href="/wiki/Memory_protection" title="Memory protection">Memory protection</a></li> <li><a href="/wiki/Protection_ring" title="Protection ring">Protection ring</a></li> <li><a href="/wiki/Segmentation_fault" title="Segmentation fault">Segmentation fault</a></li> <li><a href="/wiki/Virtual_memory" title="Virtual memory">Virtual memory</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Non-volatile_memory" title="Non-volatile memory">Storage</a> access,<br /><a href="/wiki/File_system" title="File system">file systems</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Booting#BOOT-LOADER" title="Booting">Boot loader</a></li> <li><a href="/wiki/Defragmentation" title="Defragmentation">Defragmentation</a></li> <li><a href="/wiki/Device_file" title="Device file">Device file</a></li> <li><a href="/wiki/File_attribute" title="File attribute">File attribute</a></li> <li><a href="/wiki/Inode" title="Inode">Inode</a></li> <li><a href="/wiki/Journaling_file_system" title="Journaling file system">Journal</a></li> <li><a href="/wiki/Disk_partitioning" title="Disk partitioning">Partition</a></li> <li><a href="/wiki/Virtual_file_system" title="Virtual file system">Virtual file system</a></li> <li><a href="/wiki/Virtual_tape_library" title="Virtual tape library">Virtual tape library</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Supporting concepts</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/API" title="API">API</a></li> <li><a href="/wiki/Computer_network" title="Computer network">Computer network</a></li> <li><a href="/wiki/Hardware_abstraction" title="Hardware abstraction">HAL</a></li> <li><a href="/wiki/Live_CD" title="Live CD">Live CD</a></li> <li><a href="/wiki/Live_USB" title="Live USB">Live USB</a></li> <li><a href="/wiki/Shell_(computing)" title="Shell (computing)">Shell</a> <ul><li><a href="/wiki/Command-line_interface" title="Command-line interface">CLI</a></li> <li><a href="/wiki/User_interface" title="User interface">User interface</a></li></ul></li> <li><a href="/wiki/Preboot_Execution_Environment" title="Preboot Execution Environment">PXE</a></li></ul> </div></td></tr></tbody></table></div> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235"></div><div role="navigation" class="navbox authority-control" aria-label="Navbox757" style="padding:3px"><table class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Help:Authority_control" title="Help:Authority control">Authority control databases</a>: National <span class="mw-valign-text-top noprint" typeof="mw:File/Frameless"><a href="https://www.wikidata.org/wiki/Q213092#identifiers" title="Edit this at Wikidata"><img alt="Edit this at Wikidata" src="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/10px-OOjs_UI_icon_edit-ltr-progressive.svg.png" decoding="async" width="10" height="10" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/15px-OOjs_UI_icon_edit-ltr-progressive.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/8/8a/OOjs_UI_icon_edit-ltr-progressive.svg/20px-OOjs_UI_icon_edit-ltr-progressive.svg.png 2x" data-file-width="20" data-file-height="20" /></a></span></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://d-nb.info/gnd/4377482-9">Germany</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://id.loc.gov/authorities/sh97002264">United States</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://catalogue.bnf.fr/ark:/12148/cb133204714">France</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://data.bnf.fr/ark:/12148/cb133204714">BnF data</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://www.nli.org.il/en/authorities/987007556438305171">Israel</a></span></li></ul></div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐7878cd4448‐rwsxb Cached time: 20250211202113 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.715 seconds Real time usage: 0.901 seconds Preprocessor visited node count: 3377/1000000 Post‐expand include size: 92945/2097152 bytes Template argument size: 3338/2097152 bytes Highest expansion depth: 17/100 Expensive parser function count: 12/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 98488/5000000 bytes Lua time usage: 0.439/10.000 seconds Lua memory usage: 7161218/52428800 bytes Number of Wikibase entities loaded: 1/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 767.780 1 -total 27.27% 209.408 1 Template:Reflist 18.13% 139.233 4 Template:Navbox 17.18% 131.925 1 Template:Parallel_computing 13.45% 103.247 4 Template:Cite_journal 9.81% 75.351 1 Template:About 7.99% 61.332 1 Template:Page_needed 7.17% 55.085 1 Template:Fix 6.84% 52.521 1 Template:Expand_section 6.27% 48.117 1 Template:Ambox --> <!-- Saved in parser cache with key enwiki:pcache:45303:|#|:idhash:canonical and timestamp 20250211202113 and revision id 1264827543. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?useformat=desktop&amp;type=1x1&amp;usesul3=0" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Thread_(computing)&amp;oldid=1264827543">https://en.wikipedia.org/w/index.php?title=Thread_(computing)&amp;oldid=1264827543</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:Concurrent_computing" title="Category:Concurrent computing">Concurrent computing</a></li><li><a href="/wiki/Category:Threads_(computing)" title="Category:Threads (computing)">Threads (computing)</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:CS1_maint:_bot:_original_URL_status_unknown" title="Category:CS1 maint: bot: original URL status unknown">CS1 maint: bot: original URL status unknown</a></li><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_matches_Wikidata" title="Category:Short description matches Wikidata">Short description matches Wikidata</a></li><li><a href="/wiki/Category:Wikipedia_articles_needing_page_number_citations_from_December_2022" title="Category:Wikipedia articles needing page number citations from December 2022">Wikipedia articles needing page number citations from December 2022</a></li><li><a href="/wiki/Category:Articles_to_be_expanded_from_February_2021" title="Category:Articles to be expanded from February 2021">Articles to be expanded from February 2021</a></li><li><a href="/wiki/Category:All_articles_to_be_expanded" title="Category:All articles to be expanded">All articles to be expanded</a></li><li><a href="/wiki/Category:Wikipedia_articles_needing_clarification_from_June_2020" title="Category:Wikipedia articles needing clarification from June 2020">Wikipedia articles needing clarification from June 2020</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 23 December 2024, at 19:07<span class="anonymous-show">&#160;(UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Thread_(computing)&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" lang="en" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-header-container vector-sticky-header-container"> <div id="vector-sticky-header" class="vector-sticky-header"> <div class="vector-sticky-header-start"> <div class="vector-sticky-header-icon-start vector-button-flush-left vector-button-flush-right" aria-hidden="true"> <button class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-sticky-header-search-toggle" tabindex="-1" data-event-name="ui.vector-sticky-search-form.icon"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </button> </div> <div role="search" class="vector-search-box-vue vector-search-box-show-thumbnail vector-search-box"> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail"> <form action="/w/index.php" id="vector-sticky-search-form" class="cdx-search-input cdx-search-input--has-end-button"> <div class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia"> <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <div class="vector-sticky-header-context-bar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-sticky-header-toc" class="vector-dropdown mw-portlet mw-portlet-sticky-header-toc vector-sticky-header-toc vector-button-flush-left" > <input type="checkbox" id="vector-sticky-header-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-sticky-header-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-sticky-header-toc-label" for="vector-sticky-header-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-sticky-header-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div class="vector-sticky-header-context-bar-primary" aria-hidden="true" ><span class="mw-page-title-main">Thread (computing)</span></div> </div> </div> <div class="vector-sticky-header-end" aria-hidden="true"> <div class="vector-sticky-header-icons"> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-talk-sticky-header" tabindex="-1" data-event-name="talk-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbles mw-ui-icon-wikimedia-speechBubbles"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-subject-sticky-header" tabindex="-1" data-event-name="subject-sticky-header"><span class="vector-icon mw-ui-icon-article mw-ui-icon-wikimedia-article"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-history-sticky-header" tabindex="-1" data-event-name="history-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-history mw-ui-icon-wikimedia-wikimedia-history"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only mw-watchlink" id="ca-watchstar-sticky-header" tabindex="-1" data-event-name="watch-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-star mw-ui-icon-wikimedia-wikimedia-star"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-edit-sticky-header" tabindex="-1" data-event-name="wikitext-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-wikiText mw-ui-icon-wikimedia-wikimedia-wikiText"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-ve-edit-sticky-header" tabindex="-1" data-event-name="ve-edit-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-edit mw-ui-icon-wikimedia-wikimedia-edit"></span> <span></span> </a> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only" id="ca-viewsource-sticky-header" tabindex="-1" data-event-name="ve-edit-protected-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-editLock mw-ui-icon-wikimedia-wikimedia-editLock"></span> <span></span> </a> </div> <div class="vector-sticky-header-buttons"> <button class="cdx-button cdx-button--weight-quiet mw-interlanguage-selector" id="p-lang-btn-sticky-header" tabindex="-1" data-event-name="ui.dropdown-p-lang-btn-sticky-header"><span class="vector-icon mw-ui-icon-wikimedia-language mw-ui-icon-wikimedia-wikimedia-language"></span> <span>38 languages</span> </button> <a href="#" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive" id="ca-addsection-sticky-header" tabindex="-1" data-event-name="addsection-sticky-header"><span class="vector-icon mw-ui-icon-speechBubbleAdd-progressive mw-ui-icon-wikimedia-speechBubbleAdd-progressive"></span> <span>Add topic</span> </a> </div> <div class="vector-sticky-header-icon-end"> <div class="vector-user-links"> </div> </div> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-7b9b8ffd89-hfmtb","wgBackendResponseTime":141,"wgPageParseReport":{"limitreport":{"cputime":"0.715","walltime":"0.901","ppvisitednodes":{"value":3377,"limit":1000000},"postexpandincludesize":{"value":92945,"limit":2097152},"templateargumentsize":{"value":3338,"limit":2097152},"expansiondepth":{"value":17,"limit":100},"expensivefunctioncount":{"value":12,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":98488,"limit":5000000},"entityaccesscount":{"value":1,"limit":400},"timingprofile":["100.00% 767.780 1 -total"," 27.27% 209.408 1 Template:Reflist"," 18.13% 139.233 4 Template:Navbox"," 17.18% 131.925 1 Template:Parallel_computing"," 13.45% 103.247 4 Template:Cite_journal"," 9.81% 75.351 1 Template:About"," 7.99% 61.332 1 Template:Page_needed"," 7.17% 55.085 1 Template:Fix"," 6.84% 52.521 1 Template:Expand_section"," 6.27% 48.117 1 Template:Ambox"]},"scribunto":{"limitreport-timeusage":{"value":"0.439","limit":"10.000"},"limitreport-memusage":{"value":7161218,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-7878cd4448-rwsxb","timestamp":"20250211202113","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Thread (computing)","url":"https:\/\/en.wikipedia.org\/wiki\/Thread_(computing)","sameAs":"http:\/\/www.wikidata.org\/entity\/Q213092","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q213092","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2002-03-21T12:34:06Z","dateModified":"2024-12-23T19:07:59Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/a\/a5\/Multithreaded_process.svg","headline":"smallest sequence of programmed instructions that can be managed independently by a scheduler"}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10