Chapter 1: CLR execution model and chapter 1 clr execution model

Source: Internet
Author: User

Chapter 1: CLR execution model and chapter 1 clr execution model

1. Overview

This chapter mainly introduces the work done by CLR from the source code to the executable program.

2. Glossary

① Common Language Runtime (CLR) is a Runtime that can be used by multiple languages, core functions (memory management, assembly loading, security, exception handling, and thread synchronization) can be used in all CLR-oriented languages.

② PE32: 32-bit Microsoft Windows Executable.

PE32 +: 64-bit Microsoft Windows Executable.

③ Metadata is a set of data tables that describe the content defined in the module or referenced by the hosting module.

④ The hosting module is a standard PE32 or PE32 + file, and they all need CLR for execution. It consists of the PE32 (+) header, CLR header, metadata, and IL intermediate code.

⑤ An assembly is a logical grouping of one or more modules/resource files. It is the minimum unit for reuse, security, and version control.

6. manifest is another collection composed of metadata tables, which describes the files that constitute the assembly.

7. Compile the Code Generator (ngen.exe) to compile the IL code at the cost.

Framework class library (FCL), a group of DLL Assembly released by Microsoft.

Generic Common Type System (CTS): A specification defined by Microsoft to describe the Type and behavior.

Common Language Specification (CLS): defines a minimum set of functions. Any compiler-generated type must support this feature set to be compatible with components generated by other "CLS-compliant and CLR-oriented" languages.

3. Execution Process

① Compile the source code into a hosting module.

② Merge the hosting module into an assembly. (Loader al.exe)

③ Load public language runtime.

④ Run the assembly code.

CLR's JIT (just-in-time) compiler converts IL to local cpu commands.

One compilation and multiple operations. During the code optimization.

⑤ Interoperability with unmanaged code.

4. Summary

This section describes each part related to CLR and describes the execution logic of CLR.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.