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 ?
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.
Sign up to join this communityI 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 ?
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.