Saturday, 20 July 2013

Common Language Runtime in .net

CLR is the run time environment in which .net application are executed CLR forms as a layer on top of as providing it services between .net application of OS.It internally contains other components.


Class Loader:Class loader is responsible for verify the class libraries refered the .net application and load all those class libraries into memory to make them available for .net application.
it is not responsible for loading .net application into memory

Code managers:In .net the code manager is responsible for loading .net application code into memory and managing until the .net application was closed..Net application code is classified into
1.managed code
2.un managed Code

Garbage Collector:
This is responsible for memory management for the .net application.when u create variables and objects in the program then allocates memory for them and de-allocating memory when their lifetime is expired


Security Manager:in .net you can provide the security either by using role based security or code access security.When you provide security by using either of this then verifying the security and executing the security related code is the
responsibility of security manager.Role based security provides the security based on the roles available in OS

Exception Manager:Is response for verifying whether there is any possibility for exception ,raise the exception.If there is possibility,verify whether exception handling code is provided and executing is providing and otherwise terminate the program abnormal

Thread Manager:Executing multiple tasks at a time is called as multitasking.To implement multi tasking u need to create threads with in the application.When you create a thread with in .net application for implementing multitasking executing those threads is the responsibility of thread manager

Just In time compiler:
Every .net language provides its own compiler that compiles the application according to the syntax of that language.But all the compiles of .net language will compile the application to MSIL or CIL code.MSIL is a new low level language created by ms.Advantage of MSIL is it is CPU platform independent.But MSIL code is not understandable by the processor.The JIT compiler in CLR is responsible for compiling  MSIL code to CPU native code understandable by the processor.CLR contains multiple JIT compiles one for each CPU platform

No comments:

Post a Comment