This research analyzes the performance and consistency of four synchronization mechanisms (reentrant locks, semaphores, synchronized methods, and synchronized blocks) across macOS, Windows, and Linux. While reentrant locks showed the lowest average execution time, they had higher variability compared to mutex-based mechanisms, which provided better consistent performance across platforms. The study highlights the importance of optimizing synchronization strategies to balance performance and reliability in concurrent systems.
Related topics: