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框架实现的试题库管理...

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

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

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

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

上海居民的社会参与研究

压疮高危人群的标准化中...

STC89C52单片机NRF24L01的无线病房呼叫系统设计

基于Joomla平台的计算机学院网站设计与开发

提高教育质量,构建大學生...

浅谈高校行政管理人员的...

从政策角度谈黑龙江對俄...

AES算法GPU协处理下分组加...

酵母菌发酵生产天然香料...

浅论职工思想政治工作茬...