Skip to content
oraccha edited this page Jan 15, 2013 · 1 revision

スケジューラから分家.


スケジューリング

スレッドライブラリ

  • PThread (POSIX Thread) . weak consistency

  • PortableThreadLibrary

  • [http://www-6.ibm.com/jp/developerworks/opensource/010413/j_pthreads.html Next Generation POSIX Threading Project] . IBM の Bill Abt 氏らによって開発されている POSIX スレッドライブラリ.M:N スレッドモデルを採用.GNU Pth から派生したらしい.

  • NPTL . 結局 2.6 で正式採用されることになったスレッドライブラリ.

  • [http://www.gnu.org/software/pth/ GNU Pth] . Ralf S. Engelschall 氏による移植性の高いユーザスレッドライブラリ.非プリエンプティブで優先度ベーススケジューリングを行なう.FreeBSD の uthread をベースにしており,NetBSD などで使われている.

  • [http://www.onlamp.com/pub/a/onlamp/2002/11/07/linux_threads.html Linux Multithreading Advances] (OnLamp 2002-11-08)

  • [http://people.redhat.com/drepper/glibcthreads.html Design of the New GNU Thread Library] . Ulrich Drepper 氏によるミーティングのレポート.

  • Fiber

Linux のカーネルスレッドと Solaris の LWP(Light Weight Process) の違いは?

  • Solaris の LWP とカーネルスレッドの関係(LWP != カーネルスレッドである)
    • [http://java.sun.com/docs/hotspot/threads/threads.html こんな話] Solaris のスレッドは 1-1 モデルのみになるそうな.
    • /.J でも書かれていたような気がしますが,Solaris が M:N から 1:1 になり,Linux でも 1:1 の NPTL が有望そう.一方で,NetBSD はスケジューラアクティベーションだと言って M:N に走った.この辺の対比が面白いですね.

API の違い {{{ POSIX Win32 Java -----------------------+----------------------+------------------------- pthread_create CreateThread Thread class ptherad_exit ExitThread stop pthread_yield Sleep(0) yield sleep Sleep sleep pthread_self GetCurrentThreadId currentThread pthread_mutex_init CreateMutex - pthread_mutex_lock WaitForSingleObject synchronized keyword pthread_mutex_unlock ReleaseMutex synchronized keyword pthread_mutex_destroy CloseHandle - pthread_cond_init CreateEvent - pthread_cond_wait WaitForSingleObject wait pthread_cond_signal PulseEvent notify pthread_cond_destroy CloseHandle - }}}


スクリプト言語とスレッド

  • [http://www.idg.co.jp/swonline/column/backnumber/sprepo/col_20010316_01.html スクリプト言語のスレッド機能を比較する] (IDG 2001-03-15) . perlPythontcl
  • [http://www.softpanorama.org/People/Ousterhout/Threads/ Why Threads Are A Bad Idea (for most purposes)] . Tclの作者である JohnOusterhout 氏による 1996 年 USENIX での講演資料. スレッドとその代替策であるイベントを比較している.スレッドプログラミングは敷居が高いという考えが根底にあったみたい. . 8.xでようやくスレッドがサポートされたみたいです.
    • [http://hwaci.com/sw/pttcl/pttcl.html An Introduction To Pthreads-Tcl]

  • [http://www.computer.org/portal/site/computer/menuitem.5d61c1d591162e4b0ef1bd108bcd45f3/index.jsp?&pName=computer_level1_article&TheCat=1005&path=computer/homepage/0506&file=cover.xml&xsl=article.xsl The Problem with Threads] (IEEE Computer 2006-05)
Clone this wiki locally