|-- dev |-- etc |-- home |-- initrd.img -> boot/initrd.img-4.4.0-142-generic |-- initrd.img.old -> boot/initrd.img-4.4.0-141-generic |-- lib |-- lib64 |-- media |-- mnt |-- opt |-- proc |-- root |-- run |-- sbin |-- snap |-- srv |-- sys |-- tmp |-- usr |-- var |-- vmlinuz -> boot/vmlinuz-4.4.0-142-generic `-- vmlinuz.old -> boot/vmlinuz-4.4.0-141-generic 20 directories, 4 files $ http://www.pathname.com/fhs/ より Directory Description bin Essential command binaries boot Static files of the boot loader dev Device files etc Host-specific system configuration lib Essential shared libraries and kernel modules media Mount point for removeable media mnt Mount point for mounting a filesystem temporarily opt Add-on application software packages sbin Essential system binaries srv Data for services provided by this system tmp Temporary files usr Secondary hierarchy var Variable data ⼿元の仮想マシン上の Ubuntu 16.04 環境
btrfs /dev/vda3 on / type btrfs (rw,relatime,space_cache,subvolid=5,subvol=/) /dev/vda1 on /boot type ext2 (rw,relatime,sync,block_validity,barrier,user_xattr,acl) /dev/md127 on /var/forest type ext4 (rw,nodev,noexec,noatime,nobarrier,stripe=128,data=ordered,_netdev) $ /var/forest はアプリのデータ保存⽤に決めた場所 ext2, ext4, btrfs は Linux のサポートするファイルシステムの種類で、 ディスク上の領域がその形式にフォーマットされてマウントされている / var forest boot … ext4
プロセスのアドレス空間を複数コンテキストで共有 • Linux カーネルは上記以外でほぼプロセスと同⼀視 実⾏コンテキストが分かりにくければ CPU のコア上でタスクスケジューリングして 実⾏できる単位とイメージしてください(レジスタに実⾏中の命令の番地とかの コンテキストが格納されていて、スケジューリングの際はそれらが退避されて別の 実⾏コンテキストがロードされます)
less /proc/13670/smaps … 簡単な図︓ lwn: Reorganizing the address space https://lwn.net/Articles/91829/ 少し古いけれど⼀読すると良いもの︓ https://www.kernel.org/doc/gorman/html/understand/
-l mypipe prw-rw-r-- 1 takuya takuya 0 May 23 17:24 mypipe $ echo "Pass this sentence into the named pipe." > mypipe $ $ cat < mypipe Pass this sentence into the named pipe. $
in the original POSIX.1-1990 standard. Signal Value Action Comment ---------------------------------------------------------------------- SIGHUP 1 Term Hangup detected on controlling terminal or death of controlling process SIGINT 2 Term Interrupt from keyboard SIGQUIT 3 Core Quit from keyboard SIGILL 4 Core Illegal Instruction SIGABRT 6 Core Abort signal from abort(3) SIGFPE 8 Core Floating point exception SIGKILL 9 Term Kill signal SIGSEGV 11 Core Invalid memory reference SIGPIPE 13 Term Broken pipe: write to pipe with no readers SIGALRM 14 Term Timer signal from alarm(2) SIGTERM 15 Term Termination signal SIGUSR1 30,10,16 Term User-defined signal 1 SIGUSR2 31,12,17 Term User-defined signal 2 SIGCHLD 20,17,18 Ign Child stopped or terminated SIGCONT 19,18,25 Cont Continue if stopped SIGSTOP 17,19,23 Stop Stop process SIGTSTP 18,20,24 Stop Stop typed at terminal SIGTTIN 21,21,26 Stop Terminal input for background process SIGTTOU 22,22,27 Stop Terminal output for background process The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored. ... [略] 活⽤頻度が⾼いシグナルを みんなで議論しましょう︕