Groups | Blog | Home
all groups > dotnet academic > june 2005 >

dotnet academic : Runtime hosts - don't get it


Stelrad Doulton
6/16/2005 8:53:16 PM
What I want to know is; do all shell executed .NET app run in the same
process? For that matter do all runtime-hosts run all of their app-domains
in the same process?

In the case of a shell executed application here's my understanding: Double
clicking a .NET executable file invokes a runtime host specifically for
running user space apps (by which I mean services, exe's - not hosted by
IIS, SQL Server or anything else).

This runtime-host creates an app domain, loads the application's primary
assembly and kicks it off at the entry point. Referenced assemblies are
loaded at the point at which they are first needed. So is this runtime host
an ever present process on my machine? Is there a limit to the number of add
domains it can support?

Here's another thing, I also read:

"There is not a one-to-one correlation between application domains and
threads. Several threads can be executing in a single application domain at
any given time"

OK

"and a particular thread is not confined to a single application domain. "

eh?

"That is, threads are free to cross application domain boundaries; a new
thread is not created for each application domain."

So is the run-time host playing scheduler for a predefined number of threads
switching them between app domains?

Thanks to anyone who can shed some light


jason NO[at]SPAM jasonhaley.com
7/2/2005 7:48:29 AM
Very good questions!

Here are some resources that might help you:

Application Domains - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconapplicationdomains.asp
Hosting the CLR - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconhostingcommonlanguageruntime.asp


The book "Customizing the Microsoft .Net Framework CLR" http://www.amazon.com/exec/obidos/tg/detail/-/0735619883/qid=1120314328/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/103-3392811-0072667?v=glance&s=books&n=507846
might be something you would be interesting in to.

Jason Haley

[quoted text, click to view]

AddThis Social Bookmark Button