Nixers Book Club - Book #6: Introduction to Operating Systems Abstractions - Community & Forums Related Discussions

Users browsing this thread: 6 Guest(s)
venam
Administrators
Chapter 3 and 4 were pretty simple, especially with a Unix background
the content can be compared.

Here are a couple of notes I took during my reading.

## Chapter 3

They fixed the create syscall 😂

Code:
fd = create("afile", OWRITE, 0664);

Quote:> Plan 9 does not have a wastebasket
First time I hear it called that way.

In Plan9, like old Unix, you can still see the directory file structure
and manipulate it directly with the help of some specific syscalls:

Code:
xd -c .
typedef
struct Dir {
    /* system-modified data */
    ushort type; /* server type */
    uint dev; /* server subtype */
    /* file data */
    Qid qid; /* unique id from server */
    ulong mode; /* permissions */
    ulong atime; /* last read time */
    ulong mtime; /* last write time */
    vlong length; /* file length */
    char *name; /* last element of path */
    char *uid; /* owner name */
    char *gid; /* group name */
    char *muid; /* last modifier name */
} Dir;

Globbing in the shell is the same as Unix.

One thing that is different though are the arguments for the dd command,
they got dashes now.


I was particularly impressed by the buffer section of chapter 3. It's
a pretty good way to learn the importance of buffering. We also get a
practical example. Biobuf is really useful instead of reinventing the
wheel each time.


## Chapter 4

Similar vibe as chapter 3, I keep comparing in my mind.

Fork is the same as Unix fork.

NB: The author never stops the "important" talk.

One thing I found weird is that execl needs argv[0] explicitly, that's
peculiar.

Wait syscall also returns a full message, I like how errors are much
more verbose in Plan9, that makes it simpler to debug.


Messages In This Thread
RE: Nixers Book Club - Book #6: Introduction to Operating Systems Abstractions - by venam - 20-11-2021, 04:40 AM