What are the different functions of homeostasis and metabolism in living organisms?