ç§ã¯çŽæããŸããããInfernoãã€ã³ã¹ããŒã«ããŠå®è¡ããæ¹æ³ã«é¢ããæçš¿ããŸã æžããŠããŸããã ç§ã¯ãããäžé£ã®èšäºã«ãŸãšããŸããããããã¯æåã®å ¥éç·šã§ãã åå空éã«ã€ããŠå°ãã話ããŸãã ããã¯OSã®éèŠãªéšåã§ãããPlan 9ããã³InfernoãçŸåšã³ã³ãã¥ãŒã¿ãŒã§å®è¡ãããŠãããã®ãšå€§ããç°ãªããã®ã®1ã€ã§ãã
ã€ã³ãã§ã«ãã¯ã»ãšãã©ç¥ãããŠããªãã®ã§ãç§ã¯åœŒå¥³ã«äŒéããã€ããã¯ãããŸããã Infernoã®äœ¿çšæ¹æ³ãšãInfernoãæ©èœããçç±ã説æããããã«ãæŽå²ãšå®è·µã®ã®ã£ãããçããæå©ããããããšæããŸãã
ç§ã¯å°ã暪ã«å€ããªããã°ãªããŸããã åå空éã®é²åã«ã€ããŠãæç³»åé ã§ã¯ãªããæ©èœã®éçºé ã§èª¬æãã次ã«Infernoã®æ©èœã®äœ¿çšæ¹æ³ã瀺ããŸãã
å 容
- ãã¹
- UnixãLinux
- ãã©ã³9ãã€ã³ãã§ã«ã
- ...ãŸãïŒ
- æåŸã«ãå
¥åã§ãããã®
- ã«ãŒãã¯ããŠã³ãããå¿ èŠã¯ãããŸãã
- mount -o loopããã³FUSEã¯äžèŠã§ã
- ã«ãŒãã«ãã©ã€ããŒã¯äžèŠ
- chrootã¯å¿ èŠãããŸãã
- Simlinkã¯äžèŠ
- ãœãããŠã§ã¢ãã€ã³ã¹ããŒã«ããããã«ã$ PATHã$ LDPATHããã³ã«ãŒãæš©éã¯å¿ èŠãããŸãã
- NFSã¯å¿ èŠãããŸãã
- 匷åãªããªããã£ãã¯ã決ããŠåŸæããªãããšãæå³ããŸã
- æªæ¥ã®ã©ãã
- ç¶ã
ãã¹
DOSãèŠããŠããŸããïŒ AïŒãšB :ããã©ã€ãããããŸããã C :ãããŒããã©ã€ããªã©ã ãããã®åãã©ã€ãã«ãã£ã¬ã¯ããªéå±€ããããŸããã ïŒäžå¿ èŠãªè©³çŽ°ã¯çç¥ããŸããïŒéã«çµã³ä»ããããããã©ããã§äžäœã®1æåã®åå空éãšèããããšãã§ããŸãã 1ãã©ã€ã-1æåã
UnixãLinux
ããããUnixã§ã¯ããããã¬ãã«ã®ãã£ã¬ã¯ããªã/ãããããŸããã ã«ãŒããã£ã¹ã¯ãããã«ããŠã³ããããä»ã®ãã¹ãŠã®ãã£ã¹ã¯ã¯ã«ãŒããã£ã¬ã¯ããªã®ãµããã£ã¬ã¯ããªããµããã£ã¬ã¯ããªã®ãµããã£ã¬ã¯ããªã«ããŠã³ããããŸãã-ãã®ãã£ã¹ã¯ã衚瀺ããŸããïŒ ã·ã¹ãã ã®ã»ããã¢ããã«é¢äžããŠããããããããã®ããŒãã£ã·ã§ã³ã®ç©ºã容éãäžè¶³ããŠããªãéããã©ã®ããŒãã£ã·ã§ã³ãŸãã¯ãã£ã¹ã¯ãç¥ãå¿ èŠã¯ãããŸããã ããã¯ãOSå šäœã«å ±éã®éå±€çãªåå空éãšèããããšãã§ããŸãã
ããã¯ãã¯ããã«æè»ã§åŒ·åãªã¢ãããŒãã§ãã ããã°ã©ã ãšãŠãŒã¶ãŒã¯ãã©ã®ãã©ã€ãã®å 容ãç¥ãå¿ èŠã¯ãããŸããã
ãã®åŸãæ°ããã¿ã€ãã®ãã¡ã€ã«ã·ã¹ãã ãUnixã«ç»å ŽããŸããïŒåæã ããšãã°ã/ procã Linuxã«ã¯/ sysãããã/ devãåæãã¡ã€ã«ã·ã¹ãã ãæã€ããšãçãããããŸããã ãããã®ãã¡ã€ã«ã·ã¹ãã ã®ãã¡ã€ã«ãæ ŒçŽãããç©çãã£ã¹ã¯ã¯ãããŸããããããã§ããããã°ã©ã ã¯ããã«ã€ããŠäœãç¥ãå¿ èŠã¯ãããŸããã ãã¡ã€ã«ã¯ä»ã®ãã¡ã€ã«ãšåæ§ã«åå空éã§è¡šç€ºããããããã®ãã¡ã€ã«ã·ã¹ãã ã§ãã¡ã€ã«ãèªã¿æžãã§ããããã«ããã°ã©ã ãå€æŽããå¿ èŠã¯ãããŸããã
ããæå³ã§ã¯ããããã®éã«ãã¡ã€ã«ã·ã¹ãã ããããéåžžã¯ãã£ã¹ã¯ã«ãã¡ã€ã«ãä¿åããŸããããŠãŒã¶ãŒã¯ãããããããç¥ãããšã蚌æããããšãã§ããŸããã ããšãã°ãNFSã¯ãã¡ã€ã«ãšãã£ã¬ã¯ããªã®éå±€ãå«ããªã¢ãŒããµãŒãã¹ã§ãã
次ã¯FUSE㧠ããŠãŒã¶ãŒç©ºéã«ãã¡ã€ã«ã·ã¹ãã ãæäŸããŸãã FUSEã䜿çšããŠããŒã«ã«OSã«ãŒãã«ãšå¯Ÿè©±ãããã©ã€ããŒã®äœæ察象ãå®è£ ãããšãOSã«ãŒãã«ã®å®éã®ãã©ã€ããŒãäœæããããšãªããä»»æã®åæãã¡ã€ã«ã·ã¹ãã ã®ãµãŒãã¹ãäœæã§ããŸãã ïŒç§ã¯BSDãæ¥ãã§ããŸã; DragonFlyã¯ããã€ãã®èå³æ·±ãã¢ã€ãã¢ãéçºããŸããããPlan 9ããã¯æ©èœãå°ãªãã£ãããã§ããïŒ
äžæ¹ãåå空éã¯ã·ã¹ãã å šäœã«å ±éããŠãããããå€æŽããã«ã¯rootã«ãªãå¿ èŠããããŸãã ã©ã³ãã ãªãŠãŒã¶ãŒã/ sbinã®äžã«äœããããŠã³ãããããã«umountã³ãã³ããæšãŠããšããŸãã ã«ã¹ã¿ã ããŠã³ãã¯ãã€ããŒãªäŸå€ã§ãããããæå³ã§ã¯æ ¹æ¬çã«äœãå€æŽããªãæŸèæã§ããFUSEãã¡ã€ã«ã·ã¹ãã ã¯ä»»æã®_ your_ãã£ã¬ã¯ããªã«ããŠã³ãã§ããŸãã ïŒãšããã§ãLinuxã«ã¯Plan 9ãšInfernoã§äœ¿çšããããããã³ã«ã§ãã9P2000ã®ãã©ã€ããŒããããŸããïŒ
以åã¯ããã¡ã€ã«ã·ã¹ãã ã¯1ãæã«ããããŠã³ãã§ããŸããã§ããã Linuxã®ããã€ã³ãããŠã³ããã¯ããå°ãæè»æ§ãæäŸããŸãããã¡ã€ã«ã·ã¹ãã ïŒãŸãã¯ãã®äžéšïŒãããŒã ã¹ããŒã¹ã®ã©ããã§ãã§ã«å©çšå¯èœãªå Žåã
mount --bind
ä»ããŠå¥ã®å Žæã«æ¥ç¶ã§ããŸãã ããã¯æ¯èŒçæè¿è¿œå ããããã®ã§ããã2.6.26ã«ãŒãã«ä»¥åã§ã¯ãåããã¡ã€ã«ã·ã¹ãã ã1ã€ã®å Žæã§èªã¿åã/æžã蟌ã¿ã¢ãŒãã§ããŠã³ãããåæã«å¥ã®å Žæã§èªã¿åãå°çšã¢ãŒãã§ããŠã³ãããããšã¯ã§ããŸããã§ããã
ãã©ã³9ãã€ã³ãã§ã«ã
Plan 9ãšInfernoã¯ãæŽå²çãªUnixã»ãã³ãã£ã¯ã¹ã®ããã€ãã®å€§ããªãã£ã³ã¯ãåãåºãããããããŠã£ã³ããŠããé€å€ããäž»èŠãªOSã®ä»®å®ã®ããã€ããæšãŠãŸããã ç§ã¯ä»ã€ã³ãã§ã«ãã«ã€ããŠè©±ããŠããŸãããããã®ã»ãšãã©ãã¹ãŠããã©ã³9ã«ãåœãŠã¯ãŸããŸãïŒãããŠæåã«ç»å ŽããŸããïŒããã€ã³ãã§ã«ãããšèšããšããããšãã©ã³9ãã«æ¬åŒ§ã§å®å šã«è¿œå ã§ããŸãã ãããã®ä»®å®ã¯ç¹å®ã®é åºã§ç€ºããããã®ã§ã¯ãªãã䟿å®äžçªå·ãä»ããã ãã§ãã
æåã®ä»®å®ã¯ãæãç°¡åã«ç Žããããããæ¯ãè¿ã£ãŠã¿ããšæãæçœã§ããããåå空éã®ãã¡ã€ã«ãšãã£ã¬ã¯ããªã¯ãã£ã¹ã¯äžã®ãªããžã§ã¯ããè¡šããŠãããšããããšã§ãã
2çªç®ã®ä»®å®ã¯ããã¡ã€ã«ã·ã¹ãã ãšããŠã³ããã€ã³ãã®éã«1察1ã®é¢ä¿ããããšããããšã§ãã ã€ãŸã ãã®ãã¡ã€ã«ã·ã¹ãã ã¯1ãæã§ã®ã¿æ¥ç¶ããããã®1ã€ã®ãã¡ã€ã«ã·ã¹ãã ã®ã¿ããã®å Žæã«æ¥ç¶ãããŠããããšã ãã®ä»®å®ãåãé€ããšã¯ããã¡ã€ã«ã·ã¹ãã ãšãããæ¥ç¶ãããŠããå Žæãäºãã«ç¬ç«ããŠãããåãå Žæã«ä»»æã®æ°ã®ãã¡ã€ã«ã·ã¹ãã ãæ¥ç¶ã§ããããšãæå³ããŸãã
3çªç®ã®åæã¯ãå®è¡äžã®ã·ã¹ãã ãšåå空éã®éã«1察1ã®é¢ä¿ããããšããããšã§ãã åå空éã®å€æŽãåå空éãšãã®åå«ãå€æŽããããã»ã¹ã«ã®ã¿è¡šç€ºãããå Žåãä»ã®ãŠãŒã¶ãŒãè¡ã£ãåå空éã®å€æŽãããŠãŒã¶ãŒãä¿è·ããå¿ èŠã¯ãããŸããã ãŠãŒã¶ãŒããã¡ã€ã«ã·ã¹ãã ãèªã¿åã£ãŠããŠã³ãããæš©å©ãæã£ãŠããã ãã§ååã§ãã
åå空éã«é¢ãããããã®ä»®å®ãæšãŠãããšã«ãããã¯ããã«åŒ·åãªã·ã¹ãã ãåŸãããšãå¯èœã«ãªãããã®éãã¯äžèŠãããšããã»ã©ã¯ã£ãããšã¯èŠããªããããããŸããããå®éã«ã¯DOSãšUnixåå空éã®éããšåãããã倧ããã§ãã
ãããã®3ã€ã®åæã¯ãUnixã©ã€ã¯ãªãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ã¯ããŸããŸãªçšåºŠã«éåããæåã®åºŠåãã«ã¯ããŸããŸãªéåããããŸããã æåã®ä»®å®ã¯ãUnixã§ã¯æ£åžžã«ç ŽãããŸããã ããšãã°ãã»ãšãã©ãã¹ãŠã®Unixã«/ procããããŸãã FUSEã䜿çšãããšããŠãŒã¶ãŒã¯ãã¡ã€ã«ã·ã¹ãã ãããŠã³ãã§ããä»ã®ãŠãŒã¶ãŒãããã¡ã€ã«ã·ã¹ãã ãé ãããšãã§ããŸãïŒãã¡ããçæ³çã§ã¯ãããŸããïŒã ãã€ã³ãããŠã³ãã«ãããããŒã ã¹ããŒã¹ã®äžéšãå¥ã®å Žæã«è¡šç€ºãããããã«ãªãã2çªç®ã®ä»®å®ã«éåããŸãããã«ãŒããå¿ èŠã«ãªããŸãã ãŠããªã³ããŠã³ãã¯ãUnixãžã®éãé²ãã§ããŸãã ããããæåã®ä»®å®ãé€ããŠããããã®ãœãªã¥ãŒã·ã§ã³ã¯ãã¹ãŠå®å šã§ã¯ãããŸããã Unixã®è·ç©ãéã°ãã«æåããå§ãããã©ããªãã§ããããïŒ
åããã»ã¹ã®åå空éã«ã¯ç¬èªã®ïŒæ£ç¢ºã«ã¯ãã©ã®ããã»ã¹ãåå空éããã©ãŒã¯ã§ããŸããããã©ãŒã¯ããå¿ èŠã¯ãããŸããïŒã®ã§ã誰ã§ãåé¡ãªããã©ãã§ãäœã§ãããŠã³ããŸãã¯æ¥ç¶ïŒãã€ã³ãïŒã§ããŸãã»ãã¥ãªãã£ã ããŠã³ããã€ã³ãã«ã¯ä»»æã®æ°ã®ããŠã³ããããã·ã¹ãã ãå«ããããšãã§ãããã¹ãŠã«åæã«ã¢ã¯ã»ã¹ã§ããããããããã¡ã€ã«ã·ã¹ãã ãå¥ã®ãã¡ã€ã«ã·ã¹ãã ã«ãªãŒããŒã¬ã€ããããšãå¯èœã«ãªããŸãã é©åãªãããã³ã«ïŒInfernoã®å Žåã¯9P2000ïŒã䜿çšããŠããéãã©ã®ãã¡ã€ã«ã·ã¹ãã ããæ¬ç©ããŸãã¯ãåæãã§ãããããäœã§ããã¡ã€ã«ã·ã¹ãã ã§ããããã¡ã€ã«ãåŠçããããã°ã©ã ã¯ããã䜿çšã§ããŸãã
ãããã³ã°ãŸãã¯äžæ£ãªãœãªã¥ãŒã·ã§ã³ã®å€ãã¯ãäžèŠã«ãªã£ããããçªç¶æ¶ããŸãã æããã«ãsudoã®ããã«ãrootã«å§ä»»ããããã®ã®å€ãã¯ãã¯ãå¿ èŠãããŸããã chrootã¯äžèŠã«ãªããŸããã ã·ã³ããªãã¯ãªã³ã¯ã¯å¿ èŠãããŸããã OSã®ã«ãŒãã«ã«çµã¿èŸŒãŸããèšå€§ãªæ°ã®ãã©ã€ããŒã¯å¿ èŠãããŸããã NSFããã³/ etc /ã®ãšã¯ã¹ããŒãã¯å¿ èŠãããŸããïŒè¯ãä¹ãå¿å°ïŒã
mount -o loop
äžèŠã§ãã
mount --bind
å¿ èŠ
mount --bind
ãŸããã FUSEã¯å¿ èŠãããŸããã $ PATHã§ããäžèŠã«ãªãããœãããŠã§ã¢ãã€ã³ã¹ããŒã«ããããã«rootã«ãªãå¿ èŠããããŸãã
...ãŸãïŒ
InfernoïŒããã³Plan 9ïŒã®ããã¥ã¡ã³ãã§ç§ãæ©ãŸããŠããããšã®1ã€ã¯ãç§åŠèšäºãããã¥ã¢ã«ããŒãžããœãŒã¹ã³ãŒãããããŸãããããŠããŒã®æç§æžãããã¥ã¡ã³ãã¯ã»ãšãã©ãªãããšã§ãã ãã¶ãã HOWTOã®ã³ãŒããŒã®äœãæ¹ã«ä»å±ããŠããLinuxã«çãããããŠããŸãã å§ããã®ã¯ç°¡åãªäœæ¥ã§ã¯ãããŸãããç¹ã«ãã·ã¹ãã ã«ã€ããŠååãªç¥èããªããŠãã·ã¹ãã ã䜿ã£ãŠèªåã§å匷ããã®ãé£ããå Žåã§ãã è©ŠããŠã¿ãŸããããªãã¿ã®ãªãã³ãã³ããå®è¡ãããªãã¿ã®ãªãã·ã§ã«ãããããªãã¡ã¬ã³ã¹ãšããŠæžããããã³ããŒãžã¯ããŸã圹ã«ç«ã¡ãŸããã
ããã§ãããŸãïŒ ä»¥åã«é åçãªçŽæãèããããšããããŸãã ãããã©ã®ããã«äœ¿çšã§ããŸããïŒããããŠããããããã€ãã®å ·äœçãªäŸãšçµã¿åãããŠãäœãèµ·ãã£ãŠããã®ãã説æããŸãã
æåŸã«ãå ¥åã§ãããã®
äžèŠã«ãªã£ãããããã¹ãŠã®ãã®ãèŠããŠããŸããïŒ ãããã®ããããã¯ãããè¯ããã®ã«çœ®ãæããããŠããããããã®ããã€ãã¯ãããããããåªããããã€ãã®ãã®ã«çœ®ãæããããŠããŸãã ãããã®äŸã§ã¯èªèšŒãç¡èŠããã€ããã§ãïŒç°¡åã«ããããïŒããInfernoã§èªèšŒãšæå·åã®æ¹æ³ãéžæã§ãããšèšããŸãã
ã«ãŒãã¯ããŠã³ãããå¿ èŠã¯ãããŸãã
ãšãŠãç°¡åã§ãïŒ
bind '#p' /n/prog
ããã«ããã/ n / progã«progãã¡ã€ã«ã·ã¹ãã ïŒ/ procã«é¡äŒŒïŒãããŠã³ããããŸãã ã¡ãªã¿ã«ãUnixã®å Žåãšåæ§ã«ã/ progãã¡ã€ã«ã·ã¹ãã ãä»ããŠããã»ã¹ãå®è¡ããããšã§éåžžè¡ããããã¹ãŠã管çããããã°ãããã³å®è¡ã§ããŸãã éãã¯ããªã¢ãŒããã·ã³ãããŒã«ã«ã§ããŠã³ã/ããã°ã¬ããå Žåããªã¢ãŒãããã»ã¹ã§ãããã®ãã¹ãŠãå®è¡ã§ããããšã§ããsshã䜿çšããããªã¢ãŒããã·ã³ã§ãããã¬ãå®è¡ããå¿ èŠããããŸããã ã¯ãã
kill 15
ããŒã«ã«ã§å®è¡ã§ããŸããããã«ããããªã¢ãŒããã·ã³ã§ããã»ã¹15ã匷å¶çµäºãããŸãã
mount -o loopããã³FUSEã¯äžèŠã§ã
ã³ã³ãã¥ãŒã¿ãŒã«å€æ°ã®.isoãã¡ã€ã«ããããŸãã ãããã/ n / cdsã«ããããã®ãã¡ã®1ã€ãæ¥ç¶ããããšããŸãïŒ
; 9660srv /n/cds/dfly-i386-3.0.2_REL.iso /n/dfly ; ls /n/dfly
çŸåšãçŸåšã®ããã»ã¹ãšãã®åå«ã¯ãã®CDã®å 容ãèŠãããšãã§ããŸãã ç¹å¥ãªãã®ã¯å¿ èŠãããŸããã 9660srvïŒ4ïŒã¯ãäžæ¹ã§ISO-9660ãã¡ã€ã«ã·ã¹ãã ãèªã¿åãæ¹æ³ãç¥ã£ãŠãããä»æ¹ã§9P2000ãããã³ã«ããµããŒãããŠããŸãã
Infernoã«ã¯ãããšãã°tarã¢ãŒã«ã€ããèªã¿åãå°çšãã¡ã€ã«ã·ã¹ãã ãšããŠæ±ãtarfsïŒ4ïŒããã³ãã«ãããŠããŸãã
ã«ãŒãã«ãã©ã€ããŒã¯äžèŠ
ãŸããã»ãšãã©ã ãã¡ã€ã«ã·ã¹ãã ããšã¯ã¹ããŒãããã ãã§ã¯ãªããæçµçã«ioctlïŒïŒãå¿ããããšãã§ããŸãã ã«ãŒãã«ã«ãã£ãŠæäŸããããã©ã€ããŒã¯/ dev / driversãã¡ã€ã«ã§ç¢ºèªã§ããŸããããã¯ããªãçããªã¹ãã§ãäžè¬çãªUbuntuãŸãã¯Archãã·ã³ã§ã®
lsmod
ã®åºåãããçããã®ã§ãã
ã»ãšãã©ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§æ°ãããã¡ã€ã«ã·ã¹ãã ããµããŒãããã«ãŒãã«ãã©ã€ããŒãå¿ èŠãªå ŽåãInfernoã¯modprobeïŒã€ãŸãã«ãŒãïŒãå¿ èŠãšãããã«ãŒãã«ã«è§ŠããŠæ°ãããã¡ã€ã«ã·ã¹ãã ãè¿œå ããŸããã äžèšã®äŸã§ã«ãŒãã«ãISO-9660ãç¥ãå¿ èŠããªãã£ãããã«ã ext2fsãããŠã³ããŒãããããšã§ext2ïŒèªã¿åãå°çšïŒãµããŒããååŸã§ããŸãã
chrootã¯å¿ èŠãããŸãã
ããã»ã¹ã¯ããèªäœã®åå空éãäœæã§ãããããä¿¡é Œã§ããªãããã»ã¹ã«è¡šç€ºããã®ã«å±éºãªãã®ã¯ãã¹ãŠåå空éããã¢ã³ããŠã³ãã§ãã pctlïŒ2ïŒã·ã¹ãã ã³ãŒã«ã䜿çšããŠããã»ã¹ããã©ã€ããŒãããŠã³ãããªãããã«ããããšãã§ããŸãã ãã¹ãŠãã¢ã³ããŠã³ãããããšãã極端ãªäŸïŒãããã£ãŠãçµã¿èŸŒã¿ã®ã·ã§ã«æ©èœã䜿çšãã以å€ã«ã¯äœãã§ããŸããïŒïŒ
; load std ; pctl newns ; pctl nodevs ; unmount / ; ls / sh: ls: './ls' file does not exist
ãã¡ãããäœã䟿å©ãªãã®ãå¿ èŠãªå Žåã¯ãåã«ãã¹ãŠãã¢ã³ããŠã³ããããããå°ãæ éã«è¡åããå¿ èŠããããŸãããã¢ã€ãã¢èªäœã¯åçŽã§ãã
å¿ èŠã«å¿ããŠãã«ãŒããã£ã¬ã¯ããªã®äžã«ããã¡ã¢ãªã«ãã¡ã€ã«ã·ã¹ãã ãããŠã³ãããŠãäžæçãªãµã³ãããã¯ã¹ãäœæããããšãã§ããŸãã
; mount -bc {memfs -s} / ; echo Mad with power! > /asdf
ãããŠããã¡ããã/ asdfã¯ã©ãã«ã衚瀺ãããŸããã ïŒããã¯ãæ°ãããã¡ã€ã«ã®äœæã«ã®ã¿é©çšãããããšã«æ³šæããŠãã ãããïŒ
Simlinkã¯äžèŠ
bindã¯ãããã€ãã®ãã£ã¬ã¯ããªãä»ã®ãã£ã¬ã¯ããªã®äžã«çœ®ãæ©èœãæäŸããããšã«ããããã®åé¡ã解決ããŸãã ããšãã°ãç§ã¯tinytkã¢ã€ã³ã³ãããã©ã«ãã¢ã€ã³ã³ãããå€ãèšå®ãããŠããã®ã奜ããªã®ã§ããŠã£ã³ããŠãããŒãžã£ãèµ·åããåã«ããã©ã«ãã¢ã€ã³ã³ããªãŒããŒã©ã€ãããŸãã
; bind -bc /icons/tinytk /icons/tk
ãããã¡ã€ã«ãå¥ã®ãã¡ã€ã«ã®äžã«çœ®ãããšãã§ããŸãïŒ
; echo Hello > some-file ; bind some-file /NOTICE ; cat /NOTICE Hello
Infernoã§ã¯ã·ã³ããªãã¯ãªã³ã¯ã¯äžèŠã§ãããååšããªãããããã¡ã€ã«ã·ã¹ãã ã®åŸªç°åç §ã®åé¡ã¯ã»ãšãã©ãªããªããŸãã
$ PATHã$ LDPATHãããã³ã«ãŒãæš©éã¯ãœãããŠã§ã¢ã®ã€ã³ã¹ããŒã«ã«å¿ èŠãããŸãã
ç§ã¯$ PATHããããã®ãå«ãã§ãã ç§ã®.bashrcã®å€§ããªéšåã¯ã誰ãæåã«è¡ãããç解ããããšã§ãããåé·ãªãã¹ãä»ã®ã¢ãŒããã¯ãã£ã®ãã€ããªãæããã¹ãè¿œå ããããšã§ã¯ãããŸããã Plan 9 Portãã€ã³ã¹ããŒã«ããŠããŸãããããšãã°ãPlan 9 manããŒãžã§ã³ãLinuxããŒãžã§ã³ãšç«¶åããããšã¯æãŸãããããŸããã
Infernoã§ã¯ãå®è¡ãããã®ã¯ãã¹ãŠ/ disïŒPlan 9ã®/ binïŒã«ãããŸãã å¥ã®å Žæããããã°ã©ã ãå®è¡ããå Žåã¯ãåã«/ disã®ååŸã«ãã©ã°ã€ã³ããŸãã
; bind -bc $home/dis /dis
ãããã£ãŠãäœããã€ã³ã¹ããŒã«ããããã/ disã«æžã蟌ããªãå Žåã¯ã奜ããªå Žæã«ã€ã³ã¹ããŒã«ãã/ disã®äžã«ãã©ã°ã€ã³ããŸãã sudoã¯å¿ èŠãããŸããã / libãš/ moduleã«ã€ããŠãåãããšãèšããŸãã
NFSã¯å¿ èŠãããŸãã
èªèšŒïŒ-Aãã©ã°ïŒãšæå·åãç¡èŠããã®ã§ãéèŠã§ã¯ãªããã®ããšã¯ã¹ããŒãããŸãïŒåã³memfsïŒ4ïŒ ã æåã®è»ïŒ
; mount -c {memfs -s} /n/mem ; echo something > /n/mem/asdf ; listen -A 'tcp!*!1234' { export /n/mem & }
2å°ç®ã®è»ïŒ
; mount -A 'tcp!thefirstmachine!1234' /n/remotememfs ; cat /n/remotememfs/asdf something
ã»ãšãã©ã®ãã¡ã€ã«ãµãŒããŒã³ãã³ãã¯ãããŠã³ããã€ã³ãã«æ¥ç¶ãã代ããã«stdin / stdoutãä»ããŠåäœã§ããããããã¡ã€ã«ã·ã¹ãã ããããã¯ãŒã¯äžã§ã¢ã¯ã»ã¹å¯èœã«ããããã«ããŒã«ã«ã«ããŠã³ãããå¿ èŠãããããŸããã
; styxlisten -A 'tcp!*!1234' {memfs -s}
ãããŠã2çªç®ã®ãã·ã³ã§ïŒ
; mount -Ac 'tcp!thefirstmachine!1234' /n/remotememfs
listenïŒ1ïŒããã³dialïŒ1ïŒã³ãã³ãã¯ãInfernoã®ãããã¯ãŒã¯ã€ã³ã¿ãŒãã§ã€ã¹ã§ãã/ netãã¡ã€ã«ã·ã¹ãã ãšå¯Ÿè©±ããããã®äŸ¿å©ãªã©ãããŒã§ãã Unixãœã±ããã¯ãBSDãœã±ããã©ã€ãã©ãªïŒå¯Ÿå¿ããã·ã¹ãã ã³ãŒã«ïŒã«ãã£ãŠåŠçããã䜿çšãã¯ããã«å°é£ã§ãã listenãšdialã¯ãnetcatã®åçç©ãšèããããšãã§ããŸãã styxlistenãåãã§ããã€ãã¹ããªãŒã ã®ä»£ããã«9P2000ãããã³ã«ïŒãã©ã³9ã§åãå ¥ãããããŸã§StyxãšãåŒã°ããïŒã®ã¿ãéä¿¡ããããšãæ³å®ããŠããŸãã
匷åãªããªããã£ãã¯ã決ããŠåŸæããªãããšãæå³ããŸã
ããã¯ãã¹ãŠãInfernoã·ã¹ãã ã³ãŒã«ã®åãªãã©ãããŒã§ããããã€ãã®çãã³ãã³ãã§å®çŸãããŸãã bindïŒ1ïŒãmountïŒ1ïŒãããã³unmountïŒ1ïŒããããŸãã ã€ã³ããã¹ãã¯ã·ã§ã³ãå¿ èŠãªå Žåã¯ã nsïŒ1ïŒã圹ç«ã¡ãŸãã
ãã¹ãŠã®OSãªããžã§ã¯ãããã¡ã€ã«ã·ã¹ãã ãšããŠè¡šçŸãããšããããšã¯ãcatãsedãechoãªã©ã®ããã°ã©ã ã䜿çšããŠãããšãã°ipïŒ3ïŒãã¡ã€ã«ã·ã¹ãã ã䜿çšããŠãããã¯ãŒã¯ã«ã¢ã¯ã»ã¹ã§ããããšãæå³ããŸãã ftpfsïŒ4ïŒã䜿çšãããšã察話åã¯ã©ã€ã¢ã³ããªãã§lsããã³cpã䜿çšã§ãããããã¹ã¯ãªããã®èšè¿°ãç°¡åã«ãªããŸãïŒFTPã¯ã©ã€ã¢ã³ããä»ãããªãã€ã¬ã¯ãã®å¿ èŠã¯ãããŸããïŒã å®éãã¹ã¯ãªããã¯éåžžããã£ã¹ã¯äžã®éåžžã®ãã¡ã€ã«ã§ã¯ãªãFTPãµãŒããŒã§åäœããããšãç¥ãå¿ èŠã¯ãããŸããã zipfsã䜿çšãããšã.zipãã¡ã€ã«ãããŠã³ãã§ããŸãã ããããçµã¿åããããšãFTPãµãŒããŒäžã®.zipå ã«ãã.isoãããŠã³ãããããããåã ã®ãã¡ã€ã«ãã³ããŒã§ããŸãã
æªæ¥ã®ã©ãã
ç§ãã¡ã¯ãã§ã«èå³æ·±ããã€ã³ãã«ããŸãã 人å£ã®ã»ãšãã©ã¯å°ãªããšãã©ããããããšã¹ããŒããã©ã³ãææããŠããããã®ãã¡ã®ã»ãšãã©ã¯èªå® ã®ã³ã³ãã¥ãŒã¿ãŒãææããŠãããè·å Žã®ã³ã³ãã¥ãŒã¿ãŒãã¿ãã¬ãããªã©ãææããŠããŸãã Unixã®å šçæã«ã¯ã1å°ã®ã³ã³ãã¥ãŒã¿ãŒãšå€ãã®ãŠãŒã¶ãŒãããŸããã ããã¯åœããåã®ããã«æããŸãããäžè¬çãªã±ãŒã¹ã§ã¯ã1人ã®ãŠãŒã¶ãŒãå€æ°ã®ã³ã³ãã¥ãŒã¿ãŒã䜿çšãããã®éã¯ã§ããªããšããç¶æ³ã«ããã«è¿ã¥ããŠããŸãã
ããããã¹ãŠã®ãªãœãŒã¹ïŒç¹ã«ãã£ã¹ã¯ãšCPUïŒã®ç®¡çã¯ããã§ã«å€§ããªåé¡ã§ãã ãã¡ã€ã«ã®åæãé£çµ¡å ã®åæãªã© é»è©±ã«äœããåŠçããã®ã«ååãªãªãœãŒã¹ããªãå Žåã¯ãéåžžã®ã³ã³ãã¥ãŒã¿ãŒã«ïŒç©ççã«ãŸãã¯sshçµç±ã§ïŒã¢ã¯ã»ã¹ããå¿ èŠããããŸãã ã¹ããŒããã©ã³ã§æ ç»ãèŠããå Žåã¯ãããã«ã³ããŒããå¿ èŠããããŸãã æºåž¯é»è©±ã§èšäºãèªãã§ãã©ãããããã§èªã¿ç¶ããããšã«ããå Žåã¯ã©ãããŸããïŒ èªåã«ã¡ãŒã«ãŸãã¯IMãéä¿¡ããŸããïŒ ïŒããã¯DBUSãããåªããŠããŸãããããã¯äœè«ã§ããïŒ
ãããç¶ããšã¯æããªãã äžæçãªè§£æ±ºçãšããŠããã¹ãŠã®ããŒã¿ãGoogleãFacebookããŸãã¯ãã¯ã©ãŠãããµãŒãã¹ã«æäŸã§ããŸããããã®ãããªè§£æ±ºçã«ã¯å€ãã®èŠæãæ®ãããŸãïŒãããŠãçç±ããªã¹ãããããšã¯å¥ã®äœè«ã§ãïŒã
ã³ã³ãã¥ãŒãã£ã³ã°ãªãœãŒã¹ã管çããããããã¹ãŠã®ãã·ã³ïŒããŒã«ã«ããã³ãªã¢ãŒãïŒãçµã¿åããããšããåé¡ã«å¯ŸãããœãããŠã§ã¢ãœãªã¥ãŒã·ã§ã³ã¯é¿ããããŸããã å°ãªããšãçŸæç¹ã§ã¯ãããããã¹ãŠå¯èœã«ãããã©ãããã©ãŒã ã®åœ¹å²ã®æè¯ã®åè£ãšããŠãInfernoãèããŠããŸãã ãã®ã·ã¹ãã ãçªç¶ãã®ã·ã¹ãã ã«æãããçç±ãå®å šã«èª¬æããŠããªãå Žåã¯ãå°ãªããšãéšåçã«ã¯ããããŠããŸãã
ç¶ã
ãã®èª¬æã¯éåžžã«è¡šé¢çãªãã®ã§ãã ããã¹ãŠããã¡ã€ã«ã·ã¹ãã ãã¯ãInfernoãæ§ç¯ããåªããã¢ã€ãã¢ã®1ã€ã«ãããŸããã