samedi 30 octobre 2010

Parallel programming


The parallel programming is an old concept but now it’s very demanded specially after the success of the distributed applications and the stop of the CPU evolution. In the past if your boss don’t like your code and want you to write a better code you can just take a 6 month  vacation   and when you will come back your code will run fine on a more developed machine but now it is impossible so we need to start thinking about  the parallel programming. But parallel programming is hard and if you don’t pay attention the best thing that can happen is to get wrong results and of course the worst thing is your code will crash down so the developer needs help. 
Java and .net offer some tools to help the developer to write nice parallel code with some slight differences but basically is the same concept even the name of most methods are the same like “isalive”,”join”…. But I found that java is more flexible in handling variables specially that comes from outside the current thread thru inheriting from the thread class and overrides the run methods so you can create constructers and entering all variables that you like witch I found little harder with .net even with the paramatrizedThreadstart delegate  but I think that with .net is easier to create a new thread and run any method that you like in it also the two frameworks offer the tools to manage the thread pool and I think in both frameworks it was handled fine.
But starting from the .net framework 4.0 there was a great work on the parallel programming with the parallel task libraries so the idea is to match the code with the parallel programming patterns and models thru names like tasks and taskfactories also they create great book http://msdn.microsoft.com/en-us/library/ff963552.aspx explaining how you can use those classes and libraries and even showing some figures to help developer to decide whatever hi will paralyze data, tasks or flows. So I think that they done a great job in the new framework.  Now we are waiting for java 7 and I’m sure that java will create something to handle these problems and to develop better parallel programming tools

4 commentaires:

  1. Ce commentaire a été supprimé par l'auteur.

    RépondreSupprimer
  2. like your method to link your problematic ideas ; a structured thinking within a strong future vision..
    Wish u all the success ;)

    RépondreSupprimer
  3. c'est très bien fait votre travail mehdi, j'apprécie vraiment votre méthode d'analyse qui repose sur des aspects pratiques et non pas sur du blabla théorique qui caractérise la majorité des articles sur le net, bon courage et bonne continuation.

    RépondreSupprimer