Technical Feasability Study: Is Linux Ready for Medical Devices? LinuxCon Europe 2014, Florian Mösch, Dräger Medical GmbH 2 Who we are | What we did | What we learned 3 Who we are | What we did | What we learned 4 Who we are | What we did | What we learned 5 Who we are | What we did | What we learned 6 Who we are | What we did | What we learned 7 Who we are | What we did | What we learned 8 Who we are | What we did | What we learned Safety, Security and Reliability Cost & Licensing Commercial Support Boot Time Migration Effort Networking Regulatory Aspects Graphics Capabilities Toolchain Quality Future Proof Realtime Scalability 9 Who we are | What we did | What we learned Windows Embedded Compact Linux BSD Unix Neutrino Free RTOS Pike OS Nucleus Windows WOA 10 Who we are | What we did | What we learned vxWorks Integrity 11 Who we are | What we did | What we learned 12 Who we are | What we did | What we learned 13 Who we are | What we did | What we learned 14 Who we are | What we did | What we learned Linux QNX Comment max. latency ? 25-125 µs depends on cpu allocation max. CLC duration ? 100-460 µs depends on cpu allocation measurements ran for just a few minutes timing highly depends on cpu allocation (separate measurement + calculation threads) 15 Who we are | What we did | What we learned Realtime QA Farm “cyclictest“ on Freescale i.MX6 16 Who we are | What we did | What we learned void init() [ int fd = open("/sys/class/gpio/gpioXXX/direction", O_WRONLY); write(fd, "in", 2); close(fd); fd = open("/sys/class/gpio/gpioXXX/edge", O_WRONLY); write(fd, "falling", 7); close(fd); fd = open("/sys/class/gpio/gpioXXX/value", O_RDWR); poll_fd = malloc(sizeof(*poll_fd)); poll_fd->fd = fd; poll_fd->events = POLLPRI; poll_fd->revents = 0; } void wait() { char buf[2]; read(poll_fd->fd, buf, 1); poll(poll_fd, 1, -1); } 17 Who we are | What we did | What we learned 18 Who we are | What we did | What we learned Linux max. latency max. CLC duration H/W S/W H/W QNX Comment 66 µs 50 µs Linux: single core, QNX: two cores 250 µs 112 µs Linux: debug build, QNX: optimized Linux QNX ~10 µs 6.4 µs H/W trigger, S/W IRQ, GPIO out Comment Linux measurements ran for at least 12 hours cheated: 100% „dummy“ load generated to avoid power-saving 19 Who we are | What we did | What we learned Linux max. latency max. CLC duration QNX Comment 66 µs 30 µs without graphics 250 µs 101 µs without graphics max. latency ?! >1000 µs with graphics (on separate core) max. CLC duration ?! >1000 µs with graphics (on separate core) all measurements ran for at least 12 hours cheated: 100% „dummy“ load generated to avoid power-saving 20 Who we are | What we did | What we learned Linux max. latency max. CLC duration QNX 20 µs 30 µs Linux: kernel w/o graphics 280 µs 101 µs Linux: kernel w/o graphics max. latency 34 µs using system timer max. CLC duration 63 µs using system timer, max. optimization max. latency 31 µs using external trigger 253 µs using external trigger max. CLC duration all measurements ran for at least 12 hours 21 Comment Who we are | What we did | What we learned Linux max. latency max. CLC duration QNX vxWorks Comment 31 µs 30 µs 55 µs no graphics used 253 µs 101 µs 214 µs no graphics used all measurements ran for at least 12h all systems using external trigger but not using graphics h/w 22 Who we are | What we did | What we learned Linux max. latency max. latency ? 31 µs max. CLC duration ? max. CLC duration 253 µs QNX >1000 µs 30 µs >1000 µs 101 µs all measurements ran for at least 12h 23 Who we are | What we did | What we learned vxWorks ? Comment with graphics load 55 µs w/o graphics load ? with graphics load 214 µs w/o graphics load Linux QNX vxWorks ? max. latency 303 µs 971 µs max. latency 31 µs 30 µs max. CLC duration > 6.500 µs 108 µs ? max. CLC duration 253 µs 101 µs 214 µs w/o graphics load Who we are | What we did | What we learned with graphics load 55 µs w/o graphics load all measurements ran for at least 12h moderate graphics load on QNX, max. Load on Linux no graphics support on vxWorks (yet) 24 Comment with graphics load 25 Linux QNX max. latency 95 µs 65 µs 100 µs with graphics load mean latency 3 µs 2 µs 15 µs with graphics load max. latency 42 µs 47 µs 67 µs w/o graphics load mean latency 1 µs 1 µs 10 µs w/o graphics load max. CLC duration 161 µs 91 µs 171 µs with graphics load mean CLC duration 21 µs 31 µs 86 µs with graphics load max. CLC duration 76 µs 57 µs 109 µs w/o graphics load mean CLC duration 19 µs 30 µs 63 µs w/o graphics load Who we are | What we did | What we learned vxWorks Comment Lessons Learned: Never trust your Hardware Compiler: Linux recent, QNX slightly behind, vxWorks – well... Qt5: Linux recent, QNX slightly behind, vxWorks „early access“ Tracing: Linux: LTTng, QNX and vxWorks: commercial tools User experience: „QNX feels a bit like Linux“ Users want to develop target S/W on Windows hosts. Remote debugging: Eclipse (on Windows host...) 26 Who we are | What we did | What we learned Thanks to Thomas Mond and Roelof Berg for their support. Thank you for your attention.
© Copyright 2025