9P

9P(または Plan 9 Filesystem Protocol または Styx)は、Plan 9 from Bell Labs (Plan 9) 分散オペレーティングシステムのために、Plan 9�…

9P

9P(または Plan 9 Filesystem Protocol または Styx)は、Plan 9 from Bell Labs (Plan 9) 分散オペレーティングシステムのために、Plan 9システムの構成要素を接続する手段として開発された、ネットワークプロトコルである。ファイルはPlan 9の重要なオブジェクトである。 ファイルはウィンドウネットワークの接続、プロセスや、その他オペレーティングシステムで利用可能なほとんどのものを表現している。

9Pは、Plan 9の第4版のために、9P2000という名前で様々な改良を含む改訂をされた。この改良のうちいくつかは、ある程度のファイル名制限の除去、ディレクトリへの'最終変更者'メタデータフィールドの追加、ファイルの認証といったものである[1]Inferno operating systemの最新版も9P2000を使用している。Inferno file protocolは元々はStyxと呼ばれていたが、技術的には常に9Pの変種であった。

Unixのための9Pサーバ実装はu9fsと呼ばれており[2][3]、Plan 9ディストリビューションに含まれている。9PのOS Xクライアントkernel extensionはMac9Pによって提供されている[4]。いくつかの拡張を含む9Pを実装しているLinux用のカーネルクライアントドライバはv9fsプロジェクトの一部である。9Pとその派生物はStyx on a Brick project[5]のような組み込み環境のアプリケーションにも見られる。

サーバアプリケーション

Plan 9アプリケーションの多くが9Pファイルサーバの形になっている。例には以下のものがある。

  • Acme: プログラマのためのユーザインターフェース
  • rio英語版: Plan 9のウィンドウマネージャ
  • plumber英語版: プロセス間通信
  • ftpfs: リモートのFTPサーバ上のファイルとディレクトリをローカル名前空間に表示するFTPクライアント
  • wikifs: リモートのwikiをファイルとしてローカル名前空間に表示するwiki編集ツール
  • webfs: URLからデータを取り出して、その内容とレスポンスの詳細をファイルとしてローカル名前空間に表示するファイルサーバ

Plan 9以外では、9Pプロトコルは軽量なリモートファイルシステムが要求されるときに、まだ使われている。

  • NixOS: 純粋関数的で宣言的なLinuxディストリビューションはバーチャルマシンの中で自分自身をリビルドできる。クライアントはホストのパッケージストアディレクトリをマウントするために9Pを使う。
  • Windows Subsystem for Linux: Windows 10 version 1903以降、サブシステムは9Pをサーバとして実装して、ホストのWindowsオペレーティングシステムはクライアントとしてふるまう[6]
  • Crostini: カスタム9PサーバはLinux VMの外側のファイルへのアクセスを提供するために使われる。 [7]
  • QEMU: VirtFSデバイスは9Pを通じてファイルシステムの共有をすることができる。これはカーネルドライバと共有メモリによって高速化される。[8][9]
  • DIOD: 分散I/Oデーモン - 9Pファイルサーバ

実装

9Pはクライアントとサーバの間で以下のメッセージを送る[10]。これらのメッセージは、いかなる9Pサーバも実装しなければならないPlan 9 vfsレイヤのエントリーポイントに対応している。

version
プロトコルのバージョンのネゴシエーションを行う[11]
error
エラーを返す[12]
flush
メッセージを打ち切る[13]
auth, attach
接続を確立する[14]
walk
ディレクトリ階層を辿る[15]
create, open
既存または新規ファイルのI/Oをするためにfidを作成する[16]
read, write
ファイルとデータの送受信をする[17]
clunk
fidを忘れる[18]
remove
サーバからファイルを削除する[19]
stat, wstat
ファイルの属性を問い合わせる、または変更する[20]

脚注

  1. ^ Plan 9 from Bell Labs — Overview”. 9p.io. 2020年6月3日閲覧。
  2. ^ research: u9fs.tgz is the source code tarbal”. www.netlib.org. 2020年6月3日閲覧。
  3. ^ Plan 9 /sys/man/4/u9fs”. 9p.io. 2020年6月3日閲覧。
  4. ^ benavento (2019年4月19日). “9P for Mac”. 2020年6月3日閲覧。
  5. ^ Styx-on-a-Brick”. Cat-V Doc. 2020年6月3日閲覧。
  6. ^ What’s new for WSL in Windows 10 version 1903?”. Windows Command Line Tools For Developers (2019年2月16日). 2020年6月3日閲覧。
  7. ^ Running Custom Containers Under Chrome OS”. Chromium OS Docs. 2019年3月28日閲覧。
  8. ^ Jujjuri, Venkateswararao; Van Hensbergen, Eric; Liguori, Anthony; Pulavarty, Badari (July 13–16, 2010). “VirtFS—A virtualization aware File System pass-through”. Linux Symposium. https://www.kernel.org/doc/ols/2010/ols2010-pages-109-120.pdf. 
  9. ^ Documentation/9psetup”. QEMU Docs. 2019年3月28日閲覧。
  10. ^ Section 5: 9P protocol”. Plan 9 manualg. 2020年6月3日閲覧。
  11. ^ version page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
  12. ^ error page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
  13. ^ flush page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
  14. ^ attach page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
  15. ^ walk page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
  16. ^ open page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
  17. ^ read page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
  18. ^ clunk page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
  19. ^ remove page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
  20. ^ stat page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。

関連項目

外部リンク

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.