1
$\begingroup$

I am studying various multi-threading models. Here the user threads are mapped to Kernel Threads. They are -

Many to one model.
Many to many model.
one to one model.`

What kept me wondering was why there is no one to many model ?

$\endgroup$
  • $\begingroup$ Think about what that would mean and how you would implement it. $\endgroup$ – D.W. May 19 '18 at 17:16
1
$\begingroup$

Actually, there is such a model, though it is typically not thought of as one of the "multi-threading models."

One to many would mean one thread distributed across many processors. At first that should look silly. After all, you only have one thread. What are the other processors to do? However, superscalar architectures are designed to do roughly this sort of operation. In superscalar architectures, instructions are decomposed and the CPU identifies the best ways to do these decomposed pieces in parallel, utilizing as much of the hardware as possible. As a trivial example, they might do a floating point operation and an integer operation at the same time. Or they might take both branches of a conditional jump at the same time, only settling on one branch later when data becomes available.

This isn't quite a "multi-threading" model, because there's no crisp clean boundary between CPUs. In superscalar architectures, the hardware utilization is much more fluid. But it does accomplish something which is very similar in nature: it executes many instructions from one thread in parallel.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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