csrss.exe and ROS GUI

Ask your support questions in here

Moderator: Moderator Team

Post Reply
gvp87
Posts: 6
Joined: Thu Mar 06, 2008 8:07 pm

csrss.exe and ROS GUI

Post by gvp87 »

I've looked through some of the source code for csrss.exe, and have done some googling, but i'm still not completely sure. Is csrss.exe the program responsible for creating the GUI for ROS??

Ged
Developer
Posts: 925
Joined: Thu Sep 29, 2005 3:00 pm
Location: UK

Post by Ged »

no, csrss is the environment subsystem section of the Windows subsystem. It contains things like console windows and creating and deleting processes and threads. It also has some rather obscure stuff in there, like VDM.

gvp87
Posts: 6
Joined: Thu Mar 06, 2008 8:07 pm

Post by gvp87 »

So which files are responsible for the GUI in ROS then?

z180
Posts: 197
Joined: Sat Mar 10, 2007 7:58 pm

Post by z180 »

win32k.sys for the kernel-mode code (ntuser... ntgdi...) functions and
user32.dll for the user-mode part.

Ged
Developer
Posts: 925
Joined: Thu Sep 29, 2005 3:00 pm
Location: UK

Post by Ged »

gvp87 wrote:So which files are responsible for the GUI in ROS then?
It depends on what area you're interested in and at what level. The GUI can be related to a whole host of components.

The Win32 subsystem consists of win32k, gdi32 and user32. However, there are other very important components like comctl32 and comdlg32. You obviously have explorer itself too.

etko
Posts: 154
Joined: Thu May 26, 2005 3:43 am
Location: Slovakia
Contact:

Post by etko »

Sorry for stealing this thread but I am appealing on devs to move console handling/drawing from csrss to the same place where normal windows are handled with HW enabled acceleration. Is that doable?

Ged
Developer
Posts: 925
Joined: Thu Sep 29, 2005 3:00 pm
Location: UK

Post by Ged »

yes, but you loose compatability.

What's your problem with csrss?

etko
Posts: 154
Joined: Thu May 26, 2005 3:43 am
Location: Slovakia
Contact:

Post by etko »

Slowness, turn up console, turn up sysinternals - process explorer and watch the CPU go high. Inability to use some fancier VESA 2 text modes or gfx console. Volkov Commander is really sweet on high resolutions in DOS true is that COMMAND.COM, is not so friendly without ANSI.SYS. Maybe all that can be patched but is truly crss the right place to draw an console?

Smiley
Developer
Posts: 156
Joined: Fri Nov 10, 2006 3:36 pm

Post by Smiley »

etko wrote:Slowness, turn up console, turn up sysinternals - process explorer and watch the CPU go high. Inability to use some fancier VESA 2 text modes or gfx console. Volkov Commander is really sweet on high resolutions in DOS true is that COMMAND.COM, is not so friendly without ANSI.SYS. Maybe all that can be patched but is truly crss the right place to draw an console?
in windows it is done in csrss

Goplat
Developer
Posts: 6
Joined: Wed Oct 12, 2005 1:04 am

Post by Goplat »

Since consoles are just text, the overhead of message passing to another process isn't a big issue.

If you are seeing high CPU usage in DOS programs, that's to be expected unfortunately, and it has nothing to do with csrss. Most DOS programs were written under the assumption that they would be the only program running on the system (because in single-tasking DOS, this is true); they use busy-wait loops without relinquishing the CPU.* In a Win32 console program, this isn't a problem.

*Actually, I just did a test, and even if a DOS program uses the hlt instruction to give up the CPU, it still uses 100%. This is major lameness on the part of ntvdm, oh well. It does seem that ntvdm will throttle CPU usage when it's idle for a while, at least.

cppm
Posts: 289
Joined: Wed May 02, 2007 10:03 pm

Post by cppm »

Doesn't putting the console stuff in csrss.exe enable access to the same console for all the subsystems? In which case it's a good idea on the basis that any future subsystems will be able to share it.

I'd be willing to bet that was why Microsoft put it there in the first place (back in the day when POSIX and OS/2 compatibility was still important :P)

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest