Rubyのスレッド実装の改善

書誌事項

タイトル別名
  • The Improvement of Thread Implementation for Ruby Interpreter

抄録

プログラミング言語Rubyはスレッドプログラミングをサポートする。スレッド処理機構を実現するため、Ruby1.8処理系はユーザレベルスレッドを独自に実装していたが、我々は最新のRuby1.9処理系において、OSなどが提供するネイティブスレッドを用いる方式で実装した。具体的には、POSIX Tthread (Pthread)と Windowsスレッドに対応している。しかし、このRuby1.9処理系のスレッド実装は次のような問題点がある。(1)タイマスレッドが定期的に監視を行うため、CPUを低消費電力状態に保つことができない(2)複数CPUでのCPU利用権の放棄がうまくいかない。我々はこれらの問題に対して、(1)タイマスレッドの改善(2)CPU利用権の受け渡し方式の変更、を行うことで問題点を解決し、スレッド実装を改善した。本稿では既存のRuby処理系でのスレッド実装について述べ、問題点をまとめ、この改善手法について述べる。そして、改善後のRuby処理系の性能について評価した結果を示す。

Programming language Ruby supports thread programming.. To support the threads, the Ruby 1.8 interpreter implements own userlevel threads. On the other hands, we made a thread mechanism using native threads provided by Oss for newest version of the Ruby interpreter Ruby 1.9. To be specific, POSIX Thread (Pthread) and Windows threads are supported. However, the Ruby1.9 interpreter has several issues around threads implementation. (1)We can not keep CPU lowpower state because the timer thread wake up periodically (2)CPU utilization right can not be passed correctly on the SMP systems. We solve these issues by : (1)avoiding timer threads and (2)changing CPU utilization right passing method. In this paper, we show the current Ruby threads implementation, summerize issues and describe solutions. Moreover, we show the peformance of the modified Ruby interpreter.

収録刊行物

関連プロジェクト

もっと見る

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

  • CRID
    1050292572102600960
  • NII論文ID
    170000076316
  • Web Site
    http://id.nii.ac.jp/1001/00091419/
  • 本文言語コード
    ja
  • 資料種別
    conference paper
  • データソース種別
    • IRDB
    • CiNii Articles
    • KAKEN

問題の指摘

ページトップへ