Chapter 3. The Common Language Runtime—Overview of the Runtime Environment

In This Chapter

At a high level, the CLR is simply an engine that takes in IL instructions, translates them into machine instructions, and executes them. This does not mean that the CLR is interpreting the instructions. This is just to say that the CLR forms an environment in which IL code can be executed. For this to work efficiently and portably, the execution engine must form a runtime environment that is both efficient and portable. Efficiency is key; if the code does not run quickly enough, all of the other features of the system become moot.

Portability is important because of the number of processors and devices on which the CLR is slated to run. For a long time, Microsoft and Intel seemed to be close partners. Microsoft more or less picked the Intel line of processors to run the software that the company produced. This allowed Microsoft to build and develop software without worrying about supporting multiple CPU architectures and instructions. The company didn't have to worry about shipping a Motorola 68XXX version of the software because it was not supported. Limiting the scope of processor support became a problem as Win16 gave way to Win32. (No APIs were called Win16, but this is the name I will give the APIs that existed before Win32.) Building software that took advantage of the features of a 32-bit CPU remained somewhat backward compatible with older Win16 APIs and proved to be a major undertaking. With Win64 on the horizon, Microsoft must realize that it cannot continue to “port” all of its software with each new CPU that is released if it wants to stay alive as a company. Microsoft is trying to penetrate the mobile phone, hand-held, and tablet markets that are powered by a myriad of different processors and architectures. Too much software is produced at Microsoft for it to continue to produce a CPU-bound version.

The answer to the problem of base address and data size (Win32 versus Win64) and to the problem of providing general portability to other processors came in the form of the runtime environment, or the Common Language Runtime. Without going into the details of the specific instructions that the CLR supports (this is done in Chapter 5, “Intermediate Language Basics”), this chapter details the architecture of the runtime that goes into making a managed application run.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.247.31