Threads are Dead

By webhat

That’s what I heard some guy called Gary Smith said, he adopted the statement, made by Professor Wen-mei Hwu from the University of Illinois at Urbana–Champaign, during the Thousand-Core Chips panel. He said, “Threads are dead.”1

Why exactly are threads dead?
Threads are designed to create virtual parallelism on a uniprocessor architecture, they help split tasks when there is only one CPU. In that way multiple programs can be run, or 1 program perform can run multiple tasks, on the 1 CPU system. The problem, according to Simon Davidmann, is that “multithreading is not the best way to exploit multicore resources.”

Threading is already complex and, although there are many who can do it right, it is very easy to do wrong. Even for people who understand it. What makes it more unwieldy is that splitting the task you wish to run into smaller tasks comes at a price. Either multiple threads wait for each other to finish processing and may cause errors if certain tasks are pre-empted by other tasks or the kernel, or they are atomic and perform only a small portion of a task which only has a clearly defined input and output, and above all doesn’t rely on anything midstream. And the later is the partitioning they talk about in their article; “focus is on defining a large number of small tasks in order to yield what is termed a fine-grained decomposition of a problem.2

There are 4 reason the multiple threading needs to change from the uniprocessor to the multicore:

  1. Sharing Memory and Cache – It’s expensive and slow to share data between cores
  2. CPU Optimization – Branch Prediction tries to guess which path will be taken by the code this can cause requests for data from one thread which hasn’t been produced by the other thread
  3. Compiler Optimization – The compiler doesn’t always produce exactly the instructions that the programmer expects
  4. Debugging – All the above can make debugging very difficult in an environment which is setup more for uniprocessor than multiprocessor

Thread partitioning will solve this problem by removing the reliance on external threads.

  1. Threads are dead (PDF)
  2. Multi-core – Software Impact

One Response to “Threads are Dead”

  1. Threads are Dead Says:

    [...] Full Story [...]

Leave a Reply