Analysis and Modeling of Multiprogramming Performance of Chip Multiprocessors focusing on Resource Contentions