You'd probably need to write the code in C/C++ (rather than Python or some other interpreted language) to get deterministic execution, but that's an acceptable limitation in my mind.
Is there an implementation of RTLinux on ARM? If so, is it (mostly) compatible with the RPi2?
Black Swift is a newer, tinier single-board computer - for 'a bit more embedded' computing than the Raspberry Pi. No audio/video, but a built-in Wi-Fi. Actually, its central SoC in itself is a recent Atheros Wi-Fi chip that happens to have a 400 MHz MIPS 24k CPU embedded. Here's where Black Swift founders see themselves in comparison to the competition: http://www.black-swift.com/images/wiki/BlackSwift-competitio...
[1] Black Swift — tiny wireless computer https://www.kickstarter.com/projects/1133560316/black-swift-...
[2] Using AVR as peripheral controller https://www.kickstarter.com/projects/1133560316/black-swift-...
[3] ATtiny24A http://www.atmel.com/devices/ATTINY24A.aspx @Octopart https://octopart.com/search?q=ATTINY24A&filter%5Bfields%5D%5...
Frameworks like pigpio and servoblaster use that trick, but the standard gpio python module which doesn't use DMA has more mindshare, probably due to its simplicity.
There is an implementation of RTlinux for the RPi from the Navio guys [1], but I'm not sure if it's compatible with RPi2.
[1]: http://www.emlid.com/new-raspbian-with-real-time-kernel-jan-...
Besides there is lots of devices in the market positioned between Arduino and RPi. STM32 F4 Discovery board is a good example; an order of magnitude more processing power than an Arduino Uno but still a MCU designed for bare-metal (real-time) operation.