Interesting. While I do appreciate that it runs on i386, I have to question its being aimed at students - or at least students of anything other than the history of computing. i386 implies BIOS, AFAIK, and requires pre-x86_64 assembler, which is only partially transferable to modern CPUs.
Oh, for sure, one would learn an awful lot working with those technologies, but as soon as one wished to work on more modern systems, one would have to forgot all of the former and all the ugly of the latter.
This isn't really a criticism, more an expression of puzzlement. Normally, I'm a pretty good contrarian, but I don't get it.
True, there was this Finn who did this some time ago and it worked out pretty well, but I still don't get why anyone would start with i386 and BIOS.
bitwize 39 days ago [-]
You can write a fully 32-bit kernel, delegate entering protected mode and using the BIOS to load from disk to the bootloader, and tell your students "this bit won't be on the exam".
MisterTea 39 days ago [-]
> i386 implies BIOS, AFAIK, and requires pre-x86_64 assembler, which is only partially transferable to modern CPUs.
Nothing wrong with this IMO. You dont want a 64-bit Arm/x86 hegemony. If the OS is designed properly you won't notice the platform underneath which means you have the right abstractions. That is an important challenge for students - decoupling platform dependency from the OS architecture. It also teaches them older tech which gives them a history lesson so they understand how and why we got here.
6SixTy 39 days ago [-]
If a 64 bit ARM/x86 hegemony is a big concern, then why not drop i386 and go with RISC-V? There's both a 32 and 64 bit variants, and a free emulator. Also, it's more useful academically and practically.
MisterTea 39 days ago [-]
Well Risc-v isn't as established as 32bit x86 which has a wide breadth of information available. There are also plenty of 32 bit x86 machines still around so testing your OS on real hardware and watching your programs work is quite a treat.
josephg 39 days ago [-]
> There are also plenty of 32 bit x86 machines still around
All x86_64 machines can also run 32 bit x86 code just fine. They have to - even modern CPUs start up in emulated 16 bit mode like it’s the 80s. They then they need to transition to 32 bit mode. And from there they can swap to 64 bit mode to run modern operating systems.
But you don’t have to do that last step. So this kernel should be able to run on any modern x86 computer on raw hardware just fine.
6SixTy 39 days ago [-]
RISC-V has plenty of reference documentation and implementation code from hardware to the OS Kernel. Open source and free too.
And running on real hardware is pretty much the last thing any OS dev actually does. Using a VM with a debugger attached rather than trying to figure out how to set up a debug harness is more convienent.
hulitu 38 days ago [-]
> And running on real hardware is pretty much the last thing any OS dev actually does.
This is sad.
> Using a VM with a debugger attached rather than trying to figure out how to set up a debug harness is more convienent.
But misses all the bugs which can only be reproduced by running on bare metal.
XorNot 38 days ago [-]
RISC-V is also proving to be big with new Chinese chip manufacturers. In terms of applicability, being able to hack the next gen of cheap IoT device processors might be pretty valuable.
pabs3 38 days ago [-]
In use by the Bootstrappable Builds folks to be able to build the Linux kernel before having a Linux or other kernel binary, since Linux requires compilers that are only bootstrapped later in the process.
Just a hobby, not big and professional like GNU. I love it.
Rochus 39 days ago [-]
What's the difference to e.g. xv6?
There are already so many Unix like operating systems of all sizes written in C (e.g. Minix, xv6, BSD, Darwin, Hurd, Lemon, MentOS, SanOS). If I were to go to such an effort, I would try another language, or even my own (like e.g. Bunnix written in Hare). It is meanwhile more than clear that it can be done in C. But C is not really a good programming language (weird syntax, incomplete type checking, many specification gaps, etc.), so it would actually be more interesting to explore the suitability of other languages for such a task.
BirAdam 39 days ago [-]
C has been the standard system language almost since the time of its creation. Teaching that standard is valuable even if we’re in the midst of a change.
As for why, a system designed to be pedantic will necessarily be different from one intending to be production ready.
Why i386 and BIOS? It is simple enough for the purpose of teaching. Inundating a student with modern x86-64, UEFI (where most implementations do not meet standards), and such is not a great idea. People just get overwhelmed and shut down. It may be worthwhile to start with something simpler honestly, like DOS and 8088, or even CP/M and 8080. Working one up through time exposes the individual to simpler things and then progressively more complex things. It is useful.
As a side benefit, teaching people about these older things instructs them on how and why things came to be the way they are which may help create better entrepreneurs.
Rochus 39 days ago [-]
> even if we’re in the midst of a change.
What change do you refer to?
Concerning C: C has obviously proven itself in countless system and embedded projects of all sizes. Nevertheless, C essentially represents the state of knowledge of the early seventies. Projects like the one discussed would be a good opportunity to test newer languages for their suitability for operating system and embedded development, without the pressure of a commercial project.
> Why i386 and BIOS? It is simple enough for the purpose of teaching.
Agree; that's also one of the reasons operating systems like xv6 dedicated for teaching do so; I'm therefore interested in how Fiwix positions itself in relation to xv6.
pjmlp 38 days ago [-]
C was hardly seen as systems language in 8 and 16 bit home computers, just one more to chose from, as most compute intensive stuff was actually still written in Assembly.
BirAdam 38 days ago [-]
Microcomputers weren't the dominant computer type in the 70s and very early 80s.
pjmlp 38 days ago [-]
And UNIX systems almost nonexistent outside Bell Labs, Stanford, Berkeley and a couple of other lucky universities.
sjsdaiuasgdia 39 days ago [-]
When you write one, you can make those choices however you like.
This target was sufficiently interesting to the people who pursued it. It doesn't have to meet your arbitrary standards.
Rochus 39 days ago [-]
Unfortunately, your comment neither answers my question nor is it helpful in relation to the other arguments.
sjsdaiuasgdia 39 days ago [-]
Other people's hobbies don't have to align to your priorities.
I asked out of interest and explained my point of view, imposing neither standards nor priorities. Why are you reacting so hostile to a question?
Isn't it rather your intention to enforce your "standard" for questions and opinions that suit you?
IgorPartola 39 days ago [-]
You are asking a question that doesn’t make sense. It seems like to you it does, and to others it sounds like “what does the color blue taste like?” People do stuff for fun. It doesn’t have to be useful. Or it can be useful to them because it isn’t the existing thing. xv6 is great, this is different. It makes different choices and studying the differences can be a good thing. Comparing two different pieces of software written in the same language is sometimes exactly what you want.
The logic of “something similar already exists so don’t bother” is reductive. I am sure 99% of hobbyist software is useless to anyone but the person who wrote it. It still helps people learn and become professionals.
Remember a few weeks ago there was a post here by a high school student detailing building a laptop from scratch. Was that wasted effort because you can just buy a laptop? Was Linux wasted effort? Why does this project offend you so much that you keep commenting on it in such a negative way?
Rochus 39 days ago [-]
> Comparing two different pieces of software written in the same language is sometimes exactly what you want.
And here we are at my question, which obviously makes sense. So what's the difference to xv6? Why did the author consider it important to implement yet another unix-like system in C? What is the core benefit of this specific kernel? The website doesn't provide an answer.
> that you keep commenting on it in such a negative way?
That is a false accusation. I have not said anything negative about this project.
rangerelf 39 days ago [-]
I think it's a cool project even though I have no interest in downloading and running it, but it's a technological curiosity that might yield some insight of other things.
If you're so hell-bent on knowing what differentiates Fiwix from xv6 why don't you download the projects and compare them? You shouldn't be asking others to do your work for you, or to justify their choices and actions to you.
Rochus 39 days ago [-]
> You shouldn't be asking others to do your work for you, or to justify their choices and actions to you.
Are you serious? This is HN, so it's reasonable to assume that there are people here (obviously not you) who know the project and can answer questions about it quickly. After all, the project author has even set up a dedicated website and is asking for support for his project. It should be in his and the other project contributors' interest to communicate the advantages of the project to people on their own initiative. I don't consider it my job to analyze the source code to find out for myself. I'm very interested in lean operating systems, especially for embedded SMP systems, but my time is limited.
kube-system 39 days ago [-]
> Why did the author consider it important to implement yet another unix-like system in C? What is the core benefit of this specific kernel? The website doesn't provide an answer.
The website does answer your questions:
> It is designed and developed mainly as a hobby OS
A hobby is something that someone does for their personal enjoyment; it isn't any more complicated than that.
Rochus 39 days ago [-]
> It is designed and developed mainly as a hobby OS
That doesn't answer my questions at all; e.g. Linux also started out as a hobby, and yet Linus had a clear position on why he considered his system to be better than e.g. Minix, and why he made certain design decisions. Hobby does not in any way preclude rational, goal-oriented motivation.
kube-system 39 days ago [-]
> Hobby does not in any way preclude rational, goal-oriented motivation.
And it doesn't imply one, either. Most hobbies are just hobbies, that began as hobbies, and continue to stay hobbies.
Replace programming with any other hobby here -- It would be ridiculous to say, in response to someone showing a hat they they've knit: "Why did you consider it important to knit yet another hat? What is the core benefit of this specific knit hat?"
Rochus 38 days ago [-]
> It would be ridiculous to say, in response to someone showing a hat they they've knit: "Why did you consider it important to knit yet another hat? What is the core benefit of this specific knit hat?"
Not at all. Knitting has a clearly defined purpose: to make a particular garment with a particular shape and pattern so that you can wear it, give it as a gift or sell it (coincidentally, I have detailed first-hand insider knowledge on this topic). But I don't think we need to continue this discussion because it doesn't bring me any closer to the answers to my questions, and apparently you don't have the answers either.
kube-system 38 days ago [-]
No, hobbies are done for the enjoyment of the activity itself. That's what the word means. The answer to your questions is likely "there is no advantage" and "because the author thought it was fun"
You are asking questions about things that were never asserted in the first place. "Why did the author consider it important to implement yet another unix-like system in C?" Nobody ever said it was!
mytec 38 days ago [-]
If you left it at the initial question this might have been an entirely different thread.
"There are already so many Unix like operating systems of all sizes written in C... If I were to go to such an effort, I would try another language...It is meanwhile more than clear that it can be done in C...so it would actually be more interesting to explore the suitability of other languages for such a task."
Based on your earlier remarks why not say knitters should use different material or needles to make it more interesting? Why do the same pattern over again when so many knitters have probably knit the very same pattern already.
Because the statements above miss the point of what hobby means to most people.
>> and apparently you can't answer the questions either
No one is required to. Not anyone on HN or the hobbyist in question.
Paul-Craft 39 days ago [-]
This one is just a hobby (won't be big and professional like gnu), after all. ;-)
Rochus 39 days ago [-]
Most other mentioned are also just hobby kernels; actually also Linux and BSD started that way.
I hope this newcomer Fiwix doesn't steal too much mindshare away from HURD...
pabs3 38 days ago [-]
IIRC Fiwix has syscalls compatible with Linux, which could be useful in some cases.
Rochus 38 days ago [-]
Thanks for the first useful answer so far. Does this mean that Fiwix would allow ELF binaries compiled for Linux to be executed natively in a Fiwix system without emulation? Have you tried this?
pabs3 38 days ago [-]
I think that is correct, depending on how modern the syscalls used are I guess. I expect it doesn't implement a lot of them. I haven't tried it though.
39 days ago [-]
dkenyser 39 days ago [-]
> since it serves also for educational purposes, the kernel code is kept as simple as possible for the benefit of students and OS enthusiasts
Oh, for sure, one would learn an awful lot working with those technologies, but as soon as one wished to work on more modern systems, one would have to forgot all of the former and all the ugly of the latter.
This isn't really a criticism, more an expression of puzzlement. Normally, I'm a pretty good contrarian, but I don't get it.
True, there was this Finn who did this some time ago and it worked out pretty well, but I still don't get why anyone would start with i386 and BIOS.
Nothing wrong with this IMO. You dont want a 64-bit Arm/x86 hegemony. If the OS is designed properly you won't notice the platform underneath which means you have the right abstractions. That is an important challenge for students - decoupling platform dependency from the OS architecture. It also teaches them older tech which gives them a history lesson so they understand how and why we got here.
All x86_64 machines can also run 32 bit x86 code just fine. They have to - even modern CPUs start up in emulated 16 bit mode like it’s the 80s. They then they need to transition to 32 bit mode. And from there they can swap to 64 bit mode to run modern operating systems.
But you don’t have to do that last step. So this kernel should be able to run on any modern x86 computer on raw hardware just fine.
And running on real hardware is pretty much the last thing any OS dev actually does. Using a VM with a debugger attached rather than trying to figure out how to set up a debug harness is more convienent.
This is sad.
> Using a VM with a debugger attached rather than trying to figure out how to set up a debug harness is more convienent.
But misses all the bugs which can only be reproduced by running on bare metal.
https://bootstrappable.org/ https://lwn.net/Articles/983340/
There are already so many Unix like operating systems of all sizes written in C (e.g. Minix, xv6, BSD, Darwin, Hurd, Lemon, MentOS, SanOS). If I were to go to such an effort, I would try another language, or even my own (like e.g. Bunnix written in Hare). It is meanwhile more than clear that it can be done in C. But C is not really a good programming language (weird syntax, incomplete type checking, many specification gaps, etc.), so it would actually be more interesting to explore the suitability of other languages for such a task.
As for why, a system designed to be pedantic will necessarily be different from one intending to be production ready.
Why i386 and BIOS? It is simple enough for the purpose of teaching. Inundating a student with modern x86-64, UEFI (where most implementations do not meet standards), and such is not a great idea. People just get overwhelmed and shut down. It may be worthwhile to start with something simpler honestly, like DOS and 8088, or even CP/M and 8080. Working one up through time exposes the individual to simpler things and then progressively more complex things. It is useful.
As a side benefit, teaching people about these older things instructs them on how and why things came to be the way they are which may help create better entrepreneurs.
What change do you refer to?
Concerning C: C has obviously proven itself in countless system and embedded projects of all sizes. Nevertheless, C essentially represents the state of knowledge of the early seventies. Projects like the one discussed would be a good opportunity to test newer languages for their suitability for operating system and embedded development, without the pressure of a commercial project.
> Why i386 and BIOS? It is simple enough for the purpose of teaching.
Agree; that's also one of the reasons operating systems like xv6 dedicated for teaching do so; I'm therefore interested in how Fiwix positions itself in relation to xv6.
This target was sufficiently interesting to the people who pursued it. It doesn't have to meet your arbitrary standards.
In other words: https://i.kym-cdn.com/entries/icons/facebook/000/043/517/i_d...
Isn't it rather your intention to enforce your "standard" for questions and opinions that suit you?
The logic of “something similar already exists so don’t bother” is reductive. I am sure 99% of hobbyist software is useless to anyone but the person who wrote it. It still helps people learn and become professionals.
Remember a few weeks ago there was a post here by a high school student detailing building a laptop from scratch. Was that wasted effort because you can just buy a laptop? Was Linux wasted effort? Why does this project offend you so much that you keep commenting on it in such a negative way?
And here we are at my question, which obviously makes sense. So what's the difference to xv6? Why did the author consider it important to implement yet another unix-like system in C? What is the core benefit of this specific kernel? The website doesn't provide an answer.
> that you keep commenting on it in such a negative way?
That is a false accusation. I have not said anything negative about this project.
If you're so hell-bent on knowing what differentiates Fiwix from xv6 why don't you download the projects and compare them? You shouldn't be asking others to do your work for you, or to justify their choices and actions to you.
Are you serious? This is HN, so it's reasonable to assume that there are people here (obviously not you) who know the project and can answer questions about it quickly. After all, the project author has even set up a dedicated website and is asking for support for his project. It should be in his and the other project contributors' interest to communicate the advantages of the project to people on their own initiative. I don't consider it my job to analyze the source code to find out for myself. I'm very interested in lean operating systems, especially for embedded SMP systems, but my time is limited.
The website does answer your questions:
> It is designed and developed mainly as a hobby OS
A hobby is something that someone does for their personal enjoyment; it isn't any more complicated than that.
That doesn't answer my questions at all; e.g. Linux also started out as a hobby, and yet Linus had a clear position on why he considered his system to be better than e.g. Minix, and why he made certain design decisions. Hobby does not in any way preclude rational, goal-oriented motivation.
And it doesn't imply one, either. Most hobbies are just hobbies, that began as hobbies, and continue to stay hobbies.
Replace programming with any other hobby here -- It would be ridiculous to say, in response to someone showing a hat they they've knit: "Why did you consider it important to knit yet another hat? What is the core benefit of this specific knit hat?"
Not at all. Knitting has a clearly defined purpose: to make a particular garment with a particular shape and pattern so that you can wear it, give it as a gift or sell it (coincidentally, I have detailed first-hand insider knowledge on this topic). But I don't think we need to continue this discussion because it doesn't bring me any closer to the answers to my questions, and apparently you don't have the answers either.
You are asking questions about things that were never asserted in the first place. "Why did the author consider it important to implement yet another unix-like system in C?" Nobody ever said it was!
"There are already so many Unix like operating systems of all sizes written in C... If I were to go to such an effort, I would try another language...It is meanwhile more than clear that it can be done in C...so it would actually be more interesting to explore the suitability of other languages for such a task."
Based on your earlier remarks why not say knitters should use different material or needles to make it more interesting? Why do the same pattern over again when so many knitters have probably knit the very same pattern already.
Because the statements above miss the point of what hobby means to most people.
>> and apparently you can't answer the questions either
No one is required to. Not anyone on HN or the hobbyist in question.