♣    CLR is a common execution engine for all .net languages

♣    The main responsibility of CLR is executing .net applications and it will provide some other services such as code management, memory management, multi threading, exception handling facility , security and debugging and so on.

♣    All the CLR responsibilities representing by CLR architecture

Diagram for CLR Architecture


clr


Class Loader :


♣    Which loads classes from application to CLR

Code Manager :


♣    Which manages the code during executing the application

♣    It will accept managed code and it will reject un manage code

Managed Code :


♣    The code which is taking the help of CLR for execution is called as managed code

Example : All .net Languages code  (C#.net, VB.net, VC++.net)

♣    An application can contain .net code and non.net code like below

dotnet code


Unmanaged Code :


♣    The code which is not taking the help of CLR for execution is called as unmanaged code.

♣    Within the .net application non .net languages code is unmanaged code.

♣    Code manager is accepting the managed code because managed code is depending on CLR for execution as well as code manager is rejecting the un managed code because un managed code is not depending on CLR for execution.

JIT Compiler :


♣    JIT compiler stands for Just In Time compiler, which converts MSIL code to native code because operating system can understand only native code.

Garbage Collector :


♣    In .net technology the memory management is handling by garbage collector.

♣    To perform this memory management garbage collector doing 2 duties

                            1. Allocating Memory

                            2. De allocating Memory

Allocating Memory :


♣    When a new object is created by the application , garbage collector will allocate memory for that newly created object with in heap data structure

♣    Heap is a data structure which can contain collection of elements

De allocating Memory :


♣    This duty garbage collector will implement in two steps

Step 1: Recognizing the un used object


♣    An object which is not used by the application since long time then garbage collector will recognize particular object as un used object.

Step 2 : Collection Process


♣    It is a process of designing the recognized un used object and collecting the memory from destroyed object

Exception Manager :


♣    An exception can be defined as a runtime error.

♣    Exception handling is a mechanism to handle runtime errors

Purpose :


♣    To avoid abnormal program execution termination we will go for exception handling

♣    Exception manager provides exception handling facility for .net applications

Thread Support :


♣    Thread is an independent execution path or code path, it able to run simultaneously with other code paths

Multi Threading :


♣    Implementing multiple code paths or multiple execution paths or multiple threads simultaneously is called as multi threading.

Purpose :


♣    To execute multiple tasks simultaneously as well as to improve the performance of the application we will go for a concept called multi threading

♣    Thread support provides multi threading support to .net applications.

Type Checker :


♣    Which provides strict data type checking

COM Marshal :


♣    COM stands for component object model, using COM we can develop reusable components.

♣    COM Marshal allows .net applications to consume COM components

Security Engine :


♣    Which provides various types of authentications to implement security for .net applications

Debug Engine :


♣    Debugging is a process of tracking the error

♣    Debug engine provides various types of debugging facilities for .net programmer.

Base Class Library Support :


♣    Which provides class library support for .net applications.