'PC + Realtime + VM =?

This is a rather high-level "is this something worth investigating further" question as part of a programming project. Would this hypothetical be possible (and if so which OS would allow this)?

  1. Some sort of vaguely realtime OS running in a VM on a modern PC. Doesn't need to be like a full-blown RTOS, but I would like the ability to respond to events in say 5 microseconds.
  2. Direct hardware (e.g. I/O ports) access would make things easier
  3. Able to use the HPET or some other mechanism for high-precision event timing.
  4. Able to access the parallel port in EPP or ECP mode.

I have a few questions about the viability of such an arrangement.

  1. Is there a vaguely realtime PC OS that can use the HPET?
  2. Is it even possible to get ~5 us timing precision on a VM given the need to access the parallel port? I.e. would the VM driver for the parallel port itself preclude such tight timing?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source