Create cpu scheduling code