Concurrent Clean : Famke

citeseerで論文サーフィンをしていたら、興味深い論文が!!!
http://citeseer.ist.psu.edu/642407.html
これは、Cleanで 強い型付けの関数型オペレーティングシステム を作ろう!という論文。そして、そこで作られているOSの名前が Famke(ファムカ) です。どうもよく読むと、OSといってもカーネルからすべて書き上げるのではなく、WindowsベースにFamkeを作成するという構成のようです。
Famkeの機能は、

  • インタラクティブなシェル
  • ベースOS(Windows)が提供するプリエンプティブなプロセスへのアクセス
  • Cleanで実装したコオペラティブなスレッド
  • 型安全なモジュールの動的リンク(プラグイン
  • 型安全なプロセス/スレッド間通信
  • 例外機構

というようなところで、これらをClean言語の拡張なしに実装したそうです。
ちなみに、Famkeは現在も利用可能で、以前「何だろう?」といっていたHildeというライブラリがまさにFamkeです。

      • -

ところで、昔のConcurrent Cleanがどういうもので、どうしてCleanになったのかについては、興味が尽きないところですが、その経緯についても序章のところで説明されていました。

Clean offers only very limited library support for process creation and process communication. Besides support for heavyweight (distributed) processes it would also be nice to have support for lightweight threads. Old versions of Concurrent Clean [3] did offer sophisticated support for parallel evaluation and lightweight processes. An implementation existed on a network of Apple Macintosh computers and multiprocessor Transputer systems. Unfortunately, Intel compatible Personal Computers turned out to be less suited for an efficient implementation of the required run-time support and, over the years, Microsoft Windows has become the main platform for Clean. Consequently, current versions of Clean no longer support the old Concurrent Clean annotations for parallel and interleaved evaluation.

ということだそうです。
つまり、昔は、Apple MacintoshとTransputerシステム(MacintoshとTransputerの関係はよく分からなかった)のネットワーク上の実装があったのだけれど、Intelチップでは同様の効率的な実装が難しくて、開発ベースがWindowsになった時にconcurrencyのサポートを止めたということだそうです。
で、このTransputerというのが、調べてみたらまた面白いじゃないですか。Transputerというのは、並列処理のために設計されたMPUで、並列処理を非常に用意に用意に効率的に実装することができたそうです。TransputerはOccamというプログラミング言語を使ってプログラミングします。そもそも、TransputerはOccamを実行するために作成されたとも言えるのだそうです。詳しくないので、これ以上はなんともいえないので後はググってください。 google:transputer] [google:occam
Concurrent Cleanの並列処理の実装は、このTransputerの機能に大きく依存していたということだったようです。で、Transputerの衰退とともに、Concurrent Cleanの並列処理の実装も姿を消してしまったということです。

      • -

ところで、Famkeでは、軽量なスレッドをCleanのみで実装できたということなので(まだ読めていないですが)、それが実用的なものならば、Cleanでもマルチプラットフォームで利用可能なconcurrentプログラミングできますよ!と改めて言えるかも。