What is lightweight, middleweight, and heavyweight threads? - Definition from WhatIs.com


lightweight, middleweight, and heavyweight threads

Part of the Operating systems glossary:

In computer programming, a thread is an instance of a sequence of code that is operating as a unit, typically on behalf of a single user, transaction, or message. Threads are sometimes described in terms of their weight, meaning how much contextual information must be saved for a given thread so that it can be referred to by the system during the life of the thread.

For example, the context of a UNIX process includes the hardware register , the kernel stack , user-level stack, and so on. The time required to switch that much context, in thousands of microseconds, is considered large, so a UNIX process is said to be a heavyweight thread.

In some modern operating system kernels, such as Mach , multiple threads can exist in a single address space , which decreases the amount of context that must be saved with each one, and reduces the switching time to hundreds of microseconds. These kernel-level threads are considered to be middleweight threads.

When all context and thread operations are exposed at the user level, each application needs only the minimal amount of context saved with it, so that context switching can be reduced to tens of microseconds. Therefore, user-level threads are considered lightweight threads.

This was last updated in September 2005
Posted by: Margaret Rouse

Related Terms


  • Get Windows 10 app

    - Get Windows 10 is an application that confirms if a computer is qualified to upgrade to Windows 10 for free and provides information on some of the key features in Microsoft's newest operating system. (SearchEnterpriseDesktop.com)

  • hardware virtualization

    - Hardware virtualization is the abstraction of computing resources from the software that uses those resources. Today, hardware virtualization is often called server virtualization or, simply, virtu... (SearchVMware.com)

  • wearables OS (wearables operating system)

    - A wearable OS is an operating system designed or refactored to satisfy the requirements of wearable computers, which can be significantly from one type of device to another and also different from ... (WhatIs.com)


  • Operating systems

    - Terms related to operating systems, including definitions about open source and proprietary operating systems and words and phrases about system programs, boot mechanisms, kernels, command interpre...

  • Internet applications

    - This WhatIs.com glossary contains terms related to Internet applications, including definitions about Software as a Service (SaaS) delivery models and words and phrases about web sites, e-commerce ...

Ask a Question About lightweight, middleweight, and heavyweight threadsPowered by ITKnowledgeExchange.com

Get answers from your peers on your most technical challenges

Tech TalkComment



    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.