Explain Common Language Runtime in brief.

 Common Language Runtime

  •  The common language runtime is the foundation of the .NET Framework.
  • CLR is the basic and Virtual Machine component of the .NET Framework. It is the run-time environment in the .NET Framework that runs the codes and helps in making the development process easier by providing various services such as remoting, thread management, type-safety, memory management, robustness, etc. 
  • Basically, it is responsible for managing the execution of .NET programs regardless of any .NET programming language


The functionality of the CLR include:

  • Management of code at execution time. Code that targets the runtime is known as Managed code, while code that does into target the runtime is known as Unmanaged code.
  • Memory management 
  • Thread management.
  • Enforcing strict type safety and other forms of code accuracy that promote security and robustness.


The language interoperability, and .NET Class Framework, are not possible without all the languages sharing the same data types. What this means is that an "int" should mean the same in VB. VC++, C#, and all other .NET compliant languages. The same idea follows for all the other data types. This is achieved through the introduction of the Common Type System (CTS).

A common type system (CTS) is an important part of the runtimes support for cross-language integration. 

The common type system performs the following functions:

• Establishes a framework that enables cross-language integration, type safety, and high-performance code execution.
•  Provides an object-oriented model that supports the complete implementation of many
programming languages.

IL compiler: It converts the Microsoft Intermediate Language(MSIL) or Common Intermediate Language(CIL) into the machine code.

Security component: In the CLR ensure that that assembly (the program being executed has permission to execute certain functions.)


Garbage collection
  • Automatic memory management is made possible by Garbage Collection in .NET Framework. When a class object is created at runtime, a certain memory space is allocated to it in the heap memory. 
  • However, after all the actions related to the object are completed in the program, the memory space allocated to it is a waste as it cannot be used. 
  • In this case, garbage collection is very useful as it automatically releases the memory space after it is no longer required.
  • Garbage collection will always work on Managed Heap and internally it has an Engine which is known as the Optimization Engine.
  • Garbage Collection occurs if at least one of multiple conditions is satisfied. These conditions are given as follows:
- If the system has low physical memory, then garbage collection is necessary. 
- If the memory allocated to various objects in the heap memory exceeds a pre-set threshold, then garbage collection occurs.

Comments

Popular posts from this blog

Suppose that a data warehouse for Big-University consists of the following four dimensions: student, course, semester, and instructor, and two measures count and avg_grade. When at the lowest conceptual level (e.g., for a given student, course, semester, and instructor combination), the avg_grade measure stores the actual course grade of the student. At higher conceptual levels, avg_grade stores the average grade for the given combination. a) Draw a snowflake schema diagram for the data warehouse. b) Starting with the base cuboid [student, course, semester, instructor], what specific OLAP operations (e.g., roll-up from semester to year) should one perform in order to list the average grade of CS courses for each BigUniversity student. c) If each dimension has five levels (including all), such as “student < major < status < university < all”, how many cuboids will this cube contain (including the base and apex cuboids)?

Suppose that a data warehouse consists of the four dimensions; date, spectator, location, and game, and the two measures, count and charge, where charge is the fee that a spectator pays when watching a game on a given date. Spectators may be students, adults, or seniors, with each category having its own charge rate. a) Draw a star schema diagram for the data b) Starting with the base cuboid [date; spectator; location; game], what specific OLAP operations should perform in order to list the total charge paid by student spectators at GM Place in 2004?

Discuss classification or taxonomy of virtualization at different levels.