Common Language Runtime (CLR) is platform dependent, where as Intermediate Langage (IL) code is platform independent. When dotnet application is executed the request will goto operating system. Operating system will create memory process, and IL instructions will be loaded. Operating system will load CLR to process IL instructions.
The program used for calling CLR is called 'Runtime Host'. Runtime Host for desktop application is windows API function-"corbindtoruntime". Runtime Host for web based application is "Asp.Net worker process".
CLR is a runtime engine with collection of services:
'Assembly Resolver' will read manifest of exe file, it will identify private assemblies and shared assemblies required for application execution. It will forward request to 'Assembly Loader'
Assembly loader will load assemblies from application folder or GAC into application process. 'Type Checker' will verify types used by application with CLS or CTS standards. This provides Type Safety.
'Debug Manager' will activate debugger utility for line by line execution. It allows modification of code without terminating application.
'Exception Manager' will handle exceptions thrown by application. If there is no catch block (that is solution from developer), the application will be terminated.
'Com Marshals' will provide communication with Com component from dotnet application. This provides COM Interoperatability.
'Thread Support' service wil manage multiple threads with in application process. This provides Multi-Threading.
'Garbage Collector' will release unused objects memory. This provides automatic memory management
IL to native compiler is called JIT (Just in Time) compiler. This will process IL instructions into operating system native code.
Comments/Suggestions are invited. Happy coding......!