Optimizing parallel simulation of multi-core system