When user applications do a system call, the program enters to kernel mode and OS handles user requests. If at the same time two processes do a syscall, can OS do a multithreading? For example there could be two layer of a kernel, second layer will handle user requests by doing multithreading, and the first layer would control the second layer. Is this impossible? Or it's just not good at practical use?
Thanks.
It's done routinely. When a process (thread of a process) traps into the kernel, the kernel "borrows" the user thread to run the kernel code. It's been a long time (decades?) since we still had a "unique kernel lock" that forced sequential executions of threads inside the kernel. Beside the kernel itself is typically running multiple threads for its own work (paging, write-back, ....).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With