0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ふつうのLinuxプログラミングをやってみる その3

Last updated at Posted at 2020-11-04

有名な本らしいので買ってみました
ふつうのLinuxプログラミング Linuxの仕組みから学べるgccプログラミングの王道
ふつうのLinuxプログラミング 第2版 Linuxの仕組みから学べるgccプログラミングの王道

ふつうのLinuxプログラミングをやってみる その1
https://qiita.com/uturned0/items/b9ae846f2aff5865c074
ふつうのLinuxプログラミングをやってみる その2
https://qiita.com/uturned0/items/56beac990cdd6f1059ed
ふつうのLinuxプログラミングをやってみる その3
https://qiita.com/uturned0/items/675092da8aa89c4b1ff0
その4
https://qiita.com/uturned0/items/8f5765cfc0f0be8a1981
その5
https://qiita.com/uturned0/items/ab97deb489c994a836da
その7−3
https://qiita.com/uturned0/items/3fbf3ed6bb2a47325f59


Chapter 3

広義のファイル
symlink, text, binary 全部ファイル。

狭義のファイル
regular file
違うもの
directory
symlink
device file such as /dev/sda
named pipe 本書では扱いません
unix domain socket 扱いません

デバイスファイルとは
/dev/sda はブロックデバイスファイル
キャラクタデバイスファイルはprinter, modem
/dev/null, /dev/zero, /dev/random もデバイスファイル。

file system
procfs, tmpfs, devfsは疑似ファイルシステム pseudo filesystem

process IDがある理由の代表はsignal, ctrl+c

stream

バイトが流れるバイトストリーム。
この本だけの言葉。file, open fileと呼ばれるらしい

file型の値
STREAMSカーネルモジュール

他書では↑の意味で使うことがある

system call read/writeをストリームからバイト列を読む、というように使う

device fileはストリームを得るためのとっかかり

process a からkernelを通りprocess b にいくものを Pipe

cat x | grep x のpipeと同じ

streamはnetworkを超えてやり取りもできる。

process間通信を IPC interprocess communication

file system - process - process 全部つなぐのがストリーム

chapter 3 おわり

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?