I just bought a new, sub-US$1,000 laptop, one aimed squarely at the consumer, non-developer market and, looking over the specs, was surprised to find that it came standard with a dual-core processor.
This led me to the question: with multicore machines becoming the norm, is it ever correct to write a single-threaded application anymore?
Excepting trivial applications, which can reasonably be expected to fit entirely within a single core of a single processor of the weakest system on which it will run, will an application which runs in all one thread be seriously degraded by the way modern OSs spread their execution across cores when no guidance is given by the application as to how to optimize such a split?
Since threading always adds extra complexity to applications, I believe that single threaded applications will always have their place.
Not even when single core processors are completely obsolete will single threaded programming be gone.
Dual cores, especially in the consumer market, are great for multitasking. If every app takes every processor core it possibly can we will run into the same problems we had with single core processors.
I say don't go nuts and start mulithreading everything. Keep it in one thread unless there is a good reason not too.
You shouldn't be multi-threading unless the application needs to be multi-threaded.
Just because you can multi-thread doesn't mean you should. Multiple cores/processors doesn't really change this fact.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With