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?

up vote 7 down vote accepted

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.

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.

  • 1
    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 – sai kiran grandhi Jan 30 '14 at 4:20
  • 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 – sai kiran grandhi Jan 30 '14 at 4:21
  • That's a question for you to ponder. – Yuval Filmus Jan 30 '14 at 14:07
  • Please help me with the 2nd comment I posed. I was not able to find it – sai kiran grandhi Feb 6 '14 at 6:55
  • I suggest you continue thinking, then. – Yuval Filmus Feb 6 '14 at 13:55

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.

  • 2
    Is the copy of Intel's report you are linking to legal? – Yuval Filmus Jul 3 '17 at 11:59
  • @YuvalFilmus does it matter? – Hi-Angel Oct 26 '17 at 16:58

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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