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 Recovery Environment (Windows RE)

    - The Microsoft Windows Recovery Environment, or Windows RE, is a simplified, scaled-back version of the Windows operating system that is used to boot the system when Windows 8.x, Windows Server 2012... (SearchEnterpriseDesktop.com)

  • BIOS (basic input/output system)

    - BIOS (basic input/output system) is the program a personal computer's microprocessor uses to get the computer system started after you turn it on. It also manages data flow between the computer's o... (WhatIs.com)

  • 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)

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.