This question already has an answer here:
- How does multitasking work 3 answers
I get how multiple processes can run on a single core by interleaving the processing. What I don't understand is how the operating system ensures that the program releases the processor after a certain amount of time. If only one program can run at a time, and the os allows a process to run, what's to prevent that process from never giving the processor back?