Solution 1:

Machines run operating system software; or run operating systems. My laptop here runs Windows 7.

At least in British English, software can run on or under the OS.

My program "foo" runs under Windows 7 but fails completely under Windows 8.
I still have to test it on Windows Phone 7.

The first sentence might use under because it could be under conditions which include Windows 7, but using under here is normal usage [at least in Britain].

The second sentence could be taken to mean on a machine running Windows Phone 7, but since reference to the machine is understood, "on an OS" is fine.

Solution 2:

A machine is running a certain operating system.

A program is running on a certain operating system.

References and examples:

From the Wikipedia article "Computer compatibility":

Software compatibility can also refer to ability for the software to run on a particular operating system.

From the article about Linux:

Cell phones and PDAs running Linux on open-source platforms became more common from 2007.

And thus, depending on who your audience is, you can say:

  • I'm using Ubuntu Linux
  • My PC is running Ubuntu Linux

And

  • I'm playing Braid (running)* on Ubuntu Linux
  • I was never able to get Adobe Photoshop to run properly on Ubuntu Linux

*the bracketed part is optional, but not necessary