
Ask HN: Would self-taught programmers be interested in such a book? - sosagain
I want to write a book on operating systems that actually lets the reader build one. It&#x27;s going to cover stuff like C, x86 assembly, computer architecture, and operating system architecture (basic stuff like task switching, file systems, virtual memory etc). It&#x27;s also going to provide exercises that lets the reader fill in gaps to make sure they comprehended the material instead of just copying and pasting code. The targeted audiences are mainly self taught programmers and motivated cs students who want to learn more than what their typical operating system courses has to offer. Would people be interested in working through such book?
======
brudgers
Probably not. I say this not to discourage you from writing, but to prompt you
to write a book that does something -- a book worthy of fundamental
disagreement and passionate debate.

 _Operating Systems: Three Easy Pieces_ [1] covers the really interesting
parts of the book you are considering, and skips the parts that can't really
be given decent treatment: x86 Assembly, C, and writing a toy operating
system. Likewise, _Linux from Scratch_ covers understanding the practical side
of Operating Systems [2].

A book I want to read has "EMACS really is an operating system" as it's thesis
and then proceeds to show why and how our concept of operating system covers
it -- a book that challenges our comfort in distinguishing operating systems.

Another book I want is "Build an Operating System for $3.47 worth of
Breadboarded Chips." There's a book which pushes the lower bounds of
computing. Something that provides fertile ground for new ideas.

Write a book at the edges, in the space between computer science curricula and
actual practice. Write it just for people who are interested in operating
systems. Write it for skimmers and strugglers and dilettantes and
professionals. Write it so that people will learn, but also so that some will
disagree on conceptual [rather than technical] grounds.

Then it might find a niche.

Good luck.

[1]
[http://pages.cs.wisc.edu/~remzi/OSTEP/](http://pages.cs.wisc.edu/~remzi/OSTEP/)

[2] [http://www.linuxfromscratch.org/](http://www.linuxfromscratch.org/)

~~~
sosagain
For a mature programmer like you, it probably feels redundant to write a book
that iterates concepts you have understood long ago. This book is for
beginners. I have notice that many students graduate from University without
actually understanding the concepts completely. It's a book I wish had existed
when I was an undergraduate student.

~~~
brudgers
Though mature, I'm well within the criteria you describe. Perhaps that's why I
am a little familiar with what is already available for beginners. The issue
for undergrads isn't that resources don't exist, it's that they don't know
what exists. Twenty years ago my CS major neighbor turned me on to Mosaic, but
had never heard of Dr. Dobbs. And he was a senior. A year ago, I was talking
with a CS Junior who knew nothing about what an embedded system was. He only
became aware at a job fair. Hadnt heard of YC either, sohe got my copy of
_Hackers and Painters_.

Anyway, the danger you face is that you've cut the scope all the way back to
undergraduates and begun to cast it as a traditional textbook. One that has to
introduce C and x86 assembly and has to address the practical issues of
testing and running a new minimal OS on their development machine [under
Windows, OSX, and Linux?]. How much of what you want to write gets left out
and how much of what you do write winds up being superficial instead of what
you wish you had known?

------
sramsay
Hmm. No one has mentioned _Elements of Computing Systems: Building a Modern
Computer from First Principles_ by Nissan and Schocken (which is absolutely
superb).

~~~
mattgreenrocks
Great suggestion.

I flipped through Computer Architecture, A Quantitative Approach
([http://www.amazon.com/Computer-Architecture-Fifth-
Quantitati...](http://www.amazon.com/Computer-Architecture-Fifth-Quantitative-
Approach/dp/012383872X/ref=sr_1_1?s=books&ie=UTF8&qid=1399484350&sr=1-1&keywords=computer+architecture))
at the bookstore the other day and it looked interesting, but that's all I
could gather in the short time I had.

~~~
shadowfox
This is a standard textbook on computer architecture across many universities
in the US (and if my students are right, outside it as well). So it might be
worth a read.

If this is absolutely the first time you are looking at architecture,
[http://www.amazon.com/Computer-Organization-Design-Fifth-
Arc...](http://www.amazon.com/Computer-Organization-Design-Fifth-
Architecture/dp/0124077269/) by the same authors might be a easier entry
point.

------
chubot
I'd be interested, but how about doing one for x64 assembly? There are already
two teaching kernels available for x86 (from MIT and Stanford).

[http://en.wikipedia.org/wiki/Xv6](http://en.wikipedia.org/wiki/Xv6)

[http://en.wikipedia.org/wiki/Pintos](http://en.wikipedia.org/wiki/Pintos)

I think Minix is also x86, so that may be 3.

~~~
sswezey
Or possibly even ARM? Isn't it supposed to have simpler assembly (better for
learning) and many, cheap, accessible boards to learn with?

~~~
chubot
Yes, I would appreciate an ARM version too. There is a a Raspberry Pi course
that I haven't really looked at, but I don't think it's a "full" OS with
virtual memory and multi-tasking and so forth.

[http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/](http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/)

------
VLM
There are a lot of books on this topic. You could always build a better
mousetrap, of course.

I'd be interested in a better mousetrap, OR find a new niche rather than yet
another minix. How about a RTOS soft or hard your choice, or write it in a new
or obscure language, or target it to a microcontroller (PIC32 ?) or target it
to a softcore in a FPGA and develop the peripherals as you develop the drivers
for them in parallel. How about an OS designed from the start specifically to
live inside virtual containers, to optimize its performance both boot up,
drivers, and shutdown while virtualized?

Has anyone ever written a power-aware OS and what would that mean? I don't
mean a mere ACPI driver but something written from the bottom up to minimize
watt/hrs burned by the OS rather than pure speed as sole criteria. That would
be an interesting "hook" even if the rest of the book is fairly traditional.

How about an OS that is some kind of kissing cousin / lovechild of a java
virtual machine? Where the native executable format is a jar file, where the
whole thing runs in the JVM, for no reason other than I'm daydreaming right
now?

(Edited to add, I like retrocomputing so how about a C re-implementation of a
classic OS, like maybe PDP-8 OS/8? Small simple yet capable, make it as
compatible as you can. Or TRSDOS, or port Microware OS-9 and/or Nitros9 to ...
something, maybe intel PC I donno)

(Edited to add, strange filesystem idea #2515 how about a cloud / nosql
database as your native root filesystem? What a strange idea, yet
interesting.)

------
WorkingClassDev
Back in the 90s they used to do these quite often. I remember reading one for
the same reasons, self taught network engineer and programmer and wanted to
get under the hood. I say do it and bring the concept upto date.

Here's an example[http://www.amazon.com/Developing-32-Bit-Operating-System-
Cd-...](http://www.amazon.com/Developing-32-Bit-Operating-System-Cd-
Rom/dp/0672306557)

------
krat0sprakhar
Totally! Would be awesome! Is there a mailing list that I can add my email to
be notified?

------
aristus
I am self taught, and after 12 years in industry I took McKusick's kernel
class on Saturdays at Berkeley. It kicked my ass and ate up a lot of time, but
it was the best thing I could have done to further my knowledge.

~~~
galvanist
sounds useful. how did that work? were you auditing? did you enroll as a
student? what was the cost?

------
yblu
Totally, but personally, I'd prefer a learning OS written by JavaScript, Ruby,
or some other high-level language, but not C and assembly. That's because I'm
interested in learning how OS works behind the scene but not in building a
production OS from scratch. Having to learn C or assembly will be a
distraction.

------
benjaminpv
Definitely interested in this. I think a common problem with a lot of people,
_even_ people that are taught from a book, is that you tend to get 'stuck' at
the layer of abstraction you first learned.

People that don't want to develop their skills leave it at that whereas people
that care look a little deeper and say 'oh, my knowledge has some pretty
significant gaps...'

You can see this sentiment in a lot of the comments: everyone says 'I feel
like I'm missing something.'

In my case, that realization came after I started doing some hobby electronics
projects: once you start seeing how physical hardware interacts it set off a
chain reaction where I realized that my knowledge was really deficient as to
how you could go from such a low level to the level of abstraction with which
I'm familiar.

------
ilaksh
Is the implication that programmers who are not self-taught are already
experts on operating systems? LOL.

Trying to include C and assembly in there with the rest of it is ambitious, so
if you van do that successfully it might be worthwhile. But we don't really
need another book that reiterates the old concepts of what an operating system
is. We need people to build new operating systems with fundamental design
changes to the core model of what an operating system is that take into
account new developments in computing. The biggest development I think is open
source. So I would start with that as an assumption for my OS and question
other premises. For example I think that virtual memory should probably be
eliminated or replaced with another concept.

------
eshvk
> motivated cs students who want to learn more than what their typical
> operating system courses has to offer.

When I studied at UT, the OS course lets you build an OS. It was brutal. 80
hour per week brutal. But what I took away from the course is not the class
notes but really the Prof/TA comments when we used to come up with design
issues when we fucked up lower abstraction layers or subtle, really really
subtle bugs that were introduced at previous levels.

To be honest, I am not sure how that would be replicable in book form if not
accompanied by a teacher. Either you are so vague that people muddle, then
google and your book is effectively useless. Or you are so prescriptive that
people end up reading a floor plan to build an OS and get squat out of it.

~~~
sosagain
>Either you are so vague that people muddle, then google and your book is
effectively useless. Or you are so prescriptive that people end up reading a
floor plan to build an OS and get squat out of it.

Finding a middle ground is of course key.

~~~
brudgers
I look at the books in my library. The middling one's are more or less
reference materials. But the good ones -- _On Lisp_ , _JavaScript Allonge_ ,
_HtDP_ , or _SICP_? None are dumbed down. The author is trying to impart all
the knowledge that they can impart coherently.

Knuth stands above them all of course. But its cautionary tale is that it's a
book about compilers. I'm pretty sure I'll live to see chapter 12, but as it
stands today, there are four more chapters to be released before it. Knuth
began writing _The Art of Computer Programming_ in 1962.

------
danellis
The more information about this kind of thing the better, as long as it's well
written, but why do you target it at self-taught programmers? Do you assume
they know less about the topic than someone who has done a CS course? I'm a
self-taught programmer, and I recently wrote myself a small OS for an ARM
Cortex MPU (which I need to get around to writing about). Now, I'm no expert
in scheduling algorithms, or IPC performance, or various advanced topics, but
then neither are most CS graduates. This is a topic nearly everyone can learn
from.

------
japesinator
Have you seen [http://www.bottomupcs.com/](http://www.bottomupcs.com/) ? It
isn't exactly what you're talking about, but it's pretty close.

------
csffsc
I would be, even more so if there was an active forum/irc channel.

In fact I just finished a C Programming course at a state university. After
talking with the professor I decided to continue on myself with a C++ book (to
be determined), and a Linux Kernel book, [Understanding the Linux
Kernel]([http://shop.oreilly.com/product/9780596000028.do](http://shop.oreilly.com/product/9780596000028.do)).

Finding a group of people of a similar skill level willing to do this type of
learning would be fantastic.

------
OWaz
I'm interested too. I don't have a CS degree and would really like something
like this since I can study it at my own pace. Do you have any ideas on how
you want to publish it?

------
eranation
Just finished my final on advanced operating systems (graduate course) and I
will definitely buy your book. I feel like I'm missing a lot of the basics.
Especially interested in building a file system from scratch.

What would make the book MORE exciting for me, was if you included other
system programming languages than C in the implementation. e.g. Rust, D...

Just don't target it only for self taught programmers. Any programmer will
benefit from it. (although I think every programmer is eventually self taught
in a way)

Blog? Signup form?

------
bra-ket
good idea, I would buy two kinds of books 1) one which aggregates all the "How
do I write an OS from scratch" info under links below into one coherent whole.
and 2) a tutorial on how to build a domain-specific OS, say OS that only knows
to run a web-server, or OS for FPGA or Raspberry Pi, or a mobile OS that knows
messaging and nothing else

1\. [http://www.quora.com/How-do-I-write-an-operating-
system](http://www.quora.com/How-do-I-write-an-operating-system)

2\. [http://www.quora.com/If-you-were-to-write-a-new-operating-
sy...](http://www.quora.com/If-you-were-to-write-a-new-operating-system-from-
scratch-where-would-you-start)

3\.
[http://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/...](http://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os-
dev.pdf)

4\. [http://www.amazon.com/The-Design-UNIX-Operating-
System/dp/01...](http://www.amazon.com/The-Design-UNIX-Operating-
System/dp/0132017997)

5\. [http://www.amazon.com/The-Elements-Computing-Systems-
Princip...](http://www.amazon.com/The-Elements-Computing-Systems-
Principles/dp/0262640686)

6\.
[http://www.returninfinity.com/baremetal.html](http://www.returninfinity.com/baremetal.html)

------
serhanbaker
I have a CS degree and I'm interested anyway! I think it's a good way to learn
about threads, memory management, concurrency mechanisms, etc.. Also can
contribute if needed.

------
anupshinde
I'd be interested. I taught myself to write an OS 10 years back (using floppy
disks) and it was PITA. I tried it for fun few months back (just for fun) and
even today, I find its not so easy. I would expect it to be < 150 pages, shows
me how to write a boot loader "safely" to my USB disk and how to do the other
interesting stuff you mentioned post boot - especially interfacing with eth0,
wifi, bluetooth (and maybe gpu control)

~~~
stevekemp
I've done low-level coding in the past, hung around on the osdev wiki, and
paid a lot of attention to the topic even though I've no real desire to create
an OS.

The single biggest piece of advice I'd give to people is _never_ try to write
your own bootloader. People have written millions of them, but ultimately
grub, etc, have this covered. Writing a boot loader is kinda/sorta fun, I get
that, but really it's just a stepping stone which is required to get your
_real_ code running.

Reinventing wheels is educational, but a boot loader? It's not really worth
the time..

------
cafard
Have you looked at [http://www.amazon.com/Modern-Operating-Systems-Andrew-
Tanenb...](http://www.amazon.com/Modern-Operating-Systems-Andrew-
Tanenbaum/dp/013359162X/ref=sr_1_3?s=books&ie=UTF8&qid=1399564977&sr=1-3&keywords=andrew+tanenbaum)?
I have around the house an earlier version, which gets pretty down and dirty.

------
dexterchief
I took some classes with Marc-André Cournoyer
([http://classes.codedinc.com/](http://classes.codedinc.com/)) and really
enjoyed the format he used of online video, 4 hours a day for two days.

FWIW, I think what you are thinking of might be a good (better?) fit with that
format.

Either way it sounds interesting!

------
mattgreenrocks
Put me down. In fact, I want to give you my email address, so send up a
landing page to collect them so I can be kept informed.

I hope it is as deep as you are suggesting it will be. I'm not interested in
an easy overview, I want to know pragmatic tradeoffs that modern OSes make,
and what sorts of research is being done.

------
tomek_zemla
You could start with a book equivalent of an MVP to test the interest. A
series of blog posts or a sample chapter. This would let you test different
ideas on how to present/design the information and how much of the
demand/interest there is for it.

------
ondiekijunior
I am self taught and I find moving from being an amateur coder to fully
fledged programmer is tough. Such a book would be interesting. Can you share
your blog or email so that I can help you test readability etc of the book. my
email is ondieki@wallenje.com

------
Rusky
That would be excellent. One thing that bugs me about existing tutorials and
web sites about this is that they all use older interfaces and hardware, often
to the point that they skip essential details. It would be nice to see a more
modern one.

------
thoughtsimple
You might be better off targeting the Raspberry Pi instead of x86. Or maybe in
addition to x86 as a section on cross-platform development.

But I would definitely be interested in it even if it only focused on x86.

~~~
YoukaiCountry
Raspberry Pi would certainly be a good way to go. The architecture is cheap
and (relatively) simple. Also people won't screw up their home computers,
which is what many people would undoubtedly be playing with.

------
muricula
Yes, as a self taught programmer I have started to play with these on my own
and would love an explanation of these to help me along instead of hacking
together code based on old tutorials.

------
gaigepr
I would be very interested. I'm in school for computer science but so far I
haven't had a class or series of classes that went very deep into OS
architecture and programming.

------
agentultra
I am a self-taught programmer and I already know this stuff but it's always
interesting to see if the concepts can be distilled in a way that makes it
easier to understand.

------
bjoerns
I'd be interested, don't have a CS degree and at times I feel I lack some
basics. Have you written anything yet or is this still at the idea stage?

~~~
sosagain
I have written a kernel for the ARM architecture before and recently I have
started working on a kernel for x86. Initially this was just a fun side
project but upon seeing all the recent post by self-taught programmers who
desire more, I thought this would be a good book to write about.

~~~
bjoerns
go for it!

------
NAFV_P
I mentioned this on "Idea Sunday" a few weeks ago.

Why not, the more knowledge the better.

I concur with HN reader: chubot, some x64 knowledge would be useful.

------
phazmatis
There are books like this - old, obscure, and out of print. So yes. I'd love
to read your modern take on the topic.

------
bwheel
I would absolutely be interested in this. Go for it and let us know when you
release it!

------
ryanmarsh
I'm self taught and I've been wanting to read something like that.

------
adricnet
I'll buy a copy or two and never finish it ;) Good luck!

------
ColinWright
Yes - absolutely.

------
darreld
I would definitely be interested in this.

------
carise
I would be interested in such.

------
k-mcgrady
I would be interested.

------
ericraio
This would be awesome!

------
ohblahitsme
Yes, very much so!

------
tomsiw
Count me in

------
jackmaney
Yes, please.

