Dynamic Cache Reconfiguration For Energy Optimization In Chip Multiprocessors