mit-pdos / xv6-book Goto Github PK
View Code? Open in Web Editor NEWCommentary for xv6-public
License: Other
Commentary for xv6-public
License: Other
NOTE: We have stopped maintaining the x86 book for xv6 but have switched the book to RISC-V (see https://github.com/mit-pdos/xv6-riscv-book/). --- The book compiles using Heirloom Troff, an open source update of the original Unix troff. cvs -d :pserver:[email protected]:/cvsroot/heirloom co heirloom-doctools cd heirloom-doctools make sudo make INSTALL=install STRIP=strip install # sic This will install the binaries in /usr/ucb, but you want to install them in /usr/local/ucb, which is what the run1 script expects. Move the binaries or update PREFIX in mk.config in heirloom-doctools.
On https://pdos.csail.mit.edu/6.828/2017/xv6/book-rev10.pdf (Draft as of August 29, 2017):
page 25: Some margin text is cropped
page 46: At the margin "IRQ_TIMER,+code" should probably be replaced by "IRQ_TIMER+code". Also in the index (page 105) "IRQ_TIMER,, 46" should be replaced by "IRQ_TIMER, 46" (one comma less)
page 82: Some margin text is cropped
Is there an easy way to generate a version of the book with reflowable text, like html or epub? Searching around, I found this page, so someone came up with some way of doing it. I tried fiddling with the Makefile and scripts to use troff -Thtml
and dhtml
instead of dpost
. I was able to get valid html output but it had no formatting and no figures. I was not previously familiar with troff, but the syntax seems pretty straightforward. Perhaps a new troff->ReSructed Text converter would not be too hard to write (it seems like the link above was generated with sphinx and Restructured Text).
Some functions that are quoted in the book at the beginning of sentences start with an uppercase, some others don't.
I have already made a PR to correct the ones I could correct, but for other, this is probably due to the index where all functions need to have a lowercase.
I am not sure about the fix you prefer, but I think you should add a new macro in book.mac (there is already one that enables to index a name without writing it in the book, so it is possible, using .index function and then .code Function (like you did for Tvinit in trap.t l.282-283), to have a better behavior, but then "+code" would be missing in the sidebar...)
I will list here all the occurrences I find in the book (July 2019).
userinit (l.608, l. 629)
scheduler (l. 759)
allocuvm (l. 882)
main (l. 205)
mappages (l. 231)
walkpgdir (l. 253)
kalloc (l. 419)
loaduvm (l. 555)
argint (l. 581)
argptr (l. 614)
argstr (l. 625)
trap (l. 1011)
In trap.t, line 699 says:
xv6 programs to map interrupt 0 to IRQ 0
This sentence is not particularly clear. I would suggest:
During initialization, xv6 programs interrupt gates:
.code-index tvinit
.line trap.c:/^tvinit/
initialize entry 0 of IDT to vector0, and
so on.
In "Appendix B: The boot loader" there is a dummy text for the second exercise:
Lines 672 to 673 in a2b9e9a
Perhaps you want to replace it by a "real" exercise or (less likely) remove the dummy text of this exercise.
In mem.t (lines 860-870), it is written:
but xv6 uses segments only for the common trick of
implementing per-cpu variables such as
.code proc
that are at a fixed address but have different values
on different CPUs (see
.code-index seginit ).
Implementations of per-CPU (or per-thread) storage on non-segment
architectures would dedicate a register to holding a pointer
to the per-CPU data area, but the x86 has so few general
registers that the extra effort required to use segmentation
is worthwhile.
As far as I understand, all segments in GDT/LDT start from 0 to ffffffff. Thus, they are not used for the described trick. Furthermore, proc is referenced through struct cpu
in the cpus[]
array (and index in this array is obtained by searching the local APICID).
Therefore, I suggest removing this whole paragraph.
Here the code lines pointed out after "unique pid" seem a little off from what's intended. My guess is that the intention was to specify (2488-2489), but due to the occurrence of EMBRYO in the comments preceding the allocproc
function, the regex matched the wrong EMBRYO. Not sure what your favorite fix would be, but seems like it should be a pretty easy fix.
Line 534 in 3cb96cf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.