• 検索結果がありません。

実行時統計とJust -in- timeコンパイルによるロックの選択的最適化

N/A
N/A
Protected

Academic year: 2021

シェア "実行時統計とJust -in- timeコンパイルによるロックの選択的最適化"

Copied!
1
0
0

読み込み中.... (全文を見る)

全文

(1)Vol. 44. No. SIG 2(PRO 16). Feb. 2003. 情報処理学会論文誌:プログラミング. 発表概要. 実行時統計と Just-in-time コンパイルによるロックの選択的最適化 大. 平. 怜†. 平. 木. 敬†. 近年,Java バーチャルマシン( JVM )の上で動作するサーバ用コンポーネントが広く普及してい る.これらのコンポーネントは高速化のために実行時にネイティブコード にコンパイルされ( JIT コ ンパイル ) ,最適化される.しかし従来の Java の JIT コンパイラに関する研究ではバイトコード 最 適化のみが対象とされてきた.本発表では,JIT コンパイラがシステムレベルの実行時最適化を行う 手法を提案する.提案手法はネイティブコード 中のシステム管理用コード を実行時統計と JIT コン パイラを用いて最適化するものであり,本発表においては特定のロックの動作を変化させスループッ トと公平性を両立させる最適化に適用する.サーバ側 Java では同一オブジェクトのロックに対して 複数スレッドからの同時アクセスが頻繁に起こる.このため,ロック獲得中のプリエンプトを許す従 来のロックを用いると,コンテンションによりタイムスライスに対してコンテキスト切替えの頻度が 高すぎたり低すぎたりする.この問題の解決手法として,ロック獲得中のプリエンプトを遅延させる temporally non-preemption( TNP )が提案されている.しかし,TNP ではコンテンションが起き ないロックについて無駄なオーバへッドが加算される.我々の手法では,コンテンションが起きるロッ クを実行時統計を用いて検出し,JIT コンパイルによりそのロックに TNP を適用する.我々はこの 手法を JVM の実装の 1 つである Kaffe に実装し評価を行った.その結果,TNP に対してオーバ へッドが最大で 3.4%削減され,かつコンテキスト切替の頻度とタイムスライスの一致によりスルー プットと公平性が両立していることが確認された.. Selective Optimization of Locks by Runtime Statistics and Just-in-time Compilation Rei Odaira† and Kei Hiraki† Recently, server-side components running on a Java virtual machine (JVM) have become popular. These components are compiled into native code (JIT compilation) and optimized at runtime for high performance. However, previous researches on JIT compilers for Java have been focused on only bytecode optimizations. In this presentation, we propose a method in which a JIT compiler performs system-level runtime optimizations. The proposed method is the one which optimizes system management code inside native code by using runtime statistics and a JIT compiler. In this presentation, we apply the method to the optimization that manages both throughput and fairness by changing behavior of particular locks. In server-side Java, it occurs frequently that multiple threads access the same object lock simultaneously. Thus if we use usual locks that allow preemption during critical sections, contention makes the frequency of context switches too high or too low, compared with the time slice. To solve the problem, temporally non-preemption (TNP) was proposed: the method which delays preemption during critical sections. TNP, however, increases unnecessary overhead on locks that induce no contention. Using runtime statistics, our method detects locks at which contention occurs and applies TNP to the locks by JIT compilation. We implemented the method to Kaffe, one of the implementations of JVM, and evaluated it. The result shows that our method reduces overhead at a maximum of 3.4% against TNP, and manages both throughput and fairness thanks to the consistency between the frequency of context switches and the time slice.. ( 平成 14 年 8 月 21 日発表) † 東京大学情報理工学系研究科コンピュータ科学専攻 Department of Computer Science, Graduate School of Information Science and Technology, The University of Tokyo. 44.

(2)

参照

関連したドキュメント

We study the stabilization problem by interior damping of the wave equation with boundary or internal time-varying delay feedback in a bounded and smooth domain.. By

Section 4 will be devoted to approximation results which allow us to overcome the difficulties which arise on time derivatives while in Section 5, we look at, as an application of

“Breuil-M´ezard conjecture and modularity lifting for potentially semistable deformations after

The numerical tests that we have done showed significant gain in computing time of this method in comparison with the usual Galerkin method and kept a comparable precision to this

discrete ill-posed problems, Krylov projection methods, Tikhonov regularization, Lanczos bidiago- nalization, nonsymmetric Lanczos process, Arnoldi algorithm, discrepancy

For computing Pad´ e approximants, we present presumably stable recursive algorithms that follow two adjacent rows of the Pad´ e table and generalize the well-known classical

We use operator-valued Fourier multipliers to obtain character- izations for well-posedness of a large class of degenerate integro-differential equations of second order in time

The time-frequency integrals and the two-dimensional stationary phase method are applied to study the electromagnetic waves radiated by moving modulated sources in dispersive media..