I also posted this response to the Winforms list, but before I
realized the question had also been posted here.  I think that either
this list or the CLR list is more appropriate, so I'm also responding
here.

Puneet Jain wrote:

> Hi..

> Can anybody guess about these questions???

> 1. Is CLR a process or a thread? if process then name it... if thread, name
> its parent process?

Neither.  The CLR is a runtime infrastructure that is hosted by a
process.  In order to run MyApp.exe, which is a managed exe written in
C#, the OS loads MyApp.exe and, depending on OS, either calls a stub
that calls the _CorExeMain export from mscoree.dll or the OS will load
mscoree and call _CorExeMain directly (XP and later).  _CorExeMain
initializes the runtime and then calls the managed entrypoint of
MyApp.exe.  The process works similirly for managed dlls.  When they
are loaded, _CorDllMain in mscoree.dll is called by the stub in the
unmanaged entrypoint of the dll.  You can also load the runtime into
any process using the CorBindToRuntimEx() API.

> 2. Is Garbage Colelctor a process or a thread? if process then name it... if
> thread, name its parent process?

Neither.  The GC is code that can be invoked on any thread of the
runtime's choosing.  I phrased that vaguely because I'm not sure
whether the GC always runs on a separate thread or whether a thread
running user code is used.


--
Steve Johnson

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to