A Hierarchical Approach for Resource Management in Heterogeneous Systems