Currently, in madsim, running multiple simulations of the same program occurs within the same process. However, real-world programs inevitably use static variables, which can lead to different initial states for each simulation, resulting in non-deterministic outcomes. To resolve this issue, we can first fork a new process and then run the simulation.
Currently, in madsim, running multiple simulations of the same program occurs within the same process. However, real-world programs inevitably use static variables, which can lead to different initial states for each simulation, resulting in non-deterministic outcomes. To resolve this issue, we can first fork a new process and then run the simulation.