0

When calling fork(), what practices exist to ensure that the child process can run in parallel on a separate core?

Michael Labbé
  • 12,017
  • 4
  • 27
  • 36

2 Answers2

0

None. You can set the parent process and the child process to have disjoint affinities, but you cannot force them to run in parallel.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
0
  1. Actually having another core in your system to run it on and having that not disabled in the firmware, 2. having a kernel with SMP support, and not having it disabled either. 3. Not having your process locked to one core (keyword: cpu affinity mask).
jørgensen
  • 10,149
  • 2
  • 20
  • 27