Common
Language Runtime:
Lets
see what actually CLR is and why it is so important –
1.The Common Language
Runtime (CLR) is the virtual machine component of MS.NET
framework and is responsible for managing the execution of MS.NET
programs. It is a
engine that runs the dotnet framework. Each and every process of a program
which you write in DotNet is managed by CLR.
2.It
works as a layer between Operating Systems and the applications written in
MS.NET languages. Dotnet
framework is platform dependant. It only executes on WINDOWS operating system.
This CLR is acts as a layer between OS and our application to execute it.
3.The
Common Language Runtime (CLR) 's Just In Time (JIT) compilation
converts Intermediate Language (MSIL) to native code on demand
at application run time.
üIn CLR there are different compilers for
different languages.
üThese
compilers converts the program code into MSIL (Mircosoft Intermediate Language) code. This MSIL
is special language developed by the Microsoft which is understand by
framework.
üNow
in CLR there are JTI’s (Just In Time) compilers which converts this MSIL code
into native code which is understand by machine and our program executes and we
are able to see the output.
4.During the execution of the program
,the Common Language Runtime (CLR) manages memory, Thread execution, Garbage
Collection (GC) , Exception Handling, Common Type System (CTS), code
safety verifications, and other system services.
üCLR
performs code management, code execution, memory management, memory allocation,
memory de-allocation etc.
üAll
processes from program compilation to execution will be handled by CLR.
üCLR
also having one most important block called as Garbage Collector (GC) which
runs simultaneously with your application. The task of this is, it frees the
memory of unused object in the application. So that developer does not need to
explicitly take care of memory management it can be done by CLR implicitly.
5.The Common Language Runtime (CLR)
environment is also referred to as a managed environment, because during the
execution of a program it also controls the interaction with the Operating
System.
üCLR
operates with the help of operating system and works as a layer between OS and
dotnet framework that’s why dotnet is platform dependent it only works in
WINDOWS Operating systems like XP, Windows 7, Server etc.
The
code which is compiled by the CLR is called as Managed Code. If we are using any third
party code which is called by Unmanaged code because that is not compiled by
CLR.
0 comments:
Post a Comment