22 February 2012

Common Type System (CTS)



In order to manage different data types for inter language operability Microsoft provide special language called Microsoft IL( Intermediate language). With the help of IL we can combine different languages for one application. We can disassemble the IL code with the command ILDASM. Il file created when we compile the program. For clear more go through the figure bellow

The figure explains that in VB the data type integer compiled with the complier vbc.exe and in the C# the data type int compiled with the compiler csc.exe and form an intermediate code system.Int32 in inter mediate language. That is Integer in VB and int in C# is same as system.Int32 in IL. With the help of IL inter language operability is possible.
Consider the figure bellow which explain the compilation process of .net source code

 

Don’t mix .exe and .dll file with actual system files. It is not exactly like that, it is .net frame work’s .exe and .dll file. That means this dll and exe need CLR to run and in the case of dll there is no need of registry registration as windows dll for using. From that itself it is clear that dll is not exactly like conventional dll.
.Net module
.dll is highly resource consumable. So we depend on another technology called .net module to represent the intermediate code in IL. That means it is a temporary code for helping the smooth linking and running of a program that use multiple languages to produce a single product. .exe,.dll,.Net modules are file types and IL is a language format designed by Microsoft.
.Net Assembly
            The file types .exe,.dll,.Net module are not conventional file types in OS. So they need CLR to run the files. The file types in IL together are called .Net assembly.
Exception Manager
            It is familiar to us, exception manager is to manage exceptions when executing a program as in java .
COM Marshallar
            The code that can be run under the CLR is managed code. Some times we can not use the code supported by CLR. That means we may use conventional dll files for some applications. Those types of code are called unmanaged codes. That is some codes by pass the CLR, They are unmanaged codes. The COM Marshallar is used for marshalling of data between managed code and unmanaged code. In short COM Marshallar is used to use the code that not supported by .net together with the code supported by .net frame work.
JIT Compiler
            JIT compiler means Just In Time compiler. In the above figure native code is generated by JIT compiler. That is the function of JIT compiler. JIT compiler is not a compiles as its name indicates. It is used to convert a code to system specific code or native code, native code are CPU specific. In short JIT Compiler is used to produce architectural compactable code. Architecture of machines are varies from machine to machine, we can generate architectural compactable code with the help of JIT Compiler for achieving maximum performance.
Ngen.exe
            It is used to create native codes forcefully

No comments:

Post a Comment