Hi all,
I'm trying to understand the way windows currently operates.. From what knowledge I have gathered the monotholic nature of windows xp means that the device drivers run in kernel space. So I'm just trying to get my head around how the system does a graphics operation like gl_begin().
when I call that in my user space program does a context switch occur when the method in opengl32.dll is invoked? Is there a context switch happening for every GL command?
I'm just trying to understand the architecture so I can properly design the video component of my os.
Context switching and kernel / user mode boundaries
Re: Context switching and kernel / user mode boundaries
I think yes, there is context swith. This is why M$ want to write brand new graphic drivers for Windows Vista which will operate in User Level (DPL/CPL=3).
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: Context switching and kernel / user mode boundaries
No there is no context switch. The windows OpenGL libraries use a call-gate to switch to kernel mode in the context of the current task.
Having said that there is performance overhead with a switch from user to kernel mode, but it is negligible compared to the gains you get by running the code in kernel mode.
Having said that there is performance overhead with a switch from user to kernel mode, but it is negligible compared to the gains you get by running the code in kernel mode.
This is a rumor. The original Windows NT has a graphics engine which runs in user mode. They scrapped it and moved graphics into kernel mode because it was too slow.I think yes, there is context swith. This is why M$ want to write brand new graphic drivers for Windows Vista which will operate in User Level (DPL/CPL=3).
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
--- Albert Einstein