Definition

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

Definitions

  • Microsoft Windows 8.1

    - Microsoft Windows 8.1 is a PC and tablet operating system released in October 2013. (SearchConsumerization.com)

  • Windows 95

    - Windows 95 was the 5th version of Microsoft’s GUI operating system, released in 1995. A huge sales success, Windows 95 was Microsoft’s breakthrough system. It introduced huge numbers of people arou... (WhatIs.com)

  • Windows 3.1

    - Windows 3.1 was the 4th version of Microsoft’s GUI-based operating system, released in 1993. 3.1 was a paid sub-release -- Windows 3.0 had been so popular that Microsoft decided to charge for the ... (WhatIs.com)

Glossaries

  • 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

Share
Comments

    Results

    Contribute to the conversation

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