Common Language Runtime (CLR)

Lets Talk about CLR in more details.

It is a execution engine of .net framework where all .net application run under the supervision of the CLR.

Application which run under CLR are provided with the following features.

  1. Security
  2. Portability(Platform In-dependency)
  3. Automatic memory management

CLR internally contains the following things in it:-

  1. Security Manager
  2. JIT (Just in time ) compiler
  3. Garbage Collector
  1. Security Manager

    Security manager is responsible for taking care of the security of application that id it will not allow applications to interact directly with the operating system.

  2. JIT compiler

    JIT compiler is responsible for the conversion of CIL code into machine code adopting a process known as Conversion gradually during the program execution

  3. Garbage Collector

    Garbage collector is responsible for automatic memory management where memory management is a process of allocation and deallocation of memory that is required execution of program.Memory management of two types:-

    1. Manual/Explicit
    2. Automatic/Implicit
    3. In the first case programmer are responsible for allocation and deallocation of the memory whereas in second case garbage collector will take care of the allocation and deallocation process of the memory.Garbage collector will allocate the memory for objects when they are required and also deallocate or reclaims memory of those object once they become unused under the program because unused object of a program are treated as a garbage.

      Lets Understand this with an example

      Suppose we have 1000 line of code as below

*Note :- Garbage Collector was designed by JOHN MC CARTHY around the year 1959 to overcome the problem with manual memory management.


No comments:

Post a Comment