Why Multithreading? My previous post was more about what is multithreading and we contrasted that with what is multitasking.
Most of the hardware in use today be it processors in servers, laptops or those in mobile phones are all equipped with multicore processors. It is only natural to expect then that software written to run on these devices make full use of the hardware and it capabilities. Shouldn’t the performance gains be double if the same tasks which was earlier running on a single core processor is now running on a dual core processor? Actually in practice this is not the case. Extracting good performance out of a dual core processor needs programmer intervention. It is not something that happens automagically. This is explored clearly in this article in Dr. Dobbs journal “The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software” by Herb Sutter that appeared in Mar 2005. I have provided a link to the republished article.
Most of the hardware in use today be it processors in servers, laptops or those in mobile phones are all equipped with multicore processors. It is only natural to expect then that software written to run on these devices make full use of the hardware and it capabilities. Shouldn’t the performance gains be double if the same tasks which was earlier running on a single core processor is now running on a dual core processor? Actually in practice this is not the case. Extracting good performance out of a dual core processor needs programmer intervention. It is not something that happens automagically. This is explored clearly in this article in Dr. Dobbs journal “The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software” by Herb Sutter that appeared in Mar 2005. I have provided a link to the republished article.