Reputation: 21
I am new to Stack Overflow and this is my first question.
Does anyone know how does the process system should work?
My issue is with the premise that if the CPU switches back and forth between numerous processes, for example, if the user is typing something in process X and the CPU switches off to another process, say Y, what happens to the user? Is the process model stating that any data intercepted is put in the stack and later popped out as the user program (in this case, process X) uses the CPU again, or is it just stating that all other processes must wait until the user process is completed?
Upvotes: 2
Views: 60
Reputation: 29
I'm not sure this is the place to ask that question, however:
Short answer: no all other processes don't wait for the user process to be completed, data can be stored in buffers ready to be read.
medium answer: It has to do with operating systems theory, supervisors, context switching and interruptions.
If you are interested in a lengthier answer or are eager to learn more about that I can recommend you the Silberchatz's Operating Systems book. You can also read about I/O interrupts and that also answers how async stuff works.
Upvotes: 2