Shared TLB Management for SMP Thread Contexts

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing multithreaded microprocessors face challenges in allowing lightweight thread contexts to appear as physical CPUs to multiprocessor operating systems, limiting scalability and efficiency in resource management.

Innovation Solution

A multithreading microprocessor system with a shared translation lookaside buffer and instruction scheduler, where a thread updates the TLB while disabling interrupts and instruction scheduling to prevent unscheduling, allowing each thread context to function as a physical CPU for operating system resource management.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If lightweight thread contexts are used instead of full CPU contexts, then device complexity and resource consumption are reduced, but the ability to appear as physical CPUs to multiprocessor operating systems is lost

Engineering Contradiction:
Improvethread context complexityVSAvoidcompatibility with SMP operating systems
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The patent creates virtual CPU contexts that copy the essential interface of physical CPUs, allowing lightweight thread contexts to be presented as full CPU contexts to SMP operating systems. Each thread context is copied and emulated to provide the same interface as a physical CPU, enabling compatibility without the overhead of full physical CPU implementation.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The multithreaded processor is designed to serve multiple functions: it can operate as traditional multithreaded execution and simultaneously present itself as a symmetric multiprocessor system to operating systems. The same hardware structure supports both lightweight thread execution and full SMP compatibility through virtualization.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Reliability

If interrupts are disabled during TLB updates to prevent unscheduling, then reliability of TLB updates is improved, but productivity and response time deteriorate

Engineering Contradiction:
ImproveTLB update reliabilityVSAvoidsystem throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary actions by disabling interrupts and blocking thread migration before initiating TLB updates. This ensures the critical section is protected from race conditions and unscheduling events. After the TLB update completes, interrupts are re-enabled and the thread is unblocked, restoring normal system operation.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If numerous lightweight thread contexts are supported, then scalability is improved, but difficulty of managing thread contexts increases

Engineering Contradiction:
ImprovescalabilityVSAvoidthread context management complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent introduces a virtualization layer that acts as an intermediary between the multithreaded processor and SMP operating systems. This layer manages the thread contexts, handling the complexity of context switching, TLB management, and CPU affinity tracking, while presenting a simplified interface to both the hardware and operating system.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Device complexity

If thread contexts share TLB resources, then device complexity is reduced, but measurement precision of thread-specific address translations deteriorates

Engineering Contradiction:
Improvememory management complexityVSAvoidaddress translation accuracy
Core Design Contradiction:
Device complexityVSMeasurement precision

Solution Approach 1:

The shared TLB is segmented into multiple associative arrays, with each array dedicated to a specific thread context. This segmentation allows the TLB to maintain thread-specific address translations while sharing the overall TLB structure. Each thread has its own entry array within the shared TLB, ensuring isolation and precision of address translations.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS7870553B2Symmetric multiprocessor operating system for execution on non-independent lightweight thread contexts
Publication Date: 2011.01.11 MIPS TECH INC
  • US7870553B2 patent drawing
  • US7870553B2 patent drawing
  • US7870553B2 patent drawing

AI summary

A multiprocessing system is disclosed. The system includes a multithreading microprocessor having a plurality of thread contexts (TCs), a translation lookaside buffer (TLB) shared by the plurality of TCs, and an instruction scheduler, coupled to the plurality of TCs, configured to dispatch to execution units, in a multithreaded fashion, instructions of threads executing on the plurality of TCs. The system also includes a multiprocessor operating system (OS), configured to schedule execution of the threads on the plurality of TCs, wherein a thread of the threads executing on one of the plurality of TCs is configured to update the shared TLB, and prior to updating the TLB to disable interrupts, to prevent the OS from unscheduling the TLB-updating thread from executing on the plurality of TCs, and disable the instruction scheduler from dispatching instructions from any of the plurality of TCs except from the one of the plurality of TCs on which the TLB-updating thread is executing.