Like any other plateform, the .Net Framework introduces terimnology that you need to be aware of Following is a list of some of these terms:
1. CLR
The Common Language Runtime (CLR) is a key .Net Framework component. The CLR is the container, or the execution environment, in which all the managed code runs. The CLR getsits name from the fact that .Net provides a binary standard and any programming language that adheres to the binary standard can be used for writing code that can be run by the CLR. In its infrastructure services to support execution of managed code. These services include automatic memory management, type safety, thread and process management, security and versioning. The CLR sits between the managed code and the operating system so that your code is insulated from interacting directly with the operating system. This arrangement makes your code portable to some extent and also frees you from having to do system-level tasks so that you can concentrate on writing application code.
The CLR provides the following services:
- Code Management
- Software memory isolation
- Verification of the tyoe safety of MSIL
- Conversion of MSIL to native code
- Loading and execution of managed code (MSIL or native)
- Accessing metadata (enhanced type information)
- Managing memory for managed objects
- Insertion and execution of securty checks
- Handling exceptions, including cross-language exceptions
- Interopeation between .NET Framework objects and COM objects
- Automation of objects layout for late binding
- Supporting developer services (Profiling, debugging, etc.)
2. MANAGED CODE
The Code which is managed by CLR.
Managed code runs under a contract of cooperation with the CLR. This means that managed code must supply the metadata necessary for the runtime to provide services such as memory management, cross-language integration, code access security, and automatic control of objects lifetime.
3. MSIL
The Microsoft intermediate Language (MSIL) is the equivelent of Java byte code. The MSIL executes the managed code. languages that support generating MSIL can leverage the infrastructure services of the CLR.
MSIL is a stack based set of instructions designed to be easily generated from source code by compilers and other tools. Several kinds of instructions are provided, including instructions for arithmetic and logical operations, control flow, direct memory access, exception handling,and method invocation. These is also a set of MSIL instructions for implementing object-oriented programming constructs such a s virtual method caals, field acess array access, and object allocation and initialization.
4. JIT
C# Interview Question and Answers
MSIL is a stack based set of instructions designed to be easily generated from source code by compilers and other tools. Several kinds of instructions are provided, including instructions for arithmetic and logical operations, control flow, direct memory access, exception handling,and method invocation. These is also a set of MSIL instructions for implementing object-oriented programming constructs such a s virtual method caals, field acess array access, and object allocation and initialization.
4. JIT
The CLR provides three JIT compilers for converting MSIL to native code: EconoJIT,JIT, and OpJIT. Each JIT compilers has been designed to meet specific gaols with respect to performance and resource usage. The performance charactristics are summarized:
JIT Compiler Input Language JIT Compiler Overhead Compilation Speed Quality of Output
EconoJIT MSIL(incl. OptIL) Very Small Very Fast Low
JIT MSIL(incl. OptIL) Medium to large Moderate High
OptJIT OptIL only Small Fast High
Because of the low overhead of the EconoJIT compiler, as well as the ease with which it can be ported to new architectures, the .NET Framework does not include an interpreter for MSIL. (EconoJIT is so named becauseit performs the same task as the full JIT compiler but using less computer resources. As a trade-off, the quality of the generated code is not so high).
C# Interview Question and Answers
C# Tools :
No comments:
Post a Comment