Live data from Hacker News

Operating System in 1,000 Lines – Intro

operating-system-in-1000-lines.vercel.app

121–129 of 129 posts

Re: Operating System in 1,000 Lines – Intro

#121
post #89
post #36

Author here. I wrote this book so you can spend a boring weekend writing an operating system from scratch. You don’t have to write it in C - you can use your favorite programming language, like Rust or Zig. I intentionally made it not UNIX-like and kept only the essential parts. Thinking about how the OS differs from Linux or Windows can also be fun. Designing an OS is like creating your own world—you can make it how…

How does your book compare with the classic "Operating systems design and implementation" by Andrew S. Tanenbaum and Albert S. Woodhull implementing MINIX?

This is so much easier. You are implementing printf on page 5 and it can handle formatted output to the screen for integers, hexadecimals, and strings. Minix eventually gets around to the write system call but even then it is actually just a way of sending bytes from a buffer to a file descriptor. To a what? That is a lot more complexity for, in some ways, less functionality. For write, you still have to write printf on top.

The Tanenbaum book is great but it is a particle physics textbook compered to this OS cookbook.

Re: Operating System in 1,000 Lines – Intro

#122

Earlier quoted context omitted.

> That's cool that you heard from one. It was. (If you ever see this, thank you again, Mr Buchanan.) > What I really wanted from a developer was the i960. Interesting choice! Given that Intel has a number of distinctive architectures in its historical portfolio, and is in trouble these days due to the competition from Arm and perhaps even RISC-V, I would love to see it do either experimental revivals of some of its a…

Die shrinks and Alpha? A man after my own heart on these things! Yes, I recommended both in the past (maybe Schneier’s blog). Yes, even shrinks to nodes like 180-350nm would be helpful. The older nodes are still more reliable than modern ones due to the physics involved in deep-sub micron. While not power-efficient, both i960 and Alpha would be fast and reliable. On FPGA’s, that’s a likely use. Crash-safe.org used Al…

:-)

What is or was crash-safe.org? It seems to be gone without a trace...

Re: Operating System in 1,000 Lines – Intro

#123
post #36

Author here. I wrote this book so you can spend a boring weekend writing an operating system from scratch. You don’t have to write it in C - you can use your favorite programming language, like Rust or Zig. I intentionally made it not UNIX-like and kept only the essential parts. Thinking about how the OS differs from Linux or Windows can also be fun. Designing an OS is like creating your own world—you can make it how…

[dead]

Re: Operating System in 1,000 Lines – Intro

#124

Earlier quoted context omitted.

Die shrinks and Alpha? A man after my own heart on these things! Yes, I recommended both in the past (maybe Schneier’s blog). Yes, even shrinks to nodes like 180-350nm would be helpful. The older nodes are still more reliable than modern ones due to the physics involved in deep-sub micron. While not power-efficient, both i960 and Alpha would be fast and reliable. On FPGA’s, that’s a likely use. Crash-safe.org used Al…

:-) What is or was crash-safe.org? It seems to be gone without a trace...

It was the project page for this design:

https://www.cs.brandeis.edu/~dkw/papers/ieee-hst-2013-paper....

The usable part of the work was a metadata co-processor that could enforce micro-policies:

http://nikos.vasilak.is/p/pump:hasp:2014.pdf

It was spun off as Dover’s CoreGuard which I don’t know much about:

https://www.dovermicrosystems.com/solutions/coreguard/

The original design did for your CPU what Jesus Christ does for your soul. Keeps it from burning up due to user failures or external attacks. The product can’t guarantee eternal life but others are researching that.

Back to the devices, there’s at least two families of coprocessors: typed, tagged designs like Burroughs B5000 and capability security like CHERI. SAFE was more like Burroughs or even System/38’s object-centered approach. If patents are a concern, one could always just redo B5000 model itself since it’s more secure than any mainstream architecture.

Re: Operating System in 1,000 Lines – Intro

#125
post #82

Earlier quoted context omitted.

Could you port this to riscv64 please?

Porting to any platform is trivial after understanding the basics as described in these articles The author explicitly describes why they chose riscv32 Why would you want the author to use riscv64 instead?

At least on Intel, it was quite a significant difference in some ways, in kernel terms.

Re: Operating System in 1,000 Lines – Intro

#127
post #25
post #21

Earlier quoted context omitted.

There are very good kernels written in Ada, like Ironclad[1]. Besides, what's the point of this comment? What if people wanted to write a million more Unix-like kernels in C? Do you think this is bad? Why do you care? If you want, just write your own in whatever language you want, with whatever design you want. > Why not Plan 9 in Zig, or Hare, or even D? Because nobody to this point was interested in doing this. It'…

> There are very good kernels written in Ada, like Ironclad[1]. Interesting. Thanks. > Besides, what's the point of this comment? What if people wanted to write a million more Unix-like kernels in C? Do you think this is bad? Why do you care? Because it seems to me that modern OS design is caught in a deep deep rut, and the "OS in 1000 lines" article that we are discussing is digging that rut even deeper. Don't repea…

> Make interesting new mistakes. It's more fun.

Now’s your chance to move the state of the art forward!

Re: Operating System in 1,000 Lines – Intro

#128
post #36

Author here. I wrote this book so you can spend a boring weekend writing an operating system from scratch. You don’t have to write it in C - you can use your favorite programming language, like Rust or Zig. I intentionally made it not UNIX-like and kept only the essential parts. Thinking about how the OS differs from Linux or Windows can also be fun. Designing an OS is like creating your own world—you can make it how…

Can I write it in js?

Re: Operating System in 1,000 Lines – Intro

#129

Earlier quoted context omitted.

actually making a video game would be 100x more complicated. Plus kernel developer jobs are more lucrative than most game dev jobs.

Is it really more complicated to make a video game that a kernel? I don't consider myself knowledgeable enough to make a full kernel by myself but I did manage to make a full 3d video game by myself. Also I'm not speaking about making a game engine along with the game. Having a kernel dev job is different than making your own kernel, speaking on a "world builder" perspective.

Even a 3D game engine can be simpler than a fairly complex operating system.
Post reply on HN