Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commit82b260461c19efe67f32e6a216d01663439a0138 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-02-26 14:09:32 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-02-26 14:09:32 +0200
Files3c740c6f5c903501a857cb7a25bfee6622a1a28c /src
syndamia.com-82b260461c19efe67f32e6a216d01663439a0138.tar
syndamia.com-82b260461c19efe67f32e6a216d01663439a0138.tar.gz
syndamia.com-82b260461c19efe67f32e6a216d01663439a0138.zip
Parent37b350c5e673faf3a789e943f104256954d043b3 (diff)
[talks/lbs] Spread out file types info and added text diagrams
1 files changed, 50 insertions, 4 deletions
-rw-r--r--src/talks/linuxgraphy-by-strabo/index.md54
diff --git a/src/talks/linuxgraphy-by-strabo/index.md b/src/talks/linuxgraphy-by-strabo/index.md
index 8a5ecc8..0308f51 100644
--- a/src/talks/linuxgraphy-by-strabo/index.md
+++ b/src/talks/linuxgraphy-by-strabo/index.md
@@ -325,14 +325,60 @@ The main attributes that every inode has are as follows:
There are 7 main types (but there can exist more, depending on OS):
&&lineb1
+ **regular**: just a plain old file
- + **directory**: as explained, a file containing hard links to other files. Each directory is allowed to appear only once in a single parent.
- + **symbolic link**: points to any file (or directory). It contains the (relative) path to that object (as a simple string), so a symlink could even not be valid.
+ + **directory**: as explained, a file containing hard links to other files. Each directory is allowed to appear *only once* in a single parent.
+ + **symbolic link**: points to any file (or directory). It contains the (relative) path to that object (as a simple string), so a symlink could even not be valid.
+ Think of a C++ pointer (pseudocode).
+
+ ```
+ symlink /bin/mprog = "/usr/local/bin/mprog";
+ exec(/bin/mprog); -> Executes /usr/local/bin/mprog
+ ```
+
+&&/slide
+
+
+
+&&slide
+
+ **FIFO special**: aka [named pipe](https://en.wikipedia.org/wiki/Named_pipe), a special type of regular file, where at any moment only one process can read from it and one can write to it. It takes the concept of shell pipes to inter-process communication.
+
+ ```
+ [Process] --write-> [FIFO] x-write-- [Process]
+ [ A ] x--read-- [ ] --read--> [ B ]
+ ```
+
+ **block special**: a device which is randomly accessible, like a hard drive or cdrom drive.
- + **character special**: devices which are accessed via serial streams of input or output, like keyboards, mice, graphics cards and teletypes
+ Think of a C++ array (pseudocode):
+
+ ```
+ BlockSpecial[438] = 1 ; var = BlockSpecial[438]
+ ```
+
+ + **character special**: devices which are accessed via serial streams of input or output, like keyboards, mice, graphics cards and teletypes.
+ Think of a C++ stream (pseudocode):
+
+ ```
+ CharacterSpecial << 1 ; CharacterSpecial >> var
+ ```
+
+&&/slide
+
+
+
+&&clide
+
+ **sockets**: file for inter-process communication. Compared to FIFO specials, they can be used by more than two processes, used in both direction and support [file descriptors](https://en.wikipedia.org/wiki/File_descriptor) and packets
-&&/font &&/slide
+ ```
+ [Process A] <--read&write--> [Socket 1]
+ [Process B] <--read&write--> [Socket 1]
+ ...
+
+ [Process A] --write--> [Socket 1] --read--> [Process B]
+ \-read--> [Process C]
+ ```
+
+&&/clide