7
$\begingroup$

I come from an electronics background. I know that there are three types of implementations of multithreading (see Computer Architecture: A Quantitative Approach, 5th Edition):

  1. Fine-grain multithreading issues instructions for different threads after every cycle.

  2. Coarse-grain multithreading only switches to issue instructions from another thread when the current executing thread causes some long latency events (like page fault etc.)

  3. Simultaneous multithreading issues multiple instructions from multiple threads in one cycle. The processor must be superscalar to do so.

Does that mean that SMT is an extension of fine-grain and coarse-grain multithreading, and fine-grain and coarse-grain multithreading are only suitable for single core processor?

What is the exact difference between SMT and the other approaches?

$\endgroup$

3 Answers 3

9
$\begingroup$

Hennessy and Patterson (Computer Architecture: A Quantitative Approach) use the term "multithreading" to refer to running more than one thread on a single core.

Their distinction between "fine-grain", "coarse-grain" and "simultaneous" involves different approaches for how the threads share the issue logic (the logic that moves instructions from the decode pipeline stage to the execute pipeline stage.)

In "coarse-grain multithreading" the issue stage will issue instructions from one thread for many cycles (dozens or hundreds) and then switch to issuing from another thread only when the first thread gets a cache miss or some other long-latency operation.

In "fine-grain multithreading" the issue stage can issue instructions from a different thread each cycle, but all the instructions issued together in a cycle must come from the same thread.

In "simultaneous multithreading" the issue stage can issue instructions from different threads in the same cycle. The restriction is lifted that instructions issued together in the same cycle must come from the same thread. The distinction between fine-grain multithreading and simultaneous multithreading only matters on machines that can simultaneously issue two or more instructions.

$\endgroup$
0
3
$\begingroup$

Fine-grain multithreading and coarse-grain multithreading are two approaches that can be implemented even on single-core processors. The idea is that you "time-share" the different threads on the single core. Fine-grain multithreading switches between the threads every so often, while coarse-grain multithreading transfers control only when the executing thread is waiting for some operation to resolve.

Simultaneous multithreading, which can only be implemented on a multicore system, executes the different threads on different cores, or on different processing units on the same core ("superscalarity").

Hopefully I've explained the concepts clearly enough, and now you can answer the questions yourself.

$\endgroup$
7
  • 1
    $\begingroup$ I think SMT can be implemented on superscalar processors also if it issues more than 1 instruction per cycle. I don't think it can only be implemented on multicore system $\endgroup$ Jan 30, 2014 at 4:20
  • $\begingroup$ Fine-grain multithreading and coarse-grain multithreading are two approaches that can be implemented even on single-core processors. On what else they can be implemented $\endgroup$ Jan 30, 2014 at 4:21
  • $\begingroup$ That's a question for you to ponder. $\endgroup$ Jan 30, 2014 at 14:07
  • $\begingroup$ Please help me with the 2nd comment I posed. I was not able to find it $\endgroup$ Feb 6, 2014 at 6:55
  • $\begingroup$ I suggest you continue thinking, then. $\endgroup$ Feb 6, 2014 at 13:55
1
$\begingroup$

A physical processor is made up of a number of different resources, including the architecture state — the general purpose CPU registers and interrupt controller registers, caches, buses, execution units, and branch prediction logic. However, in order to define a thread, only the architecture state is required. A logical processor can thus be created by duplicating this architecture space. The execution resources are then shared among the different logical processors.

This technique is known as simultaneous multi-threading, or SMT.

See Intel's Multi-core programming.

$\endgroup$
2
  • 2
    $\begingroup$ Is the copy of Intel's report you are linking to legal? $\endgroup$ Jul 3, 2017 at 11:59
  • $\begingroup$ @YuvalFilmus does it matter? $\endgroup$
    – Hi-Angel
    Oct 26, 2017 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.