Role of diffusion in biological waste treatment