Hello all...
how can i implement merge sort using process in linux? i know fork should be used to create process.but how can i control the child process to work with array passing some kinds(actually i don't know)parameter to it?
Thanks in advance
Actually a process will create two child processes each having half of the array element...recursively a function will be called to do this..after completion of recursion two child process will return the array element to their mother process and it will sort those two arrays....is it possible??how??
what you want to do can be effectively done by threads.. but if you want to create process for that then you need a way for communication between the processes..like shared memory, memory mapped files or IPC. read about them.