Aviation safety management system: problem of balanced allocation of resources