What is "competition"

A number of mathematical models have been developed for concurrent computing in general, including Petri networks, the calculation process, the Parallel random access machine model, the model and atorActor and the Reo Coordination Language.

Problems

Because calculations in a simultaneous system can interact with each other while they are running, the number of possible execution paths in which the system can be very large, and the resulting result can be undetermined. Concurrent use of shared resources can be a source of indetermination leading to problems such as deadlock or impasse, and starvation or starvation.

Performance

A common misconception is that increasing competition will always improve performance. While it can improve throughput for CPU-limited processes using more Cpus, and I/O-limited tasks by amortizing the latency of each task, there are many situations where more competition harms performance. Even when it improves performance can reduce ease of maintenance.

Examples of where competition does not help:

  • The overload of using multiple threads exceeds the potential improvement. For example: You have a very short task, but it takes a long time to pass it (and the data associated with it) to another thread.   - For example the cost of a blocking feature exceeds the time elapsed in the protected operation. A single task can perform better (and simpler)
  • You are already using a shared resource at the limit of its maximum. For example: all your Cpus, hard drives, network connection are fully used. In this case the overload may worsen overall performance.
  • You don’t need a performance boost, but adding the competition increases the complexity of your application. A common argument is, you have to use all your Cpus because they are there (even if there is nothing to gain and everything to lose)  

    References

  • Competition on Wikipedia

  • Models for competing systems
  • Competition control