Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Application domain

From Wikipedia, the free encyclopedia
This article is about CLI application domains. For other application domains, seeDomain (software engineering).

Anapplication domain is a mechanism (similar to aprocess in anoperating system) used within theCommon Language Infrastructure (CLI) to isolate executedsoftware applications from one another so that they do not affect each other. Each application domain has its ownvirtual address space whichscopes the resources for the application domain using thataddress space.

Creating multiple application domains in the same process is not possible in .NET Core and .NET 5+.[1]

Properties

[edit]

A CLI application domain is contained within an operating system process. A process may contain many application domains. Application domains have isolation properties similar to that of operating system processes:

  • Multiplethreads can exist within a single application domain.
  • An application within a domain can be stopped without affecting the state of another domain in the same process.
  • A fault orexception in one domain does not affect an application in another domain or crash the entire process that hosts the domains.
  • Configuration information is part of a domain's scope, not the scope of the process.
  • Each domain can be assigned different security access levels.
  • Code in one domain cannot directly access code in another.

In this sense, a CLI is like a mini-operating system. It runs a single process that contains a number of sub-processes, or application domains.

The advantage of application domains is that running multiple application domains may require fewer resources, such as memory, than running multiple operating system processes. Communication between domains still requires marshalling, so the overheads can be closer to using multiple processes than to communicating within a single domain.

Inter-domain communications

[edit]

Direct communication cannot be achieved across application domains. However, application domains can still talk to each other by passingobjects viamarshalling by value (unbound objects), marshalling by reference through a proxy (application-domain-bound objects). There is a third type of object called a context-bound object which can be marshalled by reference across domains and also within the context of its own application domain. Because of the verifiabletype-safety ofmanaged code, a CLI can provide fault isolation between domains at a much lower cost than an operating system process can. The static type verification used for isolation does not require the same process switches or hardware ring transitions that an operating system process requires.

Managed code

[edit]

Application domains are a purelymanaged code concept. Any includednative/unmanaged code (e.g., C++) is largely unaware of them. Static variables seem to be shared across domains, callbacks can be problematic, and any memory corruption bugs in one domain is likely to corrupt other domains.

References

[edit]
  1. ^".NET Framework technologies unavailable on .NET Core and .NET 5+".Microsoft Docs.Archived from the original on 2019-04-20. Retrieved2021-02-02.
Implementations
Architecture
Components
Tools
Decompilers
Obfuscators
IDEs
Organizations
Architecture
Components
Implementations
Microsoft
Other
Languages
Major languages
Other
Comparison
Retrieved from "https://en.wikipedia.org/w/index.php?title=Application_domain&oldid=1173905538"
Categories:
Hidden category:

[8]ページ先頭

©2009-2025 Movatter.jp