実行時リージョン解析による動的言語Rubyのメモリ割付け最適化

書誌事項

タイトル別名
  • Optimizing Memory Allocation of Ruby Implementation by Dynamic Region Analysis

この論文をさがす

抄録

リージョンによるメモリ管理は,メモリ空間をリージョンと呼ばれる単位で分割し,リージョン単位でLIFO順にメモリの割付けと解放を行う.プログラム中のメモリを必要とするオブジェクトは,それぞれの生存期間に対応したリージョンにメモリが割り付けられる.オブジェクトとリージョンの対応付けは,プログラムの構造を静的に解析することによって決定できる.実行の前にオブジェクトの生存期間を決定するため,ガベージコレクションによる実行時オーバヘッドの削減が期待できる.Ruby,Python,そしてJavaScriptといった動的言語は,実行時まで得られない動的な情報がプログラムに含まれるため,不要となったオブジェクトの割り付けられたリージョンを速やかに解放できる精度の高いオブジェクトとリージョンの対応付けを静的な解析で決定するのは困難である.本研究では,精度の高いリージョンによるメモリ管理を動的言語へ適用する手法として,実行時リージョン解析を提案する.実行時まで決定しない情報を用いてリージョンを解析するため,静的な解析と比較して精度の高いリージョン対応付けを決定できる.提案手法の性能を計測するため,プログラミング言語Rubyの処理系へ実行時リージョン解析機構を実装し評価を行った.いくつかのケースでは,ガベージコレクションの頻度や停止時間が削減され,実行時間の短縮が確認された.

Region-based memory management divides the memory space by the unit called the region and allocates and releases the memory by the region in LIFO order. Objects requiring memory in the program are allocated to regions corresponding to their lifetimes. The lifetime of an object is determined before execution, so it is expected that the runtime overhead by garbage collection is reduced. Dynamic languages such as Ruby, Python, and JavaScript contain dynamic information that cannot be obtained until runtime. Therefore it is difficult to determine the highly accurate object and region mappings which can quickly release allocated region of objects that are no longer needed by static analysis. In this paper, we propose dynamic region analysis as a method to apply region-based memory management to dynamic languages. By analyzing at runtime, regions can be analyzed using information which is not determined until runtime, so that accurate region mapping can be determined higher than the static analysis. In order to measure the performance of our method, the dynamic region analysis mechanism was introduced into the Ruby programming language, and the evaluation was carried out. In some evaluations, the frequency and pause times of garbage collection itself are reduced and have seen a reduction in execution time.

収録刊行物

詳細情報 詳細情報について

  • CRID
    1050849378431048832
  • NII論文ID
    170000183497
  • NII書誌ID
    AA11464814
  • ISSN
    18827802
  • Web Site
    http://id.nii.ac.jp/1001/00207288/
  • 本文言語コード
    ja
  • 資料種別
    article
  • データソース種別
    • IRDB
    • CiNii Articles

問題の指摘

ページトップへ