Speculative multithreading

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Thread Level Speculation (TLS) is a technique to speculatively execute a section of computer code that is anticipated to be executed later in parallel with the normal execution on a separate independent thread. Such a speculative thread may need to make assumptions about the values of input variables. If these prove to be invalid the speculative thread will need to be discarded and squashed. If the assumptions are correct the program can complete in a shorter time provided the thread was able to be scheduled efficiently.

It is also known as Speculative Multithreading (SpMT).[citation needed]

Description[edit]

TLS extracts threads from serial code and executes them speculatively in parallel with a safe thread.[1]:2 The speculative thread will need to be squashed or discarded or re-run if its presumptions on the input state prove to be invalid.[citation needed] It is a runtime parallelization technique which uncovers parallelism that static (compile-time) parallelization techniques fail to exploit.[citation needed] This particular case of speculative execution occurs at the thread level as opposed to the instruction level[citation needed] and can be implemented both in hardware as well as in software.[citation needed]

For the technique to achieve the goal of reducing overall execute time there must be available CPU resource that can be efficiently executed in parallel with the main safe thread.[citation needed]

References[edit]

  1. ^ Martínezy, Jose F.; Torrellas, Josep. "Speculative Synchronization: Applying Thread-Level Speculation to Explicitly Parallel Applications" (PDF). Archived (PDF) from the original on 18 November 2018. Retrieved 18 November 2018.

Further reading[edit]