Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security
updates, and technical support.

[ Download Microsoft Edge ](https://go.microsoft.com/fwlink/p/?LinkID=2092881
) [ More info about Internet Explorer and Microsoft Edge
](https://learn.microsoft.com/en-us/lifecycle/faq/internet-explorer-microsoft-
edge)

Table of contents  Exit focus mode

Read in English  Save  [
](https://github.com/MicrosoftDocs/win32/blob/docs/desktop-
src/ProcThread/multitasking.md "Edit This Document")

Table of contents  Read in English  Save  Add to Plan  [ Edit
](https://github.com/MicrosoftDocs/win32/blob/docs/desktop-
src/ProcThread/multitasking.md "Edit This Document") Print

Twitter  LinkedIn  Facebook  Email

Table of contents

#  Multitasking

  * Article 
  * 01/07/2021 
  * 3 contributors 

Feedback

##  In this article

A multitasking operating system divides the available processor time among the
processes or threads that need it. The system is designed for preemptive
multitasking; it allocates a processor _time slice_ to each thread it
executes. The currently executing thread is suspended when its time slice
elapses, allowing another thread to run. When the system switches from one
thread to another, it saves the context of the preempted thread and restores
the saved context of the next thread in the queue.

The length of the time slice depends on the operating system and the
processor. Because each time slice is small (approximately 20 milliseconds),
multiple threads appear to be executing at the same time. This is actually the
case on multiprocessor systems, where the executable threads are distributed
among the available processors. However, you must use caution when using
multiple threads in an application, because system performance can decrease if
there are too many threads.

For more information, see the following topics:

  * [ Advantages of Multitasking ](advantages-of-multitasking)
  * [ When to Use Multitasking ](when-to-use-multitasking)
  * [ Multitasking Considerations ](multitasking-considerations)

Â

Â

* * *

##  Feedback

Was this page helpful?

Yes  No

[ Provide product feedback  ](https://www.microsoft.com/en-us/windowsinsider/feedbackhub/fb) | 

[ Get help at Microsoft Q&A
](https://learn.microsoft.com/answers/tags/224/windows-api-win32/)

##  Feedback

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the
feedback mechanism for content and replacing it with a new feedback system.
For more information see: [ https://aka.ms/ContentUserFeedback
](https://aka.ms/ContentUserFeedback) .

Submit and view feedback for

[ This product  ](https://www.microsoft.com/en-
us/windowsinsider/feedbackhub/fb) This page

[ View all page feedback  ](https://github.com//issues)

* * *

##  Additional resources

[ California Consumer Privacy Act (CCPA) Opt-Out Icon  Your Privacy Choices
](https://aka.ms/yourcaliforniaprivacychoices)

Theme

  * Light 
  * Dark 
  * High contrast 

  *   * [ Previous Versions ](/en-us/previous-versions/)
  * [ Blog ](https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog)
  * [ Contribute ](/en-us/contribute/)
  * [ Privacy ](https://go.microsoft.com/fwlink/?LinkId=521839)
  * [ Terms of Use ](/en-us/legal/termsofuse)
  * [ Trademarks ](https://www.microsoft.com/legal/intellectualproperty/Trademarks/)
  * © Microsoft 2024 

##  Additional resources

###  In this article

[ California Consumer Privacy Act (CCPA) Opt-Out Icon  Your Privacy Choices
](https://aka.ms/yourcaliforniaprivacychoices)

Theme

  * Light 
  * Dark 
  * High contrast 

  *   * [ Previous Versions ](/en-us/previous-versions/)
  * [ Blog ](https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog)
  * [ Contribute ](/en-us/contribute/)
  * [ Privacy ](https://go.microsoft.com/fwlink/?LinkId=521839)
  * [ Terms of Use ](/en-us/legal/termsofuse)
  * [ Trademarks ](https://www.microso