Live data from Hacker News

The little book about OS development

littleosbook.github.io

21–30 of 46 posts

Re: The little book about OS development

#21
post #12
post #5

Other than the educational value of doing so, what would be a reason to write a brand new operating system? Obviously there is a lot to learn about existing operating systems by coding you own, much in the way that writing a new languages teaches you about existing languages, but what are some creative applications of a hand made operating system?

It's fun.

OS class was one of my favorites in college, and I was recently reading about the MikeOS project and it really inspired me to try and do it again.

Re: The little book about OS development

#22
post #9

Earlier quoted context omitted.

I know Ive wanted to make changes to my own for a while. At very least default ui, menus and shortcuts after installation. These are modtly ux changes though Additionally theres a few features I would prefer from a security user experience standpoint - symlinks are indexed anD the move or deletion of the target would trigger a "would you like to change/delete the symlink as well?" - all applications run in a containe…

> symlinks are indexed anD the move or deletion of the target would trigger a "would you like to change/delete the symlink as well?" Patch your coreutils. Difficulty: easy. Most of your other needs can be addressed by making a specialized Linux distro (difficulty: hard), rather than writing a kernel that does all of this (difficulty: max). Build your packages to be containerized by default. I suggest using chroot con…

I appreciate the inspirstion, I'll see to get started on it tonight. I was looking into fuse before which inspired much pf the filesystem shinanigans

Re: The little book about OS development

#23
post #5

Other than the educational value of doing so, what would be a reason to write a brand new operating system? Obviously there is a lot to learn about existing operating systems by coding you own, much in the way that writing a new languages teaches you about existing languages, but what are some creative applications of a hand made operating system?

Well, for one thing, you can explore computing ideas and paradigms that fall outside the realm of UNIX. What if instead of a filesystem, there was a persistant collection of live objects (with attributes and functions and everything), like Smalltalk? How about a system where there's a unified abstraction for both network and local I/O, ala plan9? How about some new idea that hasn't been tried before? Maybe you'll fin…

This is where the education part is also helpful. It's been so long since I made a primitive OS that I wouldn't even know where to improve. But even some of the concepts in TempleOS are fascinating.

Re: The little book about OS development

#24
post #5

Other than the educational value of doing so, what would be a reason to write a brand new operating system? Obviously there is a lot to learn about existing operating systems by coding you own, much in the way that writing a new languages teaches you about existing languages, but what are some creative applications of a hand made operating system?

> Other than the educational value of doing so, what would be a reason to write a brand new operating system?

Well an operating system talks to hardware and allocates resources, right? The motivation to write a non-toy operating system must be some strong ideas about how to do those things, and they'd have to be pretty fundamental to give up on the vast advantages of interoperability and pre-existing software that would come from just implementing your ideas on top of Linux or whatever.

Past motivations for writing OSes might be expressed as licensing (GNU/Linux), disagreements about fundamental architecture of operating systems (microkernels), need for hard real-time (vxWorks), or the belief that you have the sheer resources and market power to start again and build something better (Windows NT). Security seems like another likely motivation (There's probably a better example than OpenBSD because I don't think they started from scratch).

I quite like the idea that hardware intended for autonomy might benefit from being implemented on bare metal. Devices that AREN'T general-purpose computers, but communicate only with their own hardware and with the outside world by their actions and by communications protocols, well why shouldn't they run on a custom and highly stripped-down OS? You'd expect to get benefits in performance and a smaller codebase for potential security holes. But I don't think the industry is actually headed in that direction.

Re: The little book about OS development

#27

This is probably a good thread to ask: one of my hobby projects is writing an OS, but for x86-64. My next task is user mode, and while I feel pretty solid conceptually, the details around the TSS and such I'm much shakier on. Does anyone have a good, detailed, with-code resource on such things?

You should join us on freenode #osdev if you have any questions!

(Plus, a bunch of people there are interested in Rust, but only 1-2 with Rust OS projects, so your Rust expertise would be appreciated. ;-) )

Re: The little book about OS development

#29
As someone that has just spent the last 27 months building an OS from scratch in a University research environment (an OS that can survive catastrophic hardware and software failure [0]), I am very impressed with the quality of this document. I only wish I had found it previously!

OS dev can be great fun and gives you a level of understanding about how computers actually work that is hard to gain from other sources. I have frequently found myself using the knowledge I gained from building the OS when working on other projects. It has been particularly useful when it comes to understanding performance issues. I would highly recommend it to anyone that is even remotely interested.

Other superb resources to help you get started include the OSdev wiki[1], along with this document[2] from the University of Birmingham, UK.

[0] http://www.hydros-project.org

[1] http://wiki.osdev.org/

[2] https://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures...

Re: The little book about OS development

#30
post #24
post #5

Other than the educational value of doing so, what would be a reason to write a brand new operating system? Obviously there is a lot to learn about existing operating systems by coding you own, much in the way that writing a new languages teaches you about existing languages, but what are some creative applications of a hand made operating system?

> Other than the educational value of doing so, what would be a reason to write a brand new operating system? Well an operating system talks to hardware and allocates resources, right? The motivation to write a non-toy operating system must be some strong ideas about how to do those things, and they'd have to be pretty fundamental to give up on the vast advantages of interoperability and pre-existing software that wo…

I quite like the idea that hardware intended for autonomy might benefit from being implemented on bare metal.

Some embedded OSes work by basically writing your application as an extension of the OS. So you're essentially running on bare metal there. Usually even for simple devices you want more than one thread/process....and then you start wanting OS stuff.

There's probably a better example than OpenBSD

Kaspersky's new OS is built for exactly that reason.

Also, for completeness, the osDev wiki has a list of OSes built for various reasons....some serious, some for research: http://wiki.osdev.org/Projects

Post reply on HN