VisualBuilder
  Home > Dotnet > Tutorials > Steps to Run a program in CLR - .NET Tutorial
Tell a friend
Link to us
Total Members
      Members: 84606
     
Sitemap Forum Chat
Home
.NET Tutorial Home
1 . Overview of .Net Framework
2 . .Net Components:
3 . CLR (Common Language Runtime)
4 . Steps to Run a program in CLR
5 . Assembly
6 . GAC (Global Assembly CACHE)
7 . Strong Name in .Net Assembly
8 . ILDASM: Intermediate Language Disassembler in .Net
9 . Custom Attributes in .Net
10 . Application Domain in .Net
11 . Code Access Security in .Net
12 . Type System in .Net -1
13 . Type System in .Net -2
14 . Reflection: Inspection of a Type\'s Metadata
15 . Introduction to Generics
16 . Generic Classes and Methods
17 . Generic Methods in .Net 2.0
18 . Overview of Inheritance in Generics classes
19 . Connection pooling in .Net Applications
20 . Deployment in .Net
 
Dotnet Group Home
Dotnet Discussion (9)
Dotnet Members (2825)
Dotnet Resources
Dotnet Source Code (0)
Dotnet Articles (0)
Dotnet Blogs
Dotnet Jobs
Dotnet Components (2)
Dotnet Books
Dotnet Websites (43)
Dotnet News (186)
Dotnet Q & A (3)
- Dotnet Ask Question
- Dotnet Questions
- Dotnet Unanswered Questions
 
GROUPS
.NET
ASP.NET
.NET
C#
ASP
Visual Basic
Java
Java
JSP
EJB
Other
Delphi
C++
Ajax
UML
JavaScript
PHP
Web Design
Web Hosting
SQL Server
Oracle
Project Management
More Groups

 
LEARNING CENTER
TUTORIALS
.NET
.NET Tutorial
ASP Tutorial
ASP.NET Database Tutorial
ASP.NET Development Tips
ASP.Net Security,Internationalisation And Deployment
ASP.NET Server Controls Tips
ASP.NET Tutorial
C Sharp Tutorial
Web Development
Flex Tutorial
HTML Tutorial
Learn AJAX Tutorial
PHP Tutorial
Software Development
Database Tutorial
SQL Tutorial
UML Tutorial
Java
Ant Tutorial
EJB 3 Tutorial
Hibernate Tutorial
Java Tutorial
Java Web Component Tutorial
Java XML Tutorial
JDBC Tutorial
JDK1.5 Tutorial
JSF Tutorial
JSP And J2EE Design Tutorial
JSP Tutorial
Spring Tutorial
Struts Tutorial

RESOURCES
Q & A (432 )
Source Code (3217 )
Articles (11 )
Components (1589 )
News (880 )
Websites (1207 )

SUBMISSIONS
Submit Article
Submit Website
Submit News
Submit Source Code
Submit Component

COMMUNITY
Members Directory
Discussion Forum
Chat

SITE
About Us
Sitemap
Search
Contact Us
Link To Us
Feedback
Tell a Friend
Partners
Advertise


Dotnet Tutorial
 Steps to Run a program in CLR
  << Prev: CLR (Common Language Runtime) Next: Assembly >>

For a program to run within the common language runtime and benefit from the managed execution environment, you need to write the source code of the program in a CLS-compliant language.


 


Step-1


The compilers of CLS-compliant languages compile the source code and generate an intermediate code, called MSIL code, and metadata. MSIL Code contains a CPU independent set of instructions, which describes how to load, store, initialize, and call. They also contains instructions to perform arithmetic and logical operations, access memory directly, control the flow of execution, handle exceptions and perform other operations. methods on objects


 


Step-2


Before you execute the MSIL code, you need to compile it into CPU-specific instructions. To execute the code, the runtime requires information about the code that is in the metadata. The metadata describes the code and defines the types that the code contains as well as references to other types that the code uses at run time. MSIL Code and metadata both located in the .PE (portable executable) file.


 


Step-3


When we execute .PE file, the class loader loads the MSIL code and metadata from the portable executable file into the run-time memory.


 


Step-4


After the MSIL code and metadata are loaded into the memory, the code manager calls the entry point method, which is Main, Win Main or DllMain method. An entry-point method is the first method to be executed when you run your application.


 


Step-5


The garbage collector performs periodic checks on the managed heap to identify the objects that are no longer required by the program and removes them from memory.


 


Step-6


The applications running within the common language runtime can utilize the managed multithreading support. The .NET Framework allows a single process to be divided into one or more sub processes called application domains. Each application domain can contain one or more threads. The runtime monitors all the threads that have executed code within its process .


 


Step-7


The common language runtime also allows managed code to interoperate with unmanaged code. One of the components of the common language runtime is the COM marshaler, which performs marshaling of data when data passes between managed and unmanaged execution environments.


 


Step-8


Then with the help of JIT the IL code is converted into Native code or we can say Intermediate set of instructions are converted into CPU set of instruction.


 


Note:- The above steps are known as called managed execution process.


 


  << Prev: CLR (Common Language Runtime) Next: Assembly >>
Dotnet Tutorial Home
Give feedback and win a prize.

 
   Printer Friendly
   Email to a friend
   Add to my Favourites    
  Download PDF version
   Report Bad Submissions
   Submit Feedback
 
  Delicious   Digg   Technorati   Blink   Furl   Reddit   Newsvine   Google Click each image to add
this page to each site.
 
 
Welcome Guest Signup
MEMBER'S PANEL
EMAIL
PASSWORD
Forgot your password?
New User? Click Here!
 
Resend Activation Email!
 
SEARCH
 
 
LINKS
MSN
Video Surveillance
Skype vs. sipcall
Gift to Pakistan
 
ADVERTISEMENT
 
PARTNER LIST

More
 
 
 

Home | Login | About Us | Contact Us | Privacy Policy | Advertising