Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Support Us

Top Posters

REDOX - A Unix-like OS written in Rust

JayViiJayVii Registered
edited March 2016 in Development
I haven't found anything on this topic in here, so I thought I may as well post about it myself. Didn't quite find the correct Section for this, so feel free to move it, if you can think of a better place for it ;)

I stumbled upon Redox on the german linux-news site Pro-Linux.de. So I thought it would be helpful to post about it here.




What it is

Redox is a unix-like OS (similar to any BSD or Linux-based OS), written in Mozilla's Rust. Although Rust is rather young, it's definitely mature enough to serve as capable language for an OS. By design, Rust is A LOT more secure and arguably more efficient than C.

Why it is needed

Redox tries to avoid a lot of issues other Operating system have like Linux-based, BSD's, Minix, ...

In their Book they claim several issues for the OS's mentioned above:
  • legacy/old syscalls in Linux causing stability and security issues
  • Gigantic Codebase for the Linux- and BSD-Kernels themselves (also caused by their monolithic design)
  • Lack of Memory safety, due to the chosen language of Linux, BSD and Minix (C)
  • Lack of driver-support in Minix

Kernel-Design

As a matter of fact, Redox went with a micro-kernel (like Minix), so it can be easier to maintain and less prone to crashes and security issues than BSD or Linux with their Monolithic Kernels.
This means, that (for example) drivers will run in userspace, rather than kernelspace and a crash of them would not influence the stability of the system.

As comparison, monolithic kernels (like BSD,Linux or even Hurd) average around 15,000,000 lines of code, where as Microkernels (like Minix or Redox) average round 15,000 - a DRAMATICALLY smaller number.

Andrew Tanenbaum (author of MINIX) stated that for every 1,000 lines of properly written code, there is a bug. This means that for a monolithic kernel, there could be at least 15,000 bugs. In a micro kernel at least 15 bugs exist. Again,this is a DRAMATICALLY smaller number.

Obviously, there are not only advantages to microkernels, but also disadvantages:
Pro's:
  • customizable (less hard-coded functions and overall very minimalistic, sincemost stuff runs in userspace,not kernel-space)
  • security (mentioned above)
  • stability (mentioned above)
Con's:
  • Performance
    While microkernels are not nessarily slower than monolithic kernels, monolithic ones at least have the [i]potential[/i] to be faster in the future, when operations become even more rapid and complex. This is due to the need of microkernels to switch the CPU between kernel-space and userspace more often.

The License

They also claim, that the GPL is a rather restrictive license, as it tries to enforce freedom, ultimately ending up in the reverse, so the license of their choice for Redox is MIT.

Compatibility

Redox tries to remain as Linux-compatible as possible (meaning, that the most common Linux-syscalls will be supported). This means, that Linux-Applications will be able to run natively on Redox with only extremely minimal adjustments.

Does Redox try to Replace Linux?

No.





Alright guys, if you are interested in this project, make sure to check it out.
If you want to try Redox, go ahead!
It already runs on real hardware today! and there are even ready-to-boot images for Qemu.

there is SO MUCH MORE about it, that I haven't mentioned yet:

Comments

Sign In or Register to comment.