When did the concept of multi-threading come into the picture (as in time frame)? The basis of any multi threading app for performance improvement is the number of cores/processors and the idea of having multiple cores/p开发者_运维百科rocessors is relatively new thanks to intel/amd, so how was multi-threading implemented in ancient times?
Take a look at the wikipedia's article on Concurrent Programming, especially the parts dedicated to single processor machines.
A quick search found this History of Multithreading: http://www.cs.clemson.edu/~mark/multithreading.html
It seems it is not a new idea by any means, going as far back as the 1950s
Multithreading is not just about using more cores to get more work done.
You might use multiple threads in a GUI program, where you need to stay responsive to the user, but you want to get other, background, work done.
You might find that your program waits for disk or network I/O. In this case, the CPU is idle, so you might as well use another thread to do some other work while you're waiting.
精彩评论