Question: Write a micro-benchmark to evaluate the performance of various types of synchronization primitives, includ- ing the spinlock, and the two types of mutex locks. The

Write a micro-benchmark to evaluate the performance of various types of synchronization primitives, includ- ing the spinlock, and the two types of mutex locks. The micro-benchmark should support a configurable number of threads. Study the performance of each synchronization primitive as well as its fairness. The performance can be measured by the time to complete the program if each thread attempts a fixed number of lock acquisitions; fairness can be measured by comparing the number of successful lock acquisitions by each thread if the total number of lock acquisitions is fixed Vary the number of threads. Plot the performance of various synchronization primitives and quantify the degree of unfairness using metrie number of successful lock acquisitions per thread if fairness is enforced, and l is the actual number of lock acquisitions for thread i. Interpret your results and discuss possible causes of the performance difference and unfairness. Write a micro-benchmark to evaluate the performance of various types of synchronization primitives, includ- ing the spinlock, and the two types of mutex locks. The micro-benchmark should support a configurable number of threads. Study the performance of each synchronization primitive as well as its fairness. The performance can be measured by the time to complete the program if each thread attempts a fixed number of lock acquisitions; fairness can be measured by comparing the number of successful lock acquisitions by each thread if the total number of lock acquisitions is fixed Vary the number of threads. Plot the performance of various synchronization primitives and quantify the degree of unfairness using metrie number of successful lock acquisitions per thread if fairness is enforced, and l is the actual number of lock acquisitions for thread i. Interpret your results and discuss possible causes of the performance difference and unfairness
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
