paralelized and synchronized mostly independent tasks of simulation and code generation with pthreads
modifications to display