Create output.txt

how do i make sure that the threads execute in parallel, so that they get equal time slots when they are scheduled?