Labels

Friday, April 13, 2007

AppDomain Concept

Below is the way how Appdomain works:






A single process can run several application domains.











þ A single managed process (one which has loaded the CLR) can contain any number of AppDomains.

þ The simplest only contain one.

þ AppDomains:

o Are a finer-grained level of isolation between logical components inside the same process, for both reliability and security purposes.

o They are a good alternative to Process-Level Isolation because of the relative inexpensiveness of Creating, Managing, And Switching execution and due to the level of Resource Sharing among AppDomains in a process.

o AppDomains within a process are not entirely isolated. While they do generally load their own assemblies and have their own copies of static variables, for example, resource leaks from one AppDomain can affect another and HANDLE-thieving security holes are possible because AppDomains share a single per-process handletable. AppDomains can be shut down individually while still keeping the enclosing process alive.



Regards,
Arun....

1 comment:

  1. • When an application is launched, memory and any other resource for that application are allocated. The Physical Separation of this memory and resources is called a Process. In general, it is impossible for standard processes to access each other's data without using a proxy. Using a proxy incurs major overheads and coding can be complex.
    • When Microsoft designed the .NET Framework, it added one more layer of isolation called an application domain or AppDomain. This application domain is not a physical isolation as a process is; it is a further Logical isolation within the process. Since more than one application domain can exist within a single process, we receive some major advantages.
    • Microsoft encapsulated all of the functionality for these application domains into a class called System.AppDomain.

    • In general, it is impossible for standard processes to access each other's data without using a Proxy. Using a proxy incurs major overheads and coding can be complex. However, with the introduction of the application domain concept, we can now launch several applications within the same process. Threads can easily execute across application domains without the overhead associated with inter-process communication. Another benefit of these additional in-process boundaries is that they provide type checking of the data they contain.

    ReplyDelete