Is it possible ????


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Is it possible ????
# 15  
Old 08-16-2007
Have you tried? If so, what did it do or not do that failed to meet your requirements?
Code:
a.sh&
b.sh&

or
Code:
a.sh& b.sh&

# 16  
Old 08-16-2007
Going back to what Kahuna said earlier. On a true single process system ( ie not a multi-core or CMT ) it is not possible to run two commands turly in parallel. Since the processor has only one thread of execution it can only handle one operation at a time. Therefor calls to fork() for two threads and exec() are also sequential and then they time-share on the CPU. I does not matter if you write the code in a script or in C, the same fundamental still applies: there will be some delay between when one process starts and the other does.

Putting the scripts in the background and executing them that way is a reasonable approximation of parallel operation. Why exactly do you think you need the processes to start at exactly the same time?
 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question