Birth and death of cosmic black holes