In an ecosystem, predation is a biological interaction where a predator (an organism that is hunting) feeds on its prey (the organism that is attacked). Predators may or may not kill their prey prior to feeding on them, but the act of predation often results in the death of the prey and the eventual absorption of the prey's tissue through consumption. Thus predation is often, though not always, carnivory. Other categories of consumption are herbivory (eating parts of plants), fungivory (eating parts of fungi), and detritivory (the consumption of dead organic material (detritus)). All these consumption categories fall under the rubric of consumer-resource systems. It can often be difficult to separate various types of feeding behaviors. For example, some parasitic species prey on a host organism and then lay their eggs on it for their offspring to feed on it while it continues to live in or on its decaying corpse after it has died. The key characteristic of predation however is the predator's direct impact on the prey population. On the other hand, detritivores simply eat dead organic material arising from the decay of dead individuals and have no direct impact on the "donor" organism(s).