SlideShare a Scribd company logo
1 of 37
Download to read offline
Plan 9 from Bell Labs

                    oraccha
 Plan9          http://d.hatena.ne.jp/oraccha/

2009   8   10                          VM
Plan 9
•   Plan 9       OS

•   9vx Plan 9

•   Plan 9
Plan 9
UNIX
   OS

                         Phil Winterbottom




                         Dave Presotto
        Dennis Ritchie               Rob Pike




                                             1995
Plan 9
           UNIX
                     OS

                 Phil Winterbottom          Jim McKie




                 Dave Presotto
Dennis Ritchie               Rob Pike




                                     1995               2004
Plan 9



•                 BlueGene/P

•   Google Summer of Code

•           International Workshop
Plan 9

“Not only is UNIX dead,
it’s starting to smell really bad.”
              -- Rob Pike, 1991
xterm...
 User




Window               Shell



            ASR-33
Plan 9

  •
  • 9P
  •
•
•   open-read-write-close
UNIX
           Kernel

                  UFS
                            UFS
               Interface

Process          Char       Char
               Interface   device

                 Block     Block
               Interface   device
...
                   UNIX
            UNIX

•
    •       UCB

•   GUI
    •   X            MIT
Socket                   Other file
            Sysctl                   system

Process   Lotsa stuff!                UFS

             VFS         VFS          sysfs
          Interface
            Char            Char
          Interface        device
            Block          Block
          Interface        device
Kernel

                        Server
             Server
Process
            Interface
                        Device
Plan 9
                    9p2000 protocol

              Kernel

                               Server (process)
              Server         for email file system
Process
             Interface
                                Server (process)
                              for local file system



                                   Device
9P
     version
      auth
     attach
      flush
     error
      walk
      open
     create
      read
     write
     clunk
     remove
      stat
     wstat
UNIX     I/O


Plan 9

 •             I/F

 •
Plan 9   UNIX



         root
UNIX
•   9P

•   proc

•
•   rfork clone

•
•   UTF-8
•   i386   AMD64 ARM PowerPC SPARC

•                KVM QEMU    Virtual
    Box VMWare Xen    KVM   lguest



•   MIPS
UNIX            Plan 9
•   Plan9port
    •  Plan 9

    •   v9fs

•   9vx
    • Plan 9

    •
•   Drawterm
    •
9vx
        Plan 9      Plan 9      Plan 9
1       a.out       a.out       a.out


             vx32 sandbox library


             Modified Plan 9 kernel



              Host OS
    (Linux, FreeBSD, MacOS X)
9vx TIPS
•   x86_64                      Mercurial


    -   http://code.google.com/p/vx32/

•   Plan 9

    % 9fs sources
    % cd /n/sources
    % @{cd plan9/386/lib && tar c .} | 
      @{cd /386/lib && tar x}
•   acme:



•   kencc: ANSI C

•   acid:

•   APE: POSIX
man emacs(1)
EMACS(1)

 NAME
        emacs - editor macros

 SYNOPSIS
      emacs [ options ]

 DESCRIPTION
      This page intentionally left blank.

 SOURCE
      MIT

 SEE ALSO
      sam(1), vi(1)

 BUGS
        Yes.
kencc:
  rio/rio.c
 58: enum
 59: {
 60:         Cut,
 61:         Paste,
 62:         Snarf,
 63:         Plumb,
 64:         Send,
 65:         Scroll,
 66: };
 67:
                                         C99
 68: char              *menu2str[] = {
 69: [Cut]             "cut",             [Cut] = “cut”,
 70: [Paste]           "paste",
 71: [Snarf]           "snarf",
 72: [Plumb]           "plumb",
 73: [Send]            "send",
 74: [Scroll]          "scroll",
 75:                   nil
 76: };
kencc:


•   Linux

•     rio/dat.h
    107 struct Mousestate
    108 {
    109         Mouse;
    110         ulong   counter;
    111 };

rio/wind.c
  305: m = (Mousestate){w->mc.Mouse, w->mouse.counter};
Hello, World!
% cat hello.c
#include <u.h>
#include <libc.h>

void main()
{
    print(“Hello, World!n”);
    exits(nil);
}

% 8c hello.c
% 8l -o hello hello.8
% hello
% cat hello.c
#include <u.h>
#include <libc.h>

void main()
{
    print(“Hello, World!n”);
    exits(nil);
}

% 8c hello.c
% 8l -o hello hello.8
% hello
ANSI C/POSIX
% cat hello.c
#include <u.h>
#include <libc.h>

void main()
{
    print(“Hello, World!n”);
    exits(nil);
}

% 8c hello.c
% 8l -o hello hello.8
% hello
% cat hello.c
#include <u.h>
#include <libc.h>

void main()     include/libc.h:
{               1: #pragma lib    “libc.a”
    print(“Hello, World!n”);
                2: #pragma src    “/sys/src/libc”
    exits(nil);
}

% 8c hello.c
% 8l -o hello hello.8
% hello
./hello
% cat hello.c
#include <u.h>
#include <libc.h>

void main()
{
    print(“Hello, World!n”);
    exits(nil);
}

% 8c hello.c
% 8l -o hello hello.8
% hello
% ls /env
'*'	 	 boottime	 'fn#sigexit'	pid	 	 terminal
0	 	 cflag	 	 font		 prompt	 	 timezone
NPROC	 	 cputype	 fs	 rcname	 	 user
                  	    	
apid		 ether0	 	 home		 rootdir	 wctl
                                 	
auth		 facedom	 ifs	 	 service	 wsys
               	                 	
bootargs	 fileserver	 objtype	 status
                              	
bootfile	 'fn#cpu%'	path		 sysname


% cat /env/path
./bin
•
                                   /bin
       % ns   | grep /bin
       bind   /386/bin /bin
       bind   -a /rc/bin /bin
       bind   -a /usr/oraccha/bin/rc /bin
       bind   -a /usr/oraccha/bin/386 /bin

    ※Linux    aufs unionfs
•
    % foo
    foo 151: suicide: sys: trap: page fault pc=0x00001025
    % ps | grep foo
    glenda          151    0:00   0:00        8K Broken   foo



•    acid(1)
    % acid 151
    /proc/151/text: 386 plan 9 executable
       :
    acid: stk()



•                               /proc import
Plan 9
•   Web         http://plan9.bell-labs.com/
    sources/plan9/sys/src/
•                  git                git://github.com/
    ericvh/plan-9.git
       sys -- src
              |-- 9        # kernel
              | |-- pc
              | `-- port
              |-- cmd      # uesr command
              `-- libc     # libc library
Plan9   http://d.hatena.ne.jp/oraccha/

More Related Content

What's hot

冬のLock free祭り safe
冬のLock free祭り safe冬のLock free祭り safe
冬のLock free祭り safe
Kumazaki Hiroki
 
組み込み関数(intrinsic)によるSIMD入門
組み込み関数(intrinsic)によるSIMD入門組み込み関数(intrinsic)によるSIMD入門
組み込み関数(intrinsic)によるSIMD入門
Norishige Fukushima
 
マルチコアとネットワークスタックの高速化技法
マルチコアとネットワークスタックの高速化技法マルチコアとネットワークスタックの高速化技法
マルチコアとネットワークスタックの高速化技法
Takuya ASADA
 
バージョン管理のワークフロー
バージョン管理のワークフローバージョン管理のワークフロー
バージョン管理のワークフロー
add20
 

What's hot (20)

AVX-512(フォーマット)詳解
AVX-512(フォーマット)詳解AVX-512(フォーマット)詳解
AVX-512(フォーマット)詳解
 
ローマと道に関するいくつかの問題とその解決
ローマと道に関するいくつかの問題とその解決ローマと道に関するいくつかの問題とその解決
ローマと道に関するいくつかの問題とその解決
 
Intro to SVE 富岳のA64FXを触ってみた
Intro to SVE 富岳のA64FXを触ってみたIntro to SVE 富岳のA64FXを触ってみた
Intro to SVE 富岳のA64FXを触ってみた
 
goで末尾再帰最適化は使えるか?
goで末尾再帰最適化は使えるか?goで末尾再帰最適化は使えるか?
goで末尾再帰最適化は使えるか?
 
冬のLock free祭り safe
冬のLock free祭り safe冬のLock free祭り safe
冬のLock free祭り safe
 
プログラムを高速化する話
プログラムを高速化する話プログラムを高速化する話
プログラムを高速化する話
 
ARM LinuxのMMUはわかりにくい
ARM LinuxのMMUはわかりにくいARM LinuxのMMUはわかりにくい
ARM LinuxのMMUはわかりにくい
 
実運用して分かったRabbit MQの良いところ・気をつけること #jjug
実運用して分かったRabbit MQの良いところ・気をつけること #jjug実運用して分かったRabbit MQの良いところ・気をつけること #jjug
実運用して分かったRabbit MQの良いところ・気をつけること #jjug
 
Windows10タブレットに各種Linuxディストリを入れて遊ぼう 2017年度東京Spring版
Windows10タブレットに各種Linuxディストリを入れて遊ぼう 2017年度東京Spring版Windows10タブレットに各種Linuxディストリを入れて遊ぼう 2017年度東京Spring版
Windows10タブレットに各種Linuxディストリを入れて遊ぼう 2017年度東京Spring版
 
組み込み関数(intrinsic)によるSIMD入門
組み込み関数(intrinsic)によるSIMD入門組み込み関数(intrinsic)によるSIMD入門
組み込み関数(intrinsic)によるSIMD入門
 
Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Dockerからcontainerdへの移行
Dockerからcontainerdへの移行
 
FPGA+SoC+Linux実践勉強会資料
FPGA+SoC+Linux実践勉強会資料FPGA+SoC+Linux実践勉強会資料
FPGA+SoC+Linux実践勉強会資料
 
Introduction to arm virtualization
Introduction to arm virtualizationIntroduction to arm virtualization
Introduction to arm virtualization
 
マルチコアとネットワークスタックの高速化技法
マルチコアとネットワークスタックの高速化技法マルチコアとネットワークスタックの高速化技法
マルチコアとネットワークスタックの高速化技法
 
GPU仮想化最前線 - KVMGTとvirtio-gpu -
GPU仮想化最前線 - KVMGTとvirtio-gpu -GPU仮想化最前線 - KVMGTとvirtio-gpu -
GPU仮想化最前線 - KVMGTとvirtio-gpu -
 
いまさら聞けないarmを使ったNEONの基礎と活用事例
いまさら聞けないarmを使ったNEONの基礎と活用事例いまさら聞けないarmを使ったNEONの基礎と活用事例
いまさら聞けないarmを使ったNEONの基礎と活用事例
 
dm-writeboost-kernelvm
dm-writeboost-kernelvmdm-writeboost-kernelvm
dm-writeboost-kernelvm
 
20111015 勉強会 (PCIe / SR-IOV)
20111015 勉強会 (PCIe / SR-IOV)20111015 勉強会 (PCIe / SR-IOV)
20111015 勉強会 (PCIe / SR-IOV)
 
バージョン管理のワークフロー
バージョン管理のワークフローバージョン管理のワークフロー
バージョン管理のワークフロー
 
何となく勉強した気分になれるパーサ入門
何となく勉強した気分になれるパーサ入門何となく勉強した気分になれるパーサ入門
何となく勉強した気分になれるパーサ入門
 

Viewers also liked (6)

Plan 9でWebプログラミング
Plan 9でWebプログラミングPlan 9でWebプログラミング
Plan 9でWebプログラミング
 
オペレーティングシステム 設計と実装 第3版(20101211)
オペレーティングシステム 設計と実装 第3版(20101211)オペレーティングシステム 設計と実装 第3版(20101211)
オペレーティングシステム 設計と実装 第3版(20101211)
 
Rc - The Plan 9 Shell
Rc - The Plan 9 ShellRc - The Plan 9 Shell
Rc - The Plan 9 Shell
 
Unix++: Plan 9 from Bell Labs
Unix++: Plan 9 from Bell LabsUnix++: Plan 9 from Bell Labs
Unix++: Plan 9 from Bell Labs
 
Introducing Plan9 from Bell Labs
Introducing Plan9 from Bell LabsIntroducing Plan9 from Bell Labs
Introducing Plan9 from Bell Labs
 
Plan 9: Not (Only) A Better UNIX
Plan 9: Not (Only) A Better UNIXPlan 9: Not (Only) A Better UNIX
Plan 9: Not (Only) A Better UNIX
 

Similar to 今日から始めるPlan 9 from Bell Labs

LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platform
Linaro
 

Similar to 今日から始めるPlan 9 from Bell Labs (20)

Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack
 
もうひとつのコンテナ実行環境 runq のご紹介
もうひとつのコンテナ実行環境 runq のご紹介もうひとつのコンテナ実行環境 runq のご紹介
もうひとつのコンテナ実行環境 runq のご紹介
 
Rhce ppt
Rhce pptRhce ppt
Rhce ppt
 
OSCON: System software goes weird
OSCON: System software goes weirdOSCON: System software goes weird
OSCON: System software goes weird
 
Genode Compositions
Genode CompositionsGenode Compositions
Genode Compositions
 
Linux Knowledge Transfer
Linux Knowledge TransferLinux Knowledge Transfer
Linux Knowledge Transfer
 
A Science Project: Swift Serial Chat
A Science Project: Swift Serial ChatA Science Project: Swift Serial Chat
A Science Project: Swift Serial Chat
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
あなたの知らないネットワークプログラミングの世界
あなたの知らないネットワークプログラミングの世界あなたの知らないネットワークプログラミングの世界
あなたの知らないネットワークプログラミングの世界
 
Webinar - Getting Started With Ceph
Webinar - Getting Started With CephWebinar - Getting Started With Ceph
Webinar - Getting Started With Ceph
 
IL: 失われたプロトコル
IL: 失われたプロトコルIL: 失われたプロトコル
IL: 失われたプロトコル
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
Introduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra SolutionsIntroduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra Solutions
 
Surge2014 talk - illumos State of the Community & POSIX Update
Surge2014 talk - illumos State of the Community & POSIX UpdateSurge2014 talk - illumos State of the Community & POSIX Update
Surge2014 talk - illumos State of the Community & POSIX Update
 
LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platform
 
Building
BuildingBuilding
Building
 
Talk 160920 @ Cat System Workshop
Talk 160920 @ Cat System WorkshopTalk 160920 @ Cat System Workshop
Talk 160920 @ Cat System Workshop
 
Unleash your inner console cowboy
Unleash your inner console cowboyUnleash your inner console cowboy
Unleash your inner console cowboy
 
Linux Administration for Developers
Linux Administration for DevelopersLinux Administration for Developers
Linux Administration for Developers
 

More from Ryousei Takano

クラウド環境におけるキャッシュメモリQoS制御の評価
クラウド環境におけるキャッシュメモリQoS制御の評価クラウド環境におけるキャッシュメモリQoS制御の評価
クラウド環境におけるキャッシュメモリQoS制御の評価
Ryousei Takano
 
AIST Super Green Cloud: lessons learned from the operation and the performanc...
AIST Super Green Cloud: lessons learned from the operation and the performanc...AIST Super Green Cloud: lessons learned from the operation and the performanc...
AIST Super Green Cloud: lessons learned from the operation and the performanc...
Ryousei Takano
 
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
Ryousei Takano
 
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data CenterIris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
Ryousei Takano
 

More from Ryousei Takano (20)

Error Permissive Computing
Error Permissive ComputingError Permissive Computing
Error Permissive Computing
 
Opportunities of ML-based data analytics in ABCI
Opportunities of ML-based data analytics in ABCIOpportunities of ML-based data analytics in ABCI
Opportunities of ML-based data analytics in ABCI
 
ABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI: An Open Innovation Platform for Advancing AI Research and DeploymentABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI: An Open Innovation Platform for Advancing AI Research and Deployment
 
ABCI Data Center
ABCI Data CenterABCI Data Center
ABCI Data Center
 
クラウド環境におけるキャッシュメモリQoS制御の評価
クラウド環境におけるキャッシュメモリQoS制御の評価クラウド環境におけるキャッシュメモリQoS制御の評価
クラウド環境におけるキャッシュメモリQoS制御の評価
 
USENIX NSDI 2016 (Session: Resource Sharing)
USENIX NSDI 2016 (Session: Resource Sharing)USENIX NSDI 2016 (Session: Resource Sharing)
USENIX NSDI 2016 (Session: Resource Sharing)
 
User-space Network Processing
User-space Network ProcessingUser-space Network Processing
User-space Network Processing
 
Flow-centric Computing - A Datacenter Architecture in the Post Moore Era
Flow-centric Computing - A Datacenter Architecture in the Post Moore EraFlow-centric Computing - A Datacenter Architecture in the Post Moore Era
Flow-centric Computing - A Datacenter Architecture in the Post Moore Era
 
A Look Inside Google’s Data Center Networks
A Look Inside Google’s Data Center NetworksA Look Inside Google’s Data Center Networks
A Look Inside Google’s Data Center Networks
 
クラウド時代の半導体メモリー技術
クラウド時代の半導体メモリー技術クラウド時代の半導体メモリー技術
クラウド時代の半導体メモリー技術
 
AIST Super Green Cloud: lessons learned from the operation and the performanc...
AIST Super Green Cloud: lessons learned from the operation and the performanc...AIST Super Green Cloud: lessons learned from the operation and the performanc...
AIST Super Green Cloud: lessons learned from the operation and the performanc...
 
IEEE CloudCom 2014参加報告
IEEE CloudCom 2014参加報告IEEE CloudCom 2014参加報告
IEEE CloudCom 2014参加報告
 
Expectations for optical network from the viewpoint of system software research
Expectations for optical network from the viewpoint of system software researchExpectations for optical network from the viewpoint of system software research
Expectations for optical network from the viewpoint of system software research
 
Exploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC CloudExploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC Cloud
 
不揮発メモリとOS研究にまつわる何か
不揮発メモリとOS研究にまつわる何か不揮発メモリとOS研究にまつわる何か
不揮発メモリとOS研究にまつわる何か
 
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...
 
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~
 
From Rack scale computers to Warehouse scale computers
From Rack scale computers to Warehouse scale computersFrom Rack scale computers to Warehouse scale computers
From Rack scale computers to Warehouse scale computers
 
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
 
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data CenterIris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

今日から始めるPlan 9 from Bell Labs

  • 1. Plan 9 from Bell Labs oraccha Plan9 http://d.hatena.ne.jp/oraccha/ 2009 8 10 VM
  • 3. Plan 9 OS • 9vx Plan 9 • Plan 9
  • 4. Plan 9 UNIX OS Phil Winterbottom Dave Presotto Dennis Ritchie Rob Pike 1995
  • 5. Plan 9 UNIX OS Phil Winterbottom Jim McKie Dave Presotto Dennis Ritchie Rob Pike 1995 2004
  • 6. Plan 9 • BlueGene/P • Google Summer of Code • International Workshop
  • 7. Plan 9 “Not only is UNIX dead, it’s starting to smell really bad.” -- Rob Pike, 1991
  • 8. xterm... User Window Shell ASR-33
  • 9. Plan 9 • • 9P •
  • 10. • • open-read-write-close
  • 11. UNIX Kernel UFS UFS Interface Process Char Char Interface device Block Block Interface device
  • 12. ... UNIX UNIX • • UCB • GUI • X MIT
  • 13. Socket Other file Sysctl system Process Lotsa stuff! UFS VFS VFS sysfs Interface Char Char Interface device Block Block Interface device
  • 14. Kernel Server Server Process Interface Device
  • 15. Plan 9 9p2000 protocol Kernel Server (process) Server for email file system Process Interface Server (process) for local file system Device
  • 16. 9P version auth attach flush error walk open create read write clunk remove stat wstat
  • 17. UNIX I/O Plan 9 • I/F •
  • 18. Plan 9 UNIX root
  • 19. UNIX • 9P • proc • • rfork clone • • UTF-8
  • 20. i386 AMD64 ARM PowerPC SPARC • KVM QEMU Virtual Box VMWare Xen KVM lguest • MIPS
  • 21. UNIX Plan 9 • Plan9port • Plan 9 • v9fs • 9vx • Plan 9 • • Drawterm •
  • 22. 9vx Plan 9 Plan 9 Plan 9 1 a.out a.out a.out vx32 sandbox library Modified Plan 9 kernel Host OS (Linux, FreeBSD, MacOS X)
  • 23. 9vx TIPS • x86_64 Mercurial - http://code.google.com/p/vx32/ • Plan 9 % 9fs sources % cd /n/sources % @{cd plan9/386/lib && tar c .} | @{cd /386/lib && tar x}
  • 24. acme: • kencc: ANSI C • acid: • APE: POSIX
  • 25. man emacs(1) EMACS(1) NAME emacs - editor macros SYNOPSIS emacs [ options ] DESCRIPTION This page intentionally left blank. SOURCE MIT SEE ALSO sam(1), vi(1) BUGS Yes.
  • 26. kencc: rio/rio.c 58: enum 59: { 60: Cut, 61: Paste, 62: Snarf, 63: Plumb, 64: Send, 65: Scroll, 66: }; 67: C99 68: char *menu2str[] = { 69: [Cut] "cut", [Cut] = “cut”, 70: [Paste] "paste", 71: [Snarf] "snarf", 72: [Plumb] "plumb", 73: [Send] "send", 74: [Scroll] "scroll", 75: nil 76: };
  • 27. kencc: • Linux • rio/dat.h 107 struct Mousestate 108 { 109 Mouse; 110 ulong counter; 111 }; rio/wind.c 305: m = (Mousestate){w->mc.Mouse, w->mouse.counter};
  • 28. Hello, World! % cat hello.c #include <u.h> #include <libc.h> void main() { print(“Hello, World!n”); exits(nil); } % 8c hello.c % 8l -o hello hello.8 % hello
  • 29. % cat hello.c #include <u.h> #include <libc.h> void main() { print(“Hello, World!n”); exits(nil); } % 8c hello.c % 8l -o hello hello.8 % hello
  • 30. ANSI C/POSIX % cat hello.c #include <u.h> #include <libc.h> void main() { print(“Hello, World!n”); exits(nil); } % 8c hello.c % 8l -o hello hello.8 % hello
  • 31. % cat hello.c #include <u.h> #include <libc.h> void main() include/libc.h: { 1: #pragma lib “libc.a” print(“Hello, World!n”); 2: #pragma src “/sys/src/libc” exits(nil); } % 8c hello.c % 8l -o hello hello.8 % hello
  • 32. ./hello % cat hello.c #include <u.h> #include <libc.h> void main() { print(“Hello, World!n”); exits(nil); } % 8c hello.c % 8l -o hello hello.8 % hello
  • 33. % ls /env '*' boottime 'fn#sigexit' pid terminal 0 cflag font prompt timezone NPROC cputype fs rcname user apid ether0 home rootdir wctl auth facedom ifs service wsys bootargs fileserver objtype status bootfile 'fn#cpu%' path sysname % cat /env/path ./bin
  • 34. /bin % ns | grep /bin bind /386/bin /bin bind -a /rc/bin /bin bind -a /usr/oraccha/bin/rc /bin bind -a /usr/oraccha/bin/386 /bin ※Linux aufs unionfs
  • 35. % foo foo 151: suicide: sys: trap: page fault pc=0x00001025 % ps | grep foo glenda 151 0:00 0:00 8K Broken foo • acid(1) % acid 151 /proc/151/text: 386 plan 9 executable : acid: stk() • /proc import
  • 36. Plan 9 • Web http://plan9.bell-labs.com/ sources/plan9/sys/src/ • git git://github.com/ ericvh/plan-9.git sys -- src |-- 9 # kernel | |-- pc | `-- port |-- cmd # uesr command `-- libc # libc library
  • 37. Plan9 http://d.hatena.ne.jp/oraccha/