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

  • TailsOS

    - TailsOS is a LiveDistro-based operating system that is configured to run from removable storage and to leave no information stored on the computer after the user’s session. A LiveDistro is a distr... (WhatIs.com)

  • operating system (OS)

    - What is an operating system? An operating system (sometimes abbreviated as "OS") is the program that, after being initially loaded into the computer by a boot program, manages all the other program... (WhatIs.com)

  • Firefox OS

    - Firefox OS is a Linux-based mobile operating system designed for smartphones, tablets and smart TVs. The OS was developed by the open source community of the Mozilla Foundation, best known 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.