Xenomai1 is a hard real-time operating system suitable for many low-latency tasks encountered in astronomical instruments. It is open source, has microsecond-level response time and coexists with the Linux kernel, thereby facilitating the execution of hard real time code on Linux systems. This presentation presents experience coding systems with Xenomai for the Magdalena Ridge Observatory Interferometer. Firstly an overview of Xenomai is given, focusing on how it achieves hard real time performance and how it can be used to interact with hardware using Linux-like device drivers. Secondly, a generic outline of the development process is given, including the mindset needed, general pitfalls to be avoided, and strategies that can be employed depending on how open the hardware and any existing source code is. Two specific case studies from the Magdalena Ridge Observatory are then presented: Firstly, the fast tip-tilt system, which must read out a 32x32 subframe from an EMCCD camera, determine a stellar image centroid and send a correction voltage to a tip-tilt mirror at up to 1kHz. Secondly, the MROI delay line metrology system, which must read laser metrology position data for ten delay line trolleys and send correction voltages to their cat’s eyes at 5kHz. Finally, some future challenges to development with Xenomai and other hard real time operating systems are discussed: processors with functionality such as system management interrupts that are beyond operating system control, and the trend towards buffered or closed interfaces between computers and hardware.