Originally Posted by Ashok_mittal
how can we do this, what kind of changes we require for this and can we instruct the processor that let's say - this part of the program should be paralleled and this should be sequential, i mean it is automatic ...
Depends what you mean; if you have a multi-threaded app and your OS can run multiple tasks at once, then that part is sort-of automatic. The tasks can be run and the OS can take care of running the list of runnable tasks and should try to employ its cores usefully. And that's nice, but there is still a massive problem.
If there are data dependancies between different parts of your app, then one part has to wait for the appropriate data to be available. Not only is curing this not automatic, it can't happen. The data still has to be available before you can use it and that isn't about to be cured, as far as I can tell. So whatever your cores can do for you, they don't make data available before its available and you have to think about structuring your application so this wait for data doesn't cause it to fail.
So, while superficially you might think 'all I've got to do is use binary division and divide my app into n parallel sub-sections and my n cores will automagically give me n times the performance' practically, this won't happen because of the unavailabilty of the data for some of the processing to happen. And, worse than that, you probably have to design in intercommmunication/synchronisation facilities that don't let the individual sub-processes to run away with 'bad' data until the 'good' data arrives.