Vote count:
0
If I understand correctly, OS runs in kernel mode and schedules processes for execution. Then we go to user mode and our code of process is executed. Then somehow we go back to kernel mode and next process is scheduled for execution.
I've read that system calls (for example: requests to access filesystem) cause CPU to go back to kernel mode. However let's say that there is this code:
for(int i = 0; i > -1; ++i);
which will take much time and it looks like that no system calls will be done here.
What does cause that processor is switched back from user mode to kernel mode? Some timeouts?
asked 27 secs ago
Aucun commentaire:
Enregistrer un commentaire