Is there a way to force an app to remain running in the background no matter what? On Ice Cream Sandwich (ICS) the OS categorizes your app and each category has its own threshold in which the OS uses for determining which app to close first when it runs out of memory.

Has anyone of you been annoyed by, say you opened a timer to run in the background to measure the time elapsed of something, then you opened few more apps and got back to your timer just to see it was reset or closed? I mean, seriously, it is really excruciatingly annoying.

Is there a way to force an app to remain running in the background no matter what even when the OS runs out of memory?
The accepted answer turned out incorrect or outdated. The "App Settings" module for the Xposed app allows you to specify on a per app basis to keep apps from being killed or freed:

http://repo.xposed.info/module/de.robv.android.xposed.installer

http://repo.xposed.info/module/de.robv.android.xposed.mods.appsettings

Responsible care should of course be exercised when playing with apps changing such low level behaviour.