Wednesday, July 27, 2005 1:00 AM bart

Rotor experiences

As you probably did notice it already on my blog, I'm focusing on the deeper stuff ("how things work") of various technologies such as SQL Server and the CLR for the moment (and I plan to continue to do so for the next months). Why? Well, I find it super exciting to know more about how things work. Although I have read a bunch of books on this stuff earlier, I didn't find the time to do some coding and personal research while reading these materials in the past. Now (beside of some other projects I'm involved in) I've decided to recap all of this stuff (as the Romans said: "Repetitio mater studiorum est").

For what the books are concerned, I'm crawling through:

  • Applied .NET Framework Programming (Richter)
  • The Guru's Guide to SQL Server Architecture and Internals (Henderson)
  • The Common Language Infrastructure Annotated Standard (Miller) - the bible concerning CLI stuff, but rather heavy stuff to read in bed :-)

As part of this personal commitment, I'm diving deeper in CLR implementation stuff by looking at some code too. I hope you people out there know about the existence of the Microsoft Shared Source CLI Implementation (that's the long name for a thing called "Rotor"), which is an open-source implementation (by Microsoft) of the Common Language Infrastructure, the core (standardized) functionality of the .NET Framework, including the CLR and the BCL. More information can be found on http://msdn.microsoft.com/net/sscli. This CLI implementation is targeting Windows 2000 and XP (although 2003 also works), FreeBSD 4.7 and Mac OS X 10.2.

What's included in the package?

  • A build tool to support the building process
  • Open-source implementations of the C# and JScript compilers
  • SOS debugging extension (cf. WinDbg)
  • ECMA standardization documentation
  • Technical implementation information (such as stack layout)
  • Various tools (al, sn, gacutil, ilasm, ildasm, etc) including source
  • A CLR implementation, including full source for the VM (including the GC) and the JIT engine
  • Source code of the Base Class Library (BCL)

Notice you need to use clix to run managed applications using Rotor's CLR implementation. Otherwise, the managed assembly will trigger the mscoree.dll startup shim to launch the "real" CLR on your system to execute the code. Before you can use it, you need to compile using the buildall.cmd batch that's included in the package's root directory.

In future posts I might refer to these code files to point out various aspects of the CLR's implementation (principles) when talking about CLR stuff. Currently I'm looking at some very very basic stuff in the BLC: the String class, the Int32 class, the Random class, the Guid class, the DateTime class and a first look at the GC class. I hope I'll find enough time to dive into this in much more detail, more specifically:

  • assembly loading stuff
  • assembly domains
  • code access security
  • JIT and GC

One first comment (warning) maybe, the CLR implementation (C++) code in Rotor has very little documentation inline with the code, which is a pitty.

Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Filed under: ,

Comments

No Comments