I'm curious what the cost is on modern CPUs in terms of cycles to perform a switch from Kernel and User mode?
views:
103answers:
1
+1
A:
Switching from “user mode” to “kernel mode” is, in most existing systems, very expensive.
It has been measured, on the basic request getpid, to cost 1000-1500 cycles on most machines.
Of these just around 100 are for the actual switch (70 from user to kernel space, and 40 back), the rest is "kernel overhead". In the L3 microkernel the minimization of this overhead reduced the overall cost to around 150 cycles.
Cited from here.
Kevin Boyd
2009-09-02 14:37:54
getpid? The question is about the Windows kernel.
Hongli
2009-09-08 23:29:56
Windows NT kernel provides POSIX subsystem;)
el.pescado
2010-01-05 10:27:31