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

Users browsing this thread: 1 Guest(s)
seninha
Long time nixers
13

The chapter begins with an introduction to the sd(3) device (#S) and the files it serves; this device is usually bound to /dev. There's a global control file (/dev/sdctl) and one directory for each disk. On each disk directory, there is another control file, one file for each partition (such as data, which represents the entire disk), and a raw file for low-level commands.

Reading the disk's control file lists some disk information, such as the start and end sectors of each partition. Writing to the disk's control file modifies its partition table (by creating or deleting a partition, for example).

There is also the fdisk(8) and prep(8) commands to modify a disk's partition table. It seems that Plan 9 uses a two-level partition scheme: the fdisk(8) partitions and the prep(8) partitions. Just like OpenBSD has the fdisk(8) partitions and the disklabel(8) partitions.

The chapter then instructs how to format a partition with the old kfs file system. I don't think that format is known by 9front, which knows the cwfs and hjfs file systems.

The next section details a conversation between Plan9 and a file server using the 9P protocol. They begin by agreeing with a protocol version and the maximum size for a message.

Our first file server is one that serves semaphores as files. It's a really straight forward file server and very easy to understand. The chapter also mentions /sys/src/cmd/ramfs.c as another example of simple file server.

The chapter ends with a introduction on how to write an idiomatic mkfile, and how to test our programs using the shell and leak(1).


14

The last chapter is about security.
It begins by explaining who is the host owner and what powers he has.

Each server is responsible for its own security. File servers act as a
relay for factotum, which is the authentication agent.

The book is interesting and got me into plan 9 programming, but it
diverges into tangents a lot of times.


Messages In This Thread
RE: Nixers Book Club - Book #6: Introduction to Operating Systems Abstractions - by seninha - 08-01-2022, 08:04 PM