2006-03-01ãã1ã¶æéã®è¨äºä¸è¦§
ããã¹ã¦ã®è³æºã¯ãã¡ã¤ã«ãããé¡ç®ã§ãã£ããï¼ãã¡ã¤ã«ã«æ½è±¡åã§ããªãè³æºãå½ç¶åå¨ããï¼æ¬¡ã®è«æã«ã¯ï¼ä¸è¦ãã¡ã¤ã«ã«æ½è±¡åã§ãããã ãã©ï¼å©ä¾¿æ§ãªã©ãèãã¦ï¼æ念ãããã®ãä¸ã¤è¿°ã¹ããã¦ããï¼ããã¯ãããã¯ã¼ã¯ã¢ãã¬ã¹ï¼å ±æã¡ã¢ãªï¼ããâ¦
ã¡ãã£ã¨éãéãã¦ãã¾ã£ãï¼Plan9ã®ç¹å¾´ï¼å¼·åãªæ©è½ã®ä¸ã¤ãåå空éã§ããï¼åå空éã¨ã¯ç°¡åã«è¨ãã¨ååã¨ãã¡ã¤ã«ã対å¿ä»ããä»çµã¿ã§ãã*1ï¼ä½åº¦ãæ¸ãã¦ãããï¼Plan9ã¯ãã¹ã¦ã®è³æºããã¡ã¤ã«ã«æ½è±¡åãï¼(ãã¼ã«ã«ã§ããããªã¢ã¼ãã§ãããã«é¢â¦
setlabel/gotolabelã®ãã1ã¤ã®ä½¿ãéãã¨ã©ã¼å¦çã§ããï¼ã«ã¼ãã«ã®ããã«è¤éãªå¦çããã£ã¦ããã¨ï¼æ®éï¼ã¨ã©ã¼å¦çã¯ãã¹ããã¦ãã¾ãï¼ãããï¼åãã©ãã«ã«å¯¾ãã¦setlabelãå®è¡ããã¨ï¼åã®å¤ãæ¸ãæ½°ãã¦ãã¾ãï¼ããã§ï¼ã¨ã©ã¼å¦çç¨ã«errorï¼nexâ¦
Plan9é¢é£ã®ãã¼ã¸ãéãããã¨ãç®çã«ï¼ã¯ã¦ãªããã¯ãã¼ã¯ãå§ãã¦ã¿ãï¼
9fansã«æ稿ãããè¨äºã«ããã¨ï¼semacquire, semreleaseã¨å¼ã°ããã»ããã©æä½ã®ã·ã¹ãã ã³ã¼ã«ã追å ããããããï¼
setlabel/gotolabelã«ããã³ã«ã¼ãã³ã§ããã»ã¹ã¹ã¤ãããã¦ããç®æãè¦ããï¼ä»æ¥ã¯sleep/wakeupé¢æ°ãè¦ã¦ã¿ããã¨æãï¼sleepã§èªçºçã«å®è¡æ¨©ãæ¾æ£ããããã»ã¹ã¯ï¼ã¿ã¤ã ã¢ã¦ããªã©ã®æ¡ä»¶ãæç«ããã¨ï¼wakeupããï¼Readyç¶æ ã«å¾©å¸°ããï¼sleepã§ã¯ï¼â¦
æ°æ¥åã«acidã«ã¤ãã¦æ¸ããã¨ãï¼ãBrokenããã»ã¹ã¯ãã¤ã¾ã§æ®ã£ã¦ããã®ã ãããï¼ãã¨ããçåãæ®ã£ãï¼ããã§ï¼Brokenããã»ã¹å¨ãã«ã¤ãã¦èª¿ã¹ã¦ã¿ãï¼Brokenããã»ã¹ã«é¢ä¿ããããªã³ã¼ããæ¢ãã¦ãããï¼port/proc.cã«ï¼æ¬¡ã®ãããªã³ã¼ããè¦ã¤ãã£â¦
Plan9ã®ã¹ã±ã¸ã¥ã¼ãªã³ã°æ¹å¼ã¯åºæ¬çã«ã¯UNIXã¨åãåªå 度ã¤ãã©ã¦ã³ãããã³ã§ããï¼ãªã¢ã«ã¿ã¤ã ããã»ã¹ç¨ã«EDFã¹ã±ã¸ã¥ã¼ãªã³ã°ãå¯è½ã ãï¼ã¾ãã¯EDFã¯ç¡è¦ãã¦ï¼èªã¿é²ãããã¨æãï¼ åªå 度ã¯22ã¬ãã«ããï¼æä¸ä½ã®äºã¤ã¯EDFã¹ã±ã¸ã¥ã¼ãªã³ã°ç¨ã«äºâ¦
Plan9ã¯TSS(ã¿ã¤ã ã·ã§ã¢ãªã³ã°ã·ã¹ãã )ã§ããï¼ããã»ã¹ã¹ã±ã¸ã¥ã¼ãªã³ã°ã«å¯¾ããåºæ¬çãªèãã¯UNIXã¨åãã§ããï¼ããããã»ã¹ãåä½ãã¦ããã¨ãã«ï¼ã¿ã¤ãå²è¾¼ã¿ãªã©ã«ãã£ã¦ã«ã¼ãã«ã«åä½ãé·ç§»ãï¼ã¹ã±ã¸ã¥ã¼ã©ãèµ·åããï¼ããã»ã¹ãå ¥ãæ¿ãï¼ã¦â¦
acmeã®ä½¿ãæ¹ã«æ £ããããã«ãï¼acmeä¸ã§ã³ã¼ããèªãããã«ãã¦ãããã ãã©ï¼ã¡ãã£ã¨gonzuiãå³è¦ãã¦ã¿ãï¼ã¤ã³ã¹ãã¼ã«ããã®ã¯åãã¦ã ãã©ï¼ç°¡åï¼ æ©é使ãå§ãããï¼"fundef:setlabel"ã®ãããªã¢ã»ã³ããªã§å®ç¾©ããé¢æ°ã¯ãããããªããªãï¼Linuxã«â¦
æå¾ã«æåã®ããã»ã¹ãç«ã¡ä¸ããå¦çãè¦ã¦ã¿ããï¼ã«ã¼ãã«åæåã®æå¾ã«ï¼æåã®ããã»ã¹ãã¹ã±ã¸ã¥ã¼ãªã³ã°ããããã«ï¼schedinitãå¼ã°ããã®ã ãï¼ããã»ã¹ãåå¨ããªãå ´åã¯ï¼156è¡ç®ã®setlabelãå¼ã°ããªãã®ã§ï¼176è¡ç®ã®gotolabelã§é£ã³å ããªâ¦
ã¢ã³ãWindowsãªäººãããã°ï¼å½ç¶ã¢ã³ãUNIXãªäººãããï¼ãªã³ã©ã¤ã³ã§èªãã2ã¤ã®æç« ãç´¹ä»ãããï¼ã¢ã³ãã¨ããããã¯ï¼èªèçãªé°å²æ°ã ãï¼ 10 Things I Hate About (U)NIX Everything Is a File (Unless It Isn't) Everything Is Text No Introspectionâ¦
ã«ã¼ãã«ã®ã³ã¼ããèªã¿é²ããã«ã¯ï¼ã¢ã»ã³ããªã³ã¼ãã¯é¿ãã¦éããªãï¼èªãã®ã«æä½éå¿ è¦ãããªç¹ãæ¼ããã¦ãããï¼ Plan9ã®ã¢ã»ã³ãã©ã§ã¯ï¼PC(ããã°ã©ã ã«ã¦ã³ã¿)ï¼FP(ãã¬ã¼ã ãã¤ã³ã¿)ï¼SP(ã¹ã¿ãã¯ãã¤ã³ã¿)ï¼TOS(ããããªãã¹ã¿ãã¯ã¬ã¸ã¹ã¿)ï¼SBâ¦
ããã»ã¹ã®ç¶æ ã®è©±ãåºã¦ããã®ã§ï¼ã«ã¼ãã«ã®ã½ã¼ã¹ã³ã¼ããçºãå§ãã¦ã¿ããããªï¼ã¹ã±ã¸ã¥ã¼ã©ããèªã¿å§ããã®ã¯å²ã¨å®ç³ã ã(Plan9ã®å ´åã¯ãã£ã±ããã¡ã¤ã«ã·ã¹ãã ãããªããï¼ï¼ã¨ããæ°ã¯ããã)ï¼æåã«ã½ã¼ã¹ããªã¼ã®æ¦ç¥ã示ãã¨ï¼/sys/src/9以â¦
man psã«ããã¨ï¼ããã»ã¹ã«ã¯ï¼æ¬¡ã®ç¶æ ãããï¼UNIXããããã¶ãå¤ãããï¼ Moribund Process has exited and is about to have its resources reclaimed. Ready on the queue of processes ready to be run. Scheding about to be run. Running running. â¦
ã§ã¯ï¼è½ã¡ãæç¹ã®ããã¯ãã¬ã¼ã¹ãè¦ã¦ã¿ããï¼ã¢ã¿ãããããããã»ã¹ã®PIDãå¼æ°ã«acidãèµ·åããï¼stk()ã§ããã¯ãã¬ã¼ã¹ã表示ãããï¼libcã®_mainããmainãå¼ã°ãï¼fooã§æ¢ã¾ã£ã¦ããã®ããããï¼ term% acid 266 /proc/266/text:386 plan 9 executaâ¦
UNIXã§ããã°ã©ã ã«ãã°ãããï¼SEGVãèµ·ãããå ´åï¼é常ã¯ã¡ã¢ãªã¤ã¡ã¼ã¸ãã³ã¢ãã¡ã¤ã«ã«æ¸ãåºãããã®ã§ï¼ããããããã¬ã«é£ããã¦ï¼ãããã°ããï¼ã¾ãï¼æè¿ã®Linux distroã ã¨ã³ã¢åºåã¯ããã©ã«ãã§ç¡å¹ã«ãªã£ã¦ããã®ã§ï¼ulimitãå¤æ´ããå¿ è¦ãâ¦
ã¯ã¦ãªæ¥è¨ãå§ããåæ¥ã®ã¨ã³ããªã«ï¼ãªãPlan9ã«æ³¨ç®ããã®ãï¼ã¨æ¸ããã¨ãã¦çãæ¢ã¾ã£ã¦ããï¼é¢ä¿ãããããªã¨ããã§ï¼Ron Minnichæ°ã®Why Plan 9 is not dead yet And What we can learn from itãé¢ç½ãï¼ã©ã®ããã«UNIXã®ã³ã³ã»ãããå£ãå§ãï¼Plaâ¦
trussã©ã¤ãã©ãªã¯/sys/lib/acid/trussã§ããï¼ä¸è¦C風ã®è¨è¿°ã ï¼ defn truss() { local pc, lst, offset, prevpc, pcspret, ret; offset = trapoffset(); stop(pid); _stoprunning = 0; setuptruss(); pcspret = UPCSPRET(); while !_stoprunning do { contâ¦
UNIXã«ã¯ã·ã¹ãã ã³ã¼ã«ããã¬ã¼ã¹ããã³ãã³ãã¨ãã¦ï¼straceãktraceï¼trussãæä¾ããã¦ãã¦ï¼ããã°ã©ã ã®æåã調æ»ããã®ã«ä¾¿å©ãªã®ã ãï¼Plan9ã«ã¯ãããããã³ãã³ãããªãï¼trace(1)ã¨ããã³ãã³ãããããã©ï¼å¥ç©ã ï¼ããã§ä½¿ãã®ãacid(1)ã§ããâ¦
forkãããªãã¦rforkãã·ã¹ãã ã³ã¼ã«ãªãã ï¼rforkã¯Linuxã®clone(2)ã®ããã«ï¼ããã»ã¹çæããã¨ãï¼è¦ªåããã»ã¹éã§å ±æãããªã½ã¼ã¹ãæå®ã§ããï¼FreeBSDã®rforkãman rforkã«ããã¨ï¼Plan9ç±æ¥ã¨ã®ãã¨ï¼
ã£ã¦ã³ãã³ãããããã ãªãï¼ cpu% syscall write 1 hello 5 hellosyscall: return 5, no error
cpu% cd /sys/src/libc/9syscall cpu% cat sys.h #define SYSR1 0 #define _ERRSTR 1 #define BIND 2 #define CHDIR 3 #define CLOSE 4 #define DUP 5 #define ALARM 6 #define EXEC 7 #define EXITS 8 #define _FSESSION 9 #define FAUTH 10 #define _FSTATâ¦
Plan9ã®manã«ã¯ã½ã¼ã¹ã³ã¼ãã®ãã¹ãæ¸ãã¦ããï¼ ä¾ãã°ï¼echo(1)ã®manãè¦ãã¨ï¼SOURCEã¨ããé ç®ããã£ã¦ï¼/sys/src/cmd/echo.cã¨æ¸ããã¦ããï¼ cpu% man echo ECHO(1) ECHO(1) NAME echo - print arguments SYNOPSIS echo [ -n ] [ arg ... ] DESCRIPTIâ¦
2000å¹´ã«ã¦ã¿å¤§å¦ã§ï¼Rob Pikeæ°ãè¡ã£ãè¬æ¼ãSystem Software Research is Irrelevantãã¯ï¼ãããã示åã«å¯ãã§ãã¦é¢ç½ã(ãããã¼ãªå 容ã§ã¯ãªãã)ï¼ ãã¼ãã¦ã§ã¢ã¯ãã10å¹´ã§åçã«å¤ãã£ãã®ã«ï¼ã·ã¹ãã ã½ããã¦ã§ã¢ã¯ä½ãå¤ãã£ãï¼ èª°ãæ°ããOâ¦
Microsoft Researchã®å¤§å¾¡æButler Lampsonæ°ã1999å¹´ã®SOSPã§ã®è¬æ¼ãComputer Systems Research: Past and Futureãã§ï¼ãªãã·ã¹ãã ã½ããã¦ã§ã¢ç 究è ã¯Webãçã¿åºããã¨ãã§ããªãã£ãã®ãã¨ãã話ããã¦ããï¼çµå±ã¯ç 究ã¨ãã¸ãã¹ã®è§£é¢ãåé¡ã®æ ¹æ¬â¦
Plan9ã®ãã¡ã¤ã«ã·ã¹ãã ã«ã¯ï¼ãã¼ããªã³ã¯ãã·ã³ããªãã¯ãªã³ã¯ããªãï¼åå空éã®ãããã¸ã¯bindã使ã£ã¦åçã«å¤æ´ã§ããï¼ã¤ã¾ãï¼ãããã¸ã®æ å ±ã¯ãã¡ã¤ã«ã·ã¹ãã ã§ã¯ãªã*1ï¼ã«ã¼ãã«ãææ¡ãã¦ããï¼ç¾å¨ã®åå空éã®æ§æã¯nsã§èª¿ã¹ããã¨ãã§ããâ¦
find ããªãã®ã§ï¼duã§èª¿ã¹ã¦ã¿ãï¼ cpu% du -a /bin | grep ping 179 /bin/ip/gping 75 /bin/ip/pingã¨ãããã¨ã§ï¼ip/pingã¨å®è¡ããå¿ è¦ãããã¿ããï¼
ã²ãã£ã¨ãã¦ãã¹ãéã£ã¦ãªãï¼ã¨è³è£ããããï¼ããã§(ããå¼·å¼ã ãã©)ï¼Plan9ã«ãããç°å¢å¤æ°ã®æ±ãã調ã¹ã¦ã¿ãï¼Plan9ã¯ãã½ã¼ã¹ã¯ä½ã§ããã¡ã¤ã«ã¨ãã¦æ½è±¡åããã¨æ¸ãããï¼ç°å¢å¤æ°ãenvããã¤ã¹ã«ãã£ã¦åå空éã«ãããã³ã°ãããï¼/env以ä¸ãè¦â¦
ping(8)ã¯ãããã¯ã¼ã¯è¨ºæã«ã¯æ¬ ãããªãã³ãã³ãã§UNIXãWindowsã¯ãã¡ããï¼Plan9ã«ãåå¨ããã³ãã³ãã ï¼ã§ãï¼ç«¯æ«ããå®è¡ãã¦ã¿ãã¨ï¼ãããªã³ãã³ãã¯ãªãã¨æãããï¼ cpu% ping 12.34.56.78 ping: '/bin/ping' file does not exist