Thermodynamics of Spontaneous and Non-Spontaneous Processes