If minimum frequency is zero then just stop the task and start the present task in that core . Cost for this is 1 unit .
if ( mini == 0 ) { isRunning [ miniind ] = false ; isRunning [ ele ] = true ; cost += 1 ; }