Both (a) and (b). An ecosystem may be defined as a structural and functional unit of the biosphere, comprising living organisms and their non-living environment that interact by means of food chains and chemical cycles resulting in energy flow, biotic diversity and material cycling to form a stable, self-supporting system