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

Users browsing this thread: 5 Guest(s)
venam
Administrators
It's time for the book club.
Here's my summary/notes for the first two chapters.

## Chapter 1

I installed Plan 9 latest image in a VM and started learning it
properly. All the times I tried it in the past, I stopped short and didn't
go so deep.

Rio is definitely a weird experience. It isn't very intuitive that ACME
is missing line numbers, and that using the cursor scrolls down instead
of going to the next line. These probably can be configured somewhere,
or so I think.
At least for now, it feels like I'm fighting against the UI and clumsily
editing files. I'm making a lot of mistakes with the mouse, deleting
text I didn't intend to, mixing middle mouse (emulated shift+right click).
I love plumber, but my hands just keep mixing the buttons.

Similarly, in the shell, arrow up doesn't show the previous command but
scrolls up. Obviously, there's no tab completion either.
Overall, I'll still need a while to get used to the UI.

I'm quite fund of the compiled that allows targeting multiple
architecture (cross-compilation) that easily.
It's also my first go at the Plan 9 C dialect and it looks good so fr.

Definitely liking the thin-client architecture, the decoupling of
terminal/data/cpu servers.

## Chapter 2

This chapter has an initial overview of what's the meaning of program
and processes, what it means to have an OS, letting multiple things run
at once (multitasking OS).

However, it quickly follows with analysis of processes exec layout and
virtual memory. I'm not so sure it's a good logical order, it felt
parachuted for me. At least, if I was writing for beginner students,
I would be surprised if they didn't nag when studying with such book.
Furthermore, it's a bit annoying that multiple sentences are sprinkled
with the words "it's important to know this". I guess if I didn't have
the background knowledge I have right now, I'd be freaked out reading
that book.
The writing is also a bit more botched and clumsy than the first chapter,
heavy explanations in some places where there shouldn't really be and
shallow ones where there should be.

Apart from this, I'm still liking the Plan 9 C dialect.
ARGBEGIN/ARGEND, E/ARGF are quite nice macros, a good simple replacement
for getopt.
It's great that the return status can be a string, it allows for more
explicit errors.
And actually, system calls can return both string and integers in general.

However, even when the program returns a string, some of the info,
when the program crashes needs extra step to make sense of it.
src and acid command for debugging are super interesting, but I feel
like a lot of what is done could be much simpler. I'm also wondering if
all broken processes stay in the process tree hanging there (like zombie
processes on Unix).


Other cool info:
- Environment variables are similar to Unix.
- seninha mentioned it once but here I got reminded again: If you type
ip/ping, the shell tries with ./ip/ping, and then with /bin/ip/ping.
- PID are similar to Unix too
- Everything is a file, obviously. This particular example caught my
attention: echo kill >/proc/$pid/ctl

In sum, I'm hopeful for the next chapters.


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