Reputation: 7145
suppose the time it takes to switch between user and kernel modes is t1 and to switch between two processes is t2.Which is greater t1 or t2?
Upvotes: 0
Views: 218
Reputation: 490048
Theoretically it depends on the platform. In practice, a switch from one process to another typically goes from the original process to kernel mode, then the kernel decides which process to schedule next, then there's a switch from kernel mode to user mode running the second process.
As such, switching from one process to another includes a switch from user- to kernel-mode, plus more, so it'll be slower.
Upvotes: 3
Reputation: 60065
I think t2 is always larger, because process switch happens via kernel mode.
Upvotes: 4