Terminal Services Architecture
Thursday, 14 February 2008 by Michel Roth
On the blog of the Enterprise Platforms Windows Server Performance Team (try saying ten times in a row) I ran into a small article about the "architecture" of Terminal Services in Windows Server 2008. It describes the startup order and, more importantly, all the binaries associated with Terminal Services in Windows Server 2008. The Enterprise Platforms Windows Server Performance Team in the article mentions the benefit of parallel sessions creation (faster logon times) and the binary details of all the new services/features ( Session Broker, Terminal Services Gateway etc.) associated with Terminal Services in Windows Server 2008. They also details the process of starting up a Windows Server 2008 server and subsequent RDP sessions:

"The Service Control Manager initializes the system services including the Terminal Services service which is implemented in termsrv.dll and hosted in an instance of SVCHOST.EXE.  The Terminal Services stack driver, termdd.sys, is loaded and creates a listener thread to listen for incoming connections on TCP port 3389.  When a session request is detected, the RDP listener thread creates a new RDP stack instance to handle the new session request.  The listener thread hands over the incoming session to the new RDP stack instance and continues listening on TCP port 3389 for further connection attempts.

When a user logs on, either at the console or via Terminal Services, the initial Session Manager process creates a new instance of itself to configure the new session.  The new SMSS.EXE process starts a CSRSS.EXE process, a Windows Logon process (WINLOGON.EXE) and a per-session instance of the Window Manager (WIN32K.SYS).  WINLOGON.EXE starts the processes listed in the following registry key (USERINIT.EXE by default): HKLM\SOFTWARE\Microsoft\Windows NT\Current Version\Winlogon\Userinit.  USERINIT.EXE starts the process defined as the shell in the following registry key (EXPLORER.EXE by default on full installations of Windows Server 2008 and CMD.EXE on Server Core installations of Windows Server 2008) and then exits: HKLM\SOFTWARE\Microsoft\Windows NT\Current Version\Winlogon\Shell.

Terminal Server client sessions use separate drivers on the server, one for the display (rdpdd.dll) and one for the keyboard and mouse (rdpwd.sys).  The user interface rendering calls are captured by rdpdd.dll and transmitted to the client over the RDP protocol.  The keyboard and mouse input on the client is transmitted over the TCP connection to rdpwd.sys for translation.  These drivers provide the remote server interaction functionality for the client session."

Read the entire article here.  


Related Items:

Terminal Server Session Broker (29 February 2008)
Windows Server 2008 Terminal Server Hotfixes (30 May 2008)
Windows 7 / Windows Server 2008 R2: Remote Desktop Connection Broker (Part One) (16 October 2009)
More Terminal Services 2008 Resources (18 February 2008)
Remote Desktop Connection Broker (Part Two) (19 October 2009)
Windows Server 2008 Parallel Session Creation Revisited (3 October 2007)
Windows 2003 Terminal Server Freezing At User Logoff? (12 April 2008)
Terminal Server Management And Administration (15 February 2008)
Windows 2008 R2 Remote Desktop Services (7 December 2009)
What Happens When You Close A Windows 2008 RemoteApp? (28 September 2007)
Comments (0)