Redox OS vs GNU/Linux


#1

What is so unique about Redox OS compared to GNU/Linux? Does it use the Unix kernel? Is Redox faster than GNU/Linux?


#2

The main difference between GNU/Linux and Redox is the architecture. Redox is based on a micro-kernel. That means anything that is not absolutely necessary to run in kernel space is run in user space. The main reason for this is safety. Anything in user space can go bogus without killing the system. Just the pure amount of code that you have to “trust” is far less. Consider the huge piles of code that runs in your Linux kernel – no single person can have an overview of whats really going on there. This “problem” is mitigated by kernel modules but you can still “fuck up the system” that way. The reason why Linux is doing this – keep in mind this is my take on the subject and may be wrong – it is just easier. The Linux kernel started roughly out like it is today and a huge amount of people contributed to the code. It has just organically evolved from this easier approach in what it is today – a massive 25 million (is this still correct?) pile of code nobody really knows what’s going on (and no single person really can) mostly consisting of device drivers.

Meanwhile there where many attempts to write usable micro-kernels. You see some of the results in the embedded world where hardware requirements limits the kernels that can run on it to be lean. You can cut down Linux pretty much and modern hardware is mostly capable of running a Linux kernel nowadays and micro-kernels where not a very huge success in the industry (turns out minix is quite successful – thanks Intel … ). But to get back to your initial question. Micro-kernels are seen to be a better design but just not practical in the past. Redox is trying to change the view on it and is making use of Rust to achieve this. Linux is very hard tied to its kernel structure and the C programming language. There is no way this will ever gonna change. Proving that micro-kernels can run your off the shelf daily computer one day is one goal Redox is heading for. Speaking of if Redox is faster than Linux, this is not a battle Redox can win today. There is mancenturies of work in the Linux kernel. Competing with that is really hard. Even billion dollar software companies like Microsoft and Apple having a hard time when it comes down to competing with Linux. And what does “faster” even mean. I am thinking here … what is involved in processing the “problem” the software is trying solve here. I had a cross platform program running on Linux and macOS that was manipulating many small files. Turns out the process took roughly 13 seconds on Linux and about one minute and five seconds on macOS. HSF+ was a real performance killer back then – never tested it with APFS. Redox is not ready for daily use yet competing with the speed and features with ext4 (or any other popular filesystem on Linux) is currently out of question.

Redox tries to leverage the advantages of Rust to the OS level by having a micro-kernel design that is usable for average people and not just an academic experiment or a niche (proprietary) product running on exotic hardware like QNX.


Redox Performance
#3

Oh ok thanks man :slight_smile:

What about Haiku OS vs Redox, which one would you say is better (Haiku is a new OS being developed as well).

Why does Redox chose to use Rust over C++?


#4

So I’ve never heard of Haiku before so I can’t really answer that one. Though as to why rust was chosen over c++, is because of the safety grantees that rust provides for a system programming language. Thanks to the strict compiler checks and the rust concept borrowing make a lot of common programming and memory bugs nonexistant. Though that’s not to say you can’t have bugs in rust.