2 HT Pentium4/Xeon 2400

1U 1 UltraSparc2 650

4U 4 UltraSparc2 450

8U 8 UltraSparc3 750

24U 24 UltraSparc3 750

5。1 Overhead

Uncontended overhead was measured by  running  only one thread, subtracting the time per iteration taken with a version setting S=0 (zero probability of accessing shared random) from a run with S=1。 Table 2 displays these estimates of the per-lock overhead  of  synchronized  code  over  unsynchronized  code,   in

nanoseconds。 The Mutex class comes closest to testing the basic cost of the framework。 The additional overhead for Reentrant locks indicates the cost of recording the current owner thread and of error-checking, and for Fair locks the additional cost of first checking whether the queue is empty。

Table 2 also shows the cost of tryAcquire versus the "fast path" of a built-in lock。 Differences here mostly reflect the costs of using different atomic instructions and memory barriers across locks and machines。 On multiprocessors, these instructions  tend to completely overwhelm all others。 The main  differences between Builtin and synchronizer classes are apparently due to Hotspot locks using a compareAndSet for both locking and unlocking, while these synchronizers use a compareAndSet for acquire and a volatile write (i。e。, with a memory barrier on multiprocessors, and reordering constraints on all processors) on release。 The absolute and relative costs of each vary across machines。

At the other extreme, Table 3 shows per-lock overheads with S=1 and running 256 concurrent threads, creating massive lock contention。 Under complete saturation, barging-FIFO locks have about an order of magnitude less overhead (and equivalently greater throughput) than Builtin locks, and often two orders of magnitude less than Fair locks。 This demonstrates the effectiveness of the barging-FIFO policy in maintaining thread progress even under extreme contention。

Table 2 Uncontended Per-Lock Overhead in Nanoseconds

Machine Builtin Mutex Reentrant Fair

1P 18 9 31 37

2P 58 71 77 81

2A 13 21 31 30

4P 116 95 109 117

1U 90 40 58 67

4U 122 82 100 115

8U 160 83 103

上一篇:基于约束的纸箱折叠仿真英文文献和中文翻译
下一篇:概率风能模型的发电系统可靠性英文文献和中文翻译

永磁同步电动机的矢量控...

JSP应用框架英文文献中文翻译

SSH框架实现的试题库管理...

塑料注射成型工艺参数优...

冷弯钢门户框架的设计方...

耦合侧向扭转频率的不对...

斜屋顶钢框架结构的弹性...

网络语言“XX体”研究

张洁小说《无字》中的女性意识

麦秸秆还田和沼液灌溉对...

LiMn1-xFexPO4正极材料合成及充放电性能研究

我国风险投资的发展现状问题及对策分析

老年2型糖尿病患者运动疗...

新課改下小學语文洧效阅...

ASP.net+sqlserver企业设备管理系统设计与开发

互联网教育”变革路径研究进展【7972字】

安康汉江网讯