5 ms·
I'm surprised C# is suitable for this. How does that work?
by skybrian 10y ago
I'm surprised C# is suitable for this. How does that work?
- amaneureka 10y agoBecause It is not possible to run C# executable without .NET framework. I had to work on a compiler first. Source: https://github.com/amaneureka/AtomOS/tree/master/src/Compiler/Atomixilc https://github.com/amaneureka/AtomOS/tree/master/src/Compile... Which works on the top of Microsoft's IL Builder. Then it add compiler stubs to support .NET code and convert code into native x86 assembly. The assembly file is then passed through NAsm and proper linking chain to produce final Kernel ELF binary. Build.sh produces an ISO image which can be used to boot OS in either virtual machine or on real hardware. I explained it here: https://www.reddit.com/r/programming/comments/5xlmc6/a_new_hobby_os_from_scratch_in_c/dej2la3/ https://www.reddit.com/r/programming/comments/5xlmc6/a_new_h...
- pjmlp 10y agoGood luck with the project, we already have too many kernels written in straight C. Only thanks to this kind of work one can prove it is possible.
- ianai 10y agoAs a guy who really thinks *nix is awesome, I welcome new additions, too.
- djsumdog 10y agoThat's a lot-o-work! Pretty impressive man. I think projects like this are awesome.
- spooterspooter 10y agoAnd now, if it gets popular, you can watch Microsoft sue people who use it.
- willvarfar 10y agoHow does that work? Surprisingly well :) Many hobby kernels (as mentioned in these comments) have used C#, as well as bleeding-edge research kernels e.g. Microsoft's Singularity project: https://en.wikipedia.org/wiki/Singularity_(operating_system) https://en.wikipedia.org/wiki/Singularity_(operating_system)
- nickpsecurity 10y agoBleeding-edge was VerveOS: https://www.microsoft.com/en-us/research/publication/safe-to-the-last-instruction-automated-verification-of-a-type-safe-operating-system/ https://www.microsoft.com/en-us/research/publication/safe-to... It's legacy will be in their IronClad Apps. Look into those if you want to see how far they've gone. Also, Microsoft Research & HLL vs Nix and C in security are a gap that's ever widening. ;)
- pjmlp 10y agoHaven't you heard of Singularity or Midori? http://joeduffyblog.com/ http://joeduffyblog.com/ https://www.infoq.com/presentations/csharp-systems-programming https://www.infoq.com/presentations/csharp-systems-programmi... There are quite a few OS projects written in system programming languages with GC, all the way back to Mesa/Cedar at Xerox PARC. If you want to have an idea, check the Project Oberon book. http://people.inf.ethz.ch/wirth/ProjectOberon/index.html http://people.inf.ethz.ch/wirth/ProjectOberon/index.html This is the 2013 re-edition, it was originally published in 1992.
- bad_user 10y agoAlso a library for building special purpose operating systems (unikernels) in OCaml, which is actually used: https://mirage.io/ https://mirage.io/
- apotheon 10y agoLet's not forget other more recent stuff that still happened before AtomOS, like Redox. I seem to recall seeing a couple others recently as well, but for some reason I'm drawing a blank now. I think the big deal about this is mostly just that it's an effort outside of Microsoft to do this, and compile it to machine code rather than just use some kind of "higher order" OS that needs to run on top of something else -- and even there it's not unique, even if it looks more interesting than FlingOS (which is evidently just a new take on the "toy kernel/OS for teaching" idea).
- contextfree 10y agoMidori was still built on a C++ microkernel though.
- pjmlp 10y agoWhich doesn't diminishes its value. No one would though of writing an OS in C++ in the 90's, it was too slow and everyone knew that microkernels could only be possibly written in C.
- 10y ago