Hyper-threading accelerates Linux operating systems (I)

Source: Internet
Author: User
Hyper-threading accelerates the Linux operating system (I)-Linux general technology-Linux programming and kernel information. The following is a detailed description. Introduction

Intel's hyper-threading technology allows a physical processor to contain two logical processors by replicating, partitioning, and sharing resources in the Intel NetBurst microarchitecture pipeline.

The copied resource creates a resource copy for two threads:

All architecture statuses of each CPU

Command pointer, rename Logic

Some small resources (such as the returned stack estimator and ITLB)

Partitioned resources are divided into resources between execution threads:

Several buffers (Re-Order buffer, Load/Store buffer, queue, etc)

Shared resources are used between two threads that are being executed as needed:

Disordered execution engine

High-speed cache

Generally, each physical processor has an architecture state at the core of a processor to provide services for threads. With HT, each physical processor has two architecture states on a single core, which makes the physical processor look like two logical processors are providing services for the thread. The system BIOS lists the status of each architecture in a physical processor. Because operating systems that support hyper-threading use a logical processor, these operating systems have twice the resources available to provide services for threads.

Hyper-threading support in Xeon Processors

Among general purpose processors, Xeon processors are the first to implement synchronous multithreading (SMT) (see references for more information on the Xeon processor series ). To achieve the goal of executing two threads on a single physical processor, the processor maintains the context of multiple threads at the same time, which allows the scheduler to concurrently allocate two potentially unrelated threads.

The operating system (OS) Schedules and assigns multiple thread codes to each logic processor, just as in the SMP system. When no thread is dispatched, the related logic processor remains idle.

When a thread is scheduled and assigned to the logic processor LP0, hyper-Threading Technology uses the necessary processor resources to execute this thread.

When the second thread is scheduled and assigned to the Second logical processor LP1, resources are copied, divided, or shared as needed to execute the thread. Each processor selects at each point in the pipeline to control and process these threads. When each thread completes, the operating system sets unused processors to idle, releasing resources for running processors.

The OS schedules and distributes threads to each logic processor, as it does in a dual-processor or multi-processor system. When the System Scheduling thread is introduced into the pipeline, the resources are used as needed to process the two threads.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.