16 ms·
> the rockets fly with a heavily customized Linux install My jaw hit the floor the first time I heard this. Why Linux instead of an RTOS?? Apparently Tesla's a
by 8_hours_ago 8y ago
> the rockets fly with a heavily customized Linux install
My jaw hit the floor the first time I heard this. Why Linux instead of an RTOS?? Apparently Tesla's autopilot also runs Linux, which seems like a huge accident waiting to happen (pun intended).
- kevan 8y agoI'm not familiar with this space but I'm pretty sure there are hard realtime kernels for linux. I'd hope they're using one.
- FredFS456 8y agoNI's cRIO devices use a real-time variant of Linux. http://www.ni.com/white-paper/14627/en/ http://www.ni.com/white-paper/14627/en/
- crististm 8y agoTechnically there used to be (still is?) such a thing as realtime Linux but not _for_ Linux (which you probably meant the userland?). Regardless. There are many and far better alternatives to Linux for real time applications.
- gapo 8y agoRT Preempt / Preempt-RT patch still exists. It slowly is being integrated into mainline as per everyone's wishes but it is still a thing.
- kevin_thibedeau 8y agoThe original RTLinux it also still usable and it provides it's own hard RT scheduler.
- rurban 8y agoI've worked with RTLinux in automotive. It is only used in R&D and testing. It's much worse than INTime (windows rtos) or L4, which are usually used. I've even patched g++ to work on RTLinux eliminating all the dynamic, unreliable stuff. People are using Linux when they need HW and driver support, e.g. gigabit Ethernet, firewire and such. RTOS vendors charging shitload of money on those drivers. I trust the Linux drivers more than the RTLinux scheduler or libc. But well, recently networking went to hell, so even there they start fucking up.
- deleted 8y ago[deleted]
- janoc 8y agoPretty much anything that actually needs hard realtime is very likely running on a dedicated MCU/FPGA/ASIC. Linux is vastly easier to use for everything else, though. Navigation or communication doesn't need hard realtime, for example.
- agildehaus 8y agoGoogle's self-driving cars run a modified Ubuntu. Or did, last time they talked about it. https://www.youtube.com/watch?v=7Yd9Ij0INX0 https://www.youtube.com/watch?v=7Yd9Ij0INX0
- agumonkey 8y agoI'm sure anything embedded is almost nothing like the pre-modified stock. The few paper I've read from embedded people is that they know how and will strip everything down until things are like they need.
- eeZah7Ux 8y ago"strip everything down" consists in removing packages, especially daemons, you don't need. You don't (want to) make huge changes to the kernel and libraries codebase tho, even if the changes are meant to remove code you don't need, because testing a heavily modified OS gets prohibitively expensive. Especially on "modern" embedded from the last 10 years were RAM and storage are not that limited.
- joering2 8y agoUbuntu and Centos come pretty naked; what would you strip and why? Im asking because I run few instances with very heavy traffic and have no issues whatsoever. Just added nano and fail2ban and it runs with no issues for about 2 years now.
- tcoff91 8y agoYeah I don't even do embedded work or anything real-time and even I know that in applications like this you should probably be using something like Green Hills Integrity RTOS.
- BugsJustFindMe 8y ago(no judgement) Given that you've never worked in the field, what makes you think that?
- tcoff91 8y agoIt has a long history of use in Aerospace and military applications.
- kjs3 8y agoWhich this isn't.
- BugsJustFindMe 8y agoThat's a reasonable starting assertion, I guess, but all kinds of things have long histories of use without precluding the validity of using other things. Sometimes things get used because of inertia. Sometimes things get used because people who don't really know the difference say things like "we definitely must use X" (historically X might be a megacorp technology company like SAP or Oracle or IBM) despite Y being just as good or better. For instance, did you know that Windows XP has a long history of being used in military embedded devices that store user data (on a writeable, obviously, FAT32 file system) where the way you turn them off is to just cut the power? I shit you not. I've seen state-of-the-art Navy-used sonars where the internal computer was running Windows, and you would transfer data off of the internal hard drive by FTP over Ethernet, and it had no on/off switch, just power or no power.
- mwfunk 8y agoI'm amazed that anyone would think that. I've worked on all sorts of embedded systems and worked with a many more people who've worked on far more than I, and RT Linux was very common and suitable for these sorts of things 10-15 years ago, never mind now.
- starkruzr 8y agoI've worked on RT Linux before. Works fine.
- dwpdwpdwpdwpdwp 8y agoDitto. The Xenomai Linux co-kernel does too. Handy for CAN/etherCAT controllers
- joering2 8y agoI worked on some .NET modules that indeed worked in rocket installation so yepp both linux and windows runs up.
- phkahler 8y ago>> Apparently Tesla's autopilot also runs Linux, which seems like a huge accident waiting to happen (pun intended). Not to worry, the tight control loops the require determinism all run on Arduino boards.
- eecc 8y agoNot sure if you’re trolling or not. Well played
- deadmetheny 8y agoI have some good news for you - we have invented these things called "jokes", in which people make statements about things that are obviously untrue as a means to elicit a humourous response in the reader. Now you too can go forth with this knowledge and be prepared for a world in which people aren't saying obviously untrue things solely as an attempt to trick the uneducated and gullible into believing falsehoods! Good luck!
- btilly 8y agoI have some good news for you. There is a place where that type of humor is appreciated. That place is Reddit.
- deadmetheny 8y agoThe GP's joke was good dry humour that, given the lack of downvotes, was clearly appreciated. Reddit is where you go for low-hanging fruit. So no, I'm going to push back against turbonerd NO FUN ALLOWED types when the jokes are actually funny.
- ASalazarMX 8y agoI recognize jokes are rare here, but that one was borderline at most. Reddit is where that comment would birth a chain of Galaxy Quest references.
- eecc 8y ago
- BugsJustFindMe 8y agoAs a person who used to write navigation and control software for autonomous vehicles who occasionally gets downvoted for telling people that you really don't need a fancy RTOS for this stuff, you really don't need a fancy RTOS for this stuff. Linux is a very common platform for highly responsive robotic systems. I promise that their pid control isn't an Electron app.
- mlaretallack 8y agoAgree completely. Hard real time is possible with Linux, we use it for sub millisecond control of Traffic Lights. The only issue we ever hit is proving that the code running is the stuff we expected to run.
- mlaretallack 8y agoBut I have to add we have a real embedded cortex checking everything, just in case ......
- arcticfox 8y ago> Agree completely. Hard real time is possible with Linux, we use it for sub millisecond control of Traffic Lights. Out of curiosity, why do traffic light controls need to be that precise?
- huehehue 8y agoVenturing a guess -- there's either some X% accuracy standard required by the government for who-knows-what reason, or it's for red light cameras and ticketing systems. "Ironically, the biggest concern with red-light camera systems is that they are so precise. They measure a driver’s speed and exact location within a fraction of a second — but do not leave any wiggle room for the errors of traffic signals such as inconsistent yellow light times"[0] If there's not an accuracy threshold for safety reasons, there's gotta be one when traffic ticketing revenue is on the line (also I guess determining fault at accidents, vehicular manslaughter cases, etc.) [0] https://www.mercurynews.com/2014/06/06/red-light-cameras-how-accurate-are-they/ https://www.mercurynews.com/2014/06/06/red-light-cameras-how...
- Aloha 8y agoThey could have used RTEMS (was designed for missiles) - on some level, if you design accordingly, you dont need a realtime operating system anymore - you can get by without it, and its easier to find people to design software in my opinion for not an RTOS
- gmueckl 8y agoHow would you design a complex control software for a realtime application so that you don't need an operating system? I don't see how.
- user5994461 8y agoThe operating system provides a standardized IO API and schedule processes/threads. If you don't have fancy IO (LCD, hard drive, network, etc...) and multi processing, there is no need for an OS.
- gmueckl 8y agoSorry, I don't understand your point at all. Even fairly simple looking applications can end up doing all kinds of things at once / in an interleaved manner. Preemptive scheduling is simpler and therefore safer than trying to squeeze everything into some kind of gigantic global state machine.
- bipson 8y agoAny substantiated argument why using Linux "is a huge accident waiting to happen"? Did you know that Linux can handle hard RT, if you use the right hardware (and maybe the right kernel/patches).?
- crististm 8y agoI'm speculating that he does know. But with all the filters you added (right hardware, right patches etc.) you would be better off to add the right patch -Linux/+<real_realtimekernel> Besides, if you follow Linux kernel development, you see that the effort is virtually never for real-time but for general purpose.
- bipson 8y agoAny RTOS has the very same hardware restrictions, and often only works on a very small number of (certified/supported) platforms. There is no reason per se to attribute any downsides onto these "filters".
- coldtea 8y ago>Did you know that Linux can handle hard RT, if you use the right hardware (and maybe the right kernel/patches).? Does TFA (which sure, is for Tesla, but same leadership) describe an environment where people use "the right hardware"?
- 8_hours_ago 8y agoCertification. Many commercial RTOS's are already certified to ASIL-C or ASIL-D, which requires extensive testing to verify that the system will work as designed and every code path is covered by tests. Products exist like Automotive Grade Linux, but you will have to go through the verification and certification process yourself which isn't quick or cheap. I'm not even sure it's possible to certify Linux to ASIL-D. So yes, I'm sure that Linux can work. But it will be difficult to prove to auditors that it will always work.
- JumpCrisscross 8y ago> Why Linux instead of an RTOS? Same reason SpaceX eschews radiation-hardened processors for redundant off-the-shelf cores: supplier competition. There aren't many RTOS engineers on the market; there are many Linux engineers. Once they got over the cost of hardening the kernel, SpaceX found itself at a scaling advantage versus RTOS-based competitors.
- da02 8y ago(I don't have any experience with real-time applications.) What are some things they had to do to harden the kernel?
- shittyadmin 8y agoNot just that but holy shit some of those commercial RTOSes have major issues. I work in aerospace and we recently used one where the whole system would crash after ~230 days of uptime. At least with Linux you're getting a system that's been used so much that all major issues like that are ironed out. Nothing beats a few million testers.
- jtwaleson 8y ago248 days of uptime by any chance? edit: I saw the same on a fleet of thousands of JVMs which hung on 100% CPU after 248 days very consistently. Closest thing to an explanation I ever got was perhaps it is storing uptime in hundredths of a second (why not ms???) in signed 32 bit integers, see: https://ma.ttias.be/248-days/ https://ma.ttias.be/248-days/ In the end we solved it by restarting with a cronjob between 2am and 4am after 247 days...
- LinuxBender 8y agoOne thing to look at is the sum of Anonpages if you have THP enabled. That was enabled by default after CentOS6.2. The usage itself isn't an issue, but there is a known memory leak in THP and the fragmentation can get wedged after a couple hundred days based on usage characteristics of the server.
- 8y ago
- lutorm 8y agoSome of the rationale for the flight software design is explained in https://lwn.net/Articles/540368/ https://lwn.net/Articles/540368/
- phendrenad2 8y agoNow just hold on a minute. I’ll bet you five bucks that Linux is just the brains of the rocket, controlling a network of RTOS-running (or not) microcontrollers (or maybe ARM SBCs.
- deleted 8y ago[deleted]
- espadrine 8y ago> Why Linux instead of an RTOS? An RTOS has nice guarantees, and I definitely see the appeal, but on the other hand: - SpaceX machines receive more irradiation that computers on the ground, so computation errors already make the behaviour of the software chaotic, - The wealth of complex, widespread libraries helps a lot.
- halbritt 8y agoEh, RT-Preempt works fine.