The mttest program emulates the server in a client-server, where clients queue requests and the server uses multiple threads to service them, using explicit threading. This example demonstrates the sorts of contentions that can arise from various locking strategies, and the effect of data management strategies that make inefficient use of cache on execution time.
The executable mttest is compiled for explicit multithreading, and it will run as a multithreaded program on a machine with multiple CPUs or with one CPU. The performance characteristics depend on how many CPUs are available to the program.
To do this example, you must have access to a computer with at least four CPUs. For instructions on collecting performance data for this example, see Collecting Data for the mttest Example. When you have collected performance data, choose from the following parts of the example:
How Locking Strategies Affect Wait Time
How Data Management Affects Cache Performance