Ecosystem vulnerability and biodiversity