5 ms·
I think you might be missing the point about BEAM. It's not that BEAM itself is more robust than Linux. BEAM and OTP enable the creation of highly fault toleran
by karmajunkie 9y ago
I think you might be missing the point about BEAM. It's not that BEAM itself is more robust than Linux. BEAM and OTP enable the creation of highly fault tolerant services through the use of supervision trees, among other things. These restart failures from last-known-good state within microseconds. While Linux itself is certainly stable it doesn't provide any analogous facilities for creating robust services.
- Cyph0n 9y agoLinux is robust and fault tolerant by design. This comes at the cost of higher performance overhead, of course. Besides, why are you comparing BEAM to a full-fledged OS kernel?
- cechmaster 9y agoMy understanding is that the OS is a few gigs in size and uses a lot of memory, and neves compiles to about 20 megabytes while still being resilient and easy to update.
- Cyph0n 9y agoActually, a compiled Linux kernel is on the order of ~5 MB. A minimal root filesystem adds another ~50 MB to that. It starts to get bloated once you add kernel modules, drivers, etc.
- lomnakkus 9y agoThat's 5MB compressed and also doesn't account for the fact that you'd also need an actual userspace of some description.
- karmajunkie 9y agoWhen I start writing applications in kernel space, i'll take "Linux" as a more serious contender for an application platform. you're the one making the comparison, so I'm pointing out that Linux provides very little in the way of application-level tools. Edit: sorry, i see you're not the GP commenter.
- rdtsc 9y ago> Linux is robust and fault tolerant by design. How is Linux fault tolerant. Say a kernel driver starts overwriting kernel memory how do the rest of the kernel subsystems isolate that fault and keep going without crashing?
- Cyph0n 9y agoTo clarify, Linux is fault tolerant where it needs to be: keeping userspace faults contained. And what happens when a core module that is part of BEAM starts overwriting critical BEAM VM data structures? A more apt comparison would be software running on top of BEAM vs. a userspace process running on top of Linux.
- rdtsc 9y ago> To clarify, Linux is fault tolerant where it needs to be: keeping userspace faults contained. Agreed. > And what happens when a core module that is part of BEAM starts overwriting critical BEAM VM data structures? Segfaults and other terrible things. > A more apt comparison would be software running on top of BEAM vs. a userspace process running on top of Linux. That's a better analogy of course. I've heard of BEAM VM described as an "OS for application code". Nobody would want to put their latest and greatest crown jewel production code on a Windows 3.1 platform, where one segfault in the calculator process takes down the word processor, but that is essentially what is happening when using shared memory and concurrency units (threads, goroutines, co-routines, green threads etc).
- pjmlp 9y agoLinux is not an high integrity class kernel. In fact in high integrity certified deployments, it is another actually robust and fault tolerant kernel running Linux kernel as yet another user process. Kernels like INTEGRITY are robust and fault tolerant by design. https://www.ghs.com/products/rtos/integrity.html https://www.ghs.com/products/rtos/integrity.html