It is really an overstatement to say that Arduino, in its' AVR incarnations, has an operating system. Rather, it has statically linked runtime and libraries, which exist explicitly mostly on source level, but not really on machine code level. This doesn't mean Arduino wouldn't be trivially capable of hard real time operation. Partially this is supported by cycle-predictable nature of AVR microcontroller.
Raspberry Pi with Linux - Mathematica on top - is a different beast. Even if you ditched the kernel, you couldn't run similarly cycle-exact real time processes, because CPU and its' interfaces are not designed for this.
For best of both worlds, you probably want to use Arduino as a sort of real time slave under control of Raspberry Pi (or other fully equipped computer with sufficient interface to Arduino). Especially if you want to achieve microsecond-level (or, realistically, anything that has hard demand for below one second) response latencies, splitting tasks between the microcontroller for that and complex computation for the "real" computer is likely to be mandatory. At least if you're a hobbyist.