How to kill processes to get maximum available RAM?
That's a really silly thing to do. Android will automatically kill background processes to make more RAM available when necessary. Most of the time it leaves background processes in RAM (but not running) to allow those apps to start up quicker next time, and to use less power (because it doesn't have to keep reloading the app into RAM). See the answers to this question for more info.