title: Divide and conquer method using parent process and child processes
body: <p>The  assignment I have to do requiers working with processes in linux. The task sounds like this: calculate the sum of the elements of an array by using the divide and conquer method in the following way- a parent proccess would split the array in  two different subbarrays, which are passed to two child processes. Every child process must calculate the sum of the elements from their own subarray and the  results(s1 and s2) would  then be added; the child processes should repeat the same "technique" till the final sum is returned.</p>
  
  <p>I must admit that I really don't know much about unix procceses, as I've just started studying this chapter,  but I know how to use fork() in order to create two child procceses from a parent proccess and also who to write a C program which uses the divide and conquer method. My problem is that I am struggling bringing these two aspects toghether, which means integrating the divide and conquer algorithm-for calculating the sum of the elements of an array- in a program that creates two child proccesses(such as the following one:)</p>
  
  <pre><code>pid_t child_a, child_b;
  
  child_a = fork();
  
  if (child_a == 0) {
  /* Child A code */
  } else {
  child_b = fork();
  
  if (child_b == 0) {
      /* Child B code */
  } else {
      /* Parent Code */
  }
  }
  </code></pre>