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

  • Windows 10 (Windows Ten)

    - Windows 10 is the version of Microsoft's flagship operating system that follows Windows 8. Microsoft chose to skip Windows 9 as a way of suggesting discontinuity with earlier versions rather than i... (WhatIs.com)

  • Sysprep (System Preparation Tool)

    - Sysprep is Microsoft's System Preparation tool intended to duplicate, test and deliver new installations for the Windows operating system based on an established installation. (SearchEnterpriseDesktop.com)

  • virtual machine

    - A virtual machine (VM) shares physical hardware resources with other users but isolates the operating system or application to avoid changing the end-user experience. (SearchServerVirtualization.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.