If you want those two things to happen at the same time, then none can be executed first, but both have to be running at the same time.
For this the multitasking OS lets one process run for a while, then lets the other process run for a while. This time ususally is somewhere around 1-10ms.
From the user point of view it seems like both are running at the same time, but in reality they are taking turns to use the cpu.
For this the multitasking OS lets one process run for a while, then lets the other process run for a while. This time ususally is somewhere around 1-10ms.
From the user point of view it seems like both are running at the same time, but in reality they are taking turns to use the cpu.