When facing high concurrency applications, we often find a number of generic problems. In this article I will focus on the problems of resources (CPU and memory), allowing synchronization problems for another future article. For now on, I will focus on the most typical and most direct solutions.
When we discover threads and the advantages of parallel processing it can happen that we end up abusing their use. We have a lot of threads (100 ¿? 1000?) simultaneously, and the processor will be jumping from one to another without stopping, not letting them finish, no matter how fast is their real excution. And over time there will be more and more threads only slowing down the process. To the cost of execution of each thread, we must consider also the added cost of creating and destroying threads, which can become significant when we talk about so many threads at once.
Click here to read more.. »