I am currently studying about operating systems and have something that I do not completely understand. In a time shared system with preemption, processes are always swapped. However, if a user process is executing on one of the CPUs there can be no other process that is also executing on the same CPU. If all CPUs are taken by user processes, the operating system processes cannot run at the same time, so what is it that causes causes timeout preemption (CPU timer?)?
Moreover, what confuses me is the notion of kernel and user threads. I have read that kernel threads are the ones that get scheduled to execute on the CPU. Moreover, user threads are mapped to kernel threads via some ordering (one-to-many, many-to-one, many-to-many). I believe this has something to do with the question above but I cannot figure it out from the documentation that I have.
Thank you. Cheers!