HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Developing Your Own 32-Bit Operating System/Book and Cd-Rom

Richard A. Burgess · 4 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Developing Your Own 32-Bit Operating System/Book and Cd-Rom" by Richard A. Burgess.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
This helpful guide is designed to build upon an intermediate programmer's knowledge and explain how to design and develop a feature rich, full operating system. Among the topics discussed are tasking models, memory management, hardware interfaces, systems programming, and much more.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
I did this in the mid-90s when this book came out:

https://www.amazon.com/Developing-32-Bit-Operating-System-Cd...

I knew x86 well from demo scene coding, and I had the Linux and NetBSD sources to help, but the hardest bit was just getting all the boot sector stuff going properly and getting the processor into 386 mode as soon as possible.

I wrote an entire OS that booted into a windowed GUI, multi-threaded, file system support etc, etc and my goal was the whole thing booting happily to the desktop in 4Mb of RAM from a 1.44Mb 3.5" floppy, which it did. Every line was written from scratch in x86 assembler, because I was a masochist like that.

I called it Tinkerbell, for reasons lost to time, and it was hosted at tinkerbell.org back when I owned that domain. I just checked archive.org but sadly they didn't grab it when it was around.

EDIT: 32-bit OS book and the source are here:

http://www.ipdatacorp.com/mmurtl/

vendiddy
Very cool!

Do you have insight into why modern operating systems consume gigabytes of disk space and require so many system resources?

native_samples
Because they do a lot more? The video demo is the happy path. It's perhaps hard to notice things like the image viewer supporting drawing things on the image but not supporting saving the resulting file, or the lack of alt-tab.

Also, Essence is basically a Win32-like system (with some very small use of C++ but e.g. using char* instead of std::string). The kernel is handling graphics and the windowing system, like it used to do in Windows. Even the eyedropper you saw has kernel mode support.

https://gitlab.com/nakst/essence/-/blob/master/kernel/window...

Yes you can get very efficient code this way but only at a cost of low programmer productivity / reliability / security, especially as the code scales up to more than one developer. For a hobby OS it doesn't matter. For a commercial OS it's not good enough, hence Apple/Microsoft's investment in .NET and Swift. These consume more resources but make it easier for programmers to avoid mistakes and work together.

Don't get me wrong. I'm loving the style, the panache, the clean code, the ambition. Fantastic project. But it's a bit naive to ask "why can't all operating systems be like that?". Operating systems written by one guy will inevitably be fast and light compared to an OS that's 30 years old and which has 10,000x the number of features (at a conservative guess).

None
None
JPLeRouzic
Hey, I remember looking at your operating system in the 90'. I do not remember where I find it. It's nice to read about it today.
Related: Source Code For MMURTL:

https://github.com/bproctor/MMURTL

Keywords: Richard A. Burgess "Developing your own 32-bit operating system"

Buy either of his two books on Amazon:

https://www.amazon.com/gp/product/0672306557

https://www.amazon.com/gp/product/1588530000

I remember this as a great book on OS'es, back in the day...

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 examplehttp://www.amazon.com/Developing-32-Bit-Operating-System-Cd-...

There is an old(er) book called "Developing Your Own 32-Bit Operating System" that does a good job (assuming you're targeting the x86 platform) of laying the foundation and explaining the typical layers of code you'll need to write to build an O/S from scratch (as opposed to just a new Linux distro, etc.).

It's a bit dated, but so is the x86 platform :) I think most of it is relevant, especially someone asking these sorts of questions about OS development.

Here's a link to the book on Amazon:

http://www.amazon.com/Developing-32-Bit-Operating-System-Cd-...

If you get somewhere be sure to update us on your progress!

aquarius
I have downloaded the book as per your suggestion, and I have skimmed through it, As soon as I will start some code writing I'll inform you regarding my progress,

Thanks a lot !!

CyberFonic
I have used this book. It's a good introduction but uses a rather non-*nix sysAPI. I have found Minix to be a better way to get started and it too has a great book as well as significant number of sites that have excellent additional material. Haiku is a very cool OS that is very clean and in early stages of development. Plan9, Inferno and L4 (Pistachio) have their strengths.

If your goal is to learn about OS design, etc then you might want to look at some CS texts that go into lots of detail. The key thing to remember is that most OS concepts (but not the implementations) have matured.

You'd probably learn more by implementing some missing functionality in an existing OSS OS.

Regardless of what you decide to do, I do recommend using QEMU as your development environment rather than running development versions on bare hardware. What I like about QEMU is that it supports ARM, etc. So as other respondents have pointed out, you would be targeting a far cleaner platform than your PC based system with three decades of backward compatability crud.

aquarius
Thanks for your valuable time but i have not come accross topics like QEMU and ARM. As soons as I study them ?I'll get get back to you !!

thanks again !!

jasongullickson
"I have used this book. It's a good introduction but uses a rather non-nix sysAPI"*

I think the only reason this would be a down-side would be if you were trying to implement a unix-like operating system (not that there's anything wrong with that).

It would do up-and-coming designers good to avoid Unix only because it's becoming sort of a "standard" way of architecting an OS and studying only unix-like systems can have an effect on creativity, innovation, etc.

I love BeOS/Haiku but even it is a bit too "unixy" for my taste.

I definitely agree with the previous post that going back to CS texts is the way to go, and it would be instructive to look at the operating systems once used by mainframes in the past as this is where allot of the "contemporary" technology we use today came from.

Ultimately the goals you have for the system you are designing should drive your architecture but I think a rich diet of various different operating systems is a good way to prepare for the journey.

HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.