No. Who told you they are independent? They are isolated, and isolated at the level of hardware, the CPU which has four rings of access, but Windows uses just two. And nothing in user mode can call a kernel directly. Pay attention that the control is inverted: the user sends the input through hardware, and it causes hardware interrupt. All interrupt procedures are always set up in kernel mode; and it's physically impossible to set up one in the user mode: impossible not due to some programming access at the level of OS, but because the access is sealed by setting up the hardware. Now, the interrupt procedure code eventually triggers appropriate calls in user mode, in particular, it ultimately dispatches the high-level message (like mouse down) to the application event loop (
GetMessage
/
DispatchMessage
). So, in this very case the user mode never calls anything in kernel mode; the sequence of events is just the opposite.
The main ideas are explained here:
http://en.wikipedia.org/wiki/Ring_%28computer_security%29[
^].
But of course, some of API calls are eventually delegated from user mode to the kernel, when it is required. Please see:
http://en.wikipedia.org/wiki/Windows_Driver_Model[
^],
http://en.wikipedia.org/wiki/Windows_NT#Driver_models[
^].
Here is some interesting articles on the topic:
http://www.multicians.org/protection.html[
^],
http://www.osronline.com/article.cfm?id=94[
^].
Please see also:
http://en.wikipedia.org/wiki/Inversion_of_control[
^].
—SA