9P
この項目では、ネットワークプロトコルの9Pについて説明しています。9番目の周期彗星については「テンペル第1彗星」をご覧ください。 |
TCP/IP群 |
---|
アプリケーション層 |
カテゴリ |
トランスポート層 |
カテゴリ |
インターネット層 |
カテゴリ |
リンク層 |
カテゴリ |
|
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]
脚注
- ^ “Plan 9 from Bell Labs — Overview”. 9p.io. 2020年6月3日閲覧。
- ^ “research: u9fs.tgz is the source code tarbal”. www.netlib.org. 2020年6月3日閲覧。
- ^ “Plan 9 /sys/man/4/u9fs”. 9p.io. 2020年6月3日閲覧。
- ^ benavento (April 19, 2019). “9P for Mac”. 2020年6月3日閲覧。
- ^ “Styx-on-a-Brick”. Cat-V Doc. 2020年6月3日閲覧。
- ^ “What’s new for WSL in Windows 10 version 1903?”. Windows Command Line Tools For Developers (February 16, 2019). 2020年6月3日閲覧。
- ^ “Running Custom Containers Under Chrome OS”. Chromium OS Docs. 2019年3月28日閲覧。
- ^ 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.
- ^ “Documentation/9psetup”. QEMU Docs. 2019年3月28日閲覧。
- ^ “Section 5: 9P protocol”. Plan 9 manualg. 2020年6月3日閲覧。
- ^ “version page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
- ^ “error page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
- ^ “flush page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
- ^ “attach page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
- ^ “walk page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
- ^ “open page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
- ^ “read page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
- ^ “clunk page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
- ^ “remove page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
- ^ “stat page from Section 5 of the plan 9 manual”. Plan 9 manualg. 2020年6月3日閲覧。
関連項目
- IL Protocol、ローカルエリアネットワーク内の9Pのために設計されたトランスポートプロトコル
- 分散ファイルシステム