Live data from Hacker News

Hobby kernel and userspace, built mostly from scratch

github.com

11–20 of 27 posts

Re: Hobby kernel and userspace, built mostly from scratch

#11
Anyone with this type of hobby kernel experience, how hard would it be to build the "Ruby on Rails" or "NodeJS" of kernels?

If hard, why so difficult? I'm more referring to a theoretical reason, rather than practical.

Practical Reasons: - drivers are required - C/ASM is hard (ie lack of contributors) - different hardware architectures need to be supported. That part I get.

Why in theory can you not have an operating system framework that allows people to "relatively easily" build a custom kernel (instead of using Linux) the same way something like Go allows me to "relatively easily" build a custom HTTP server (instead of using Apache)?

Re: Hobby kernel and userspace, built mostly from scratch

#12

Anyone with this type of hobby kernel experience, how hard would it be to build the "Ruby on Rails" or "NodeJS" of kernels? If hard, why so difficult? I'm more referring to a theoretical reason, rather than practical. Practical Reasons: - drivers are required - C/ASM is hard (ie lack of contributors) - different hardware architectures need to be supported. That part I get. Why in theory can you not have an operating…

I used to hang on some hobby osdev boards many years ago (losethos was there, when it was still called losethosOS). I never got much further than loading the kernel, setting up protected mode, printing some text and so on, but it was an interesting crowd. The long story short is, building a day-to-day usable general purpose kernel from scratch, alone, is next to impossible.

First have to decouple Go from its runtime before you could build a kernel in it, not to mention everything else that goes w/ writing a kernel. Similarly, you can't use significant parts of C++ when building a kernel w/ it.

It seems like a lot of people are looking at Rust as a system programming language, though... (google rust kernel)

Re: Hobby kernel and userspace, built mostly from scratch

#13

Anyone with this type of hobby kernel experience, how hard would it be to build the "Ruby on Rails" or "NodeJS" of kernels? If hard, why so difficult? I'm more referring to a theoretical reason, rather than practical. Practical Reasons: - drivers are required - C/ASM is hard (ie lack of contributors) - different hardware architectures need to be supported. That part I get. Why in theory can you not have an operating…

You can look at OSkit as one attempt to do this. I think the overwhelming reason its not common is that no one wants to build an OS. If they do it's for the educational experience not practical use. This means hobbyists aren't interested in just using a framework.

Re: Hobby kernel and userspace, built mostly from scratch

#15

Anyone with this type of hobby kernel experience, how hard would it be to build the "Ruby on Rails" or "NodeJS" of kernels? If hard, why so difficult? I'm more referring to a theoretical reason, rather than practical. Practical Reasons: - drivers are required - C/ASM is hard (ie lack of contributors) - different hardware architectures need to be supported. That part I get. Why in theory can you not have an operating…

Because building a custom kernel is like building a custom implementation of a language and a runtime.

Even though you can easily implement custom HTTP server you cannot easily implement full custom Go runtime.

Re: Hobby kernel and userspace, built mostly from scratch

#16

Anyone with this type of hobby kernel experience, how hard would it be to build the "Ruby on Rails" or "NodeJS" of kernels? If hard, why so difficult? I'm more referring to a theoretical reason, rather than practical. Practical Reasons: - drivers are required - C/ASM is hard (ie lack of contributors) - different hardware architectures need to be supported. That part I get. Why in theory can you not have an operating…

I've recently spend some time playing around with the xv6 kernel (more specifically a 64bit port of it), one problem is that the amount of work necessary to get a reasonable clean hardware abstraction for a x86 system is fairly complicated. For example for a full acpi implementation, you either have to write ~50 admittedly short glue functions for ACPICA or implement acpi table reading and an AML interpreter yourself. Unfortunately if you want to use modern features of PCI, there is no way around using acpi.

That being said, there are several such "modular" kernels implemented on top of Xen. For example Mirage is a framework for creating free standing Ocaml applications on top of Xen.

Re: Hobby kernel and userspace, built mostly from scratch

#17

Anyone with this type of hobby kernel experience, how hard would it be to build the "Ruby on Rails" or "NodeJS" of kernels? If hard, why so difficult? I'm more referring to a theoretical reason, rather than practical. Practical Reasons: - drivers are required - C/ASM is hard (ie lack of contributors) - different hardware architectures need to be supported. That part I get. Why in theory can you not have an operating…

You can using the NetBSD rump kernel[1].

You get all the NetBSD drivers, IP stack etc that you can use, just add memory management, setup and so on, which is not much work, and link your application in to it. It is still under development but the basic stuff is all working well.

[1[ http://rumpkernel.org/

Re: Hobby kernel and userspace, built mostly from scratch

#18
post #13

Anyone with this type of hobby kernel experience, how hard would it be to build the "Ruby on Rails" or "NodeJS" of kernels? If hard, why so difficult? I'm more referring to a theoretical reason, rather than practical. Practical Reasons: - drivers are required - C/ASM is hard (ie lack of contributors) - different hardware architectures need to be supported. That part I get. Why in theory can you not have an operating…

You can look at OSkit as one attempt to do this. I think the overwhelming reason its not common is that no one wants to build an OS. If they do it's for the educational experience not practical use. This means hobbyists aren't interested in just using a framework.

I am not sure what exactly is meant by "Ruby on Rails of kernel". Probably "an opinionated framework to build your own kernel". In this case OSkit is probably the best answer to the question. Maybe look at micro- and exokernels.

Re: Hobby kernel and userspace, built mostly from scratch

#19
This is amazing! I've been dying lately feeling an overwhelming sense of disappointment with modern day OSs and their UX. To the point where I've wanted to start to play around with making my own.

Could anybody point me in the right direction? I'm a NodeJS web developer HTML/CSS guy. What would be the shortest/fastest path to me being able to write my own entirely custom UX?

Preferably something I could do in HTML/CSS/JS and be able to run on a desktop/laptop/phone. Thanks.

Re: Hobby kernel and userspace, built mostly from scratch

#20
post #6

Is ToAru-OS a reference to raildex?

I would love that. But "to aru" also actually means something in Japanese, which I would translate like, "there is an". Disclaimer: I definitely am not an expert on Japanese. It's actually kind of hard to translate concisely, IMO the phrase that best captures the meaning of "ToAru-OS" is "There exists an OS". But it's kind of awkward. If we used the Raildex translation, ToAru-OS would be "A Certain OS".

Sorry for going off-topic here to the thread, but ...

As someone studying the language, can you explain what the と portion of the name means? I am aware of the ある (有る) portion, "to exist", and that と is being used here to represent a clause, eg "Xと言った" (X said), "Xと思った" (X thought).

But in this case, there's nothing before とある, so why say と at all in this case? Why not just say あるOS?

Post reply on HN