Who executes first after fork(): parent or the child?

In general, nothing can be said about the relative order of their execution.

Now, let’s consider your specific problem. If:

  1. both processes take a non-trivial amount of time to run, and
  2. you’re saying that one runs to completion before the other makes any progress, and
  3. there are unused CPU cycles, and
  4. this happens every time you run the application.

Most likely this indicates that there is some (perhaps unintended) synchronization going on between the two processes.

Leave a Comment

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş