Return to the Days Of 640K With The .NET Micro Framework
Running on as little as 256K RAM and 512K of flash memory, the .NET Micro Framework represents the smallest OS released by Microsoft in over a decade. The beta currently a number of ARM7 and ARM9 processors, even ones without a Memory Management Unit (MMU).
Unlike previous versions of the .NET framework, the Micro Framework is bootable. Or in other words, the runtime can effectively be its own operating system complete with interrupt handling, threading, process management, and heap management. The .NET Micro Framework Hardware Abstraction Layer (HAL) weighs in at a tiny 20 to 30K.
If you run the Micro Framework CLR on the Micro Framework HAL instead of another operating system, there are some limitations. For example, only cooperative multitasking is supported so kernel threads will have to explicitly call yield on a regular basis. The CLR's execution will simulate threading by "offering time-sliced context switching using 20ms quantum".
An extension to Visual Studio will include emulators for a wide variety of platforms and will allow developers to alter features such as available memory and clock speeds.
The assemblies produced by the compiler are not directly usable. Rather than using IL directly, a post-processor converts the binaries into a special format needed by the Micro Framework CLR. This isn't a form of hardware specific machine code, as the CLR interprets it. Unlike other .NET frameworks, just-in-time compilation will not be available.
Reflection will be supported, as will multiple AppDomains. Only single dimension arrays will be supported and the garbage collector is non-generational. Object meta-data is stored on the heap with the object itself so that garbage collection will be faster.
One interesting note is that under omitted features is states, "No virtual tables for method resolution saves RAM". What this means for inheritance isn't spelled out.
Serialization has been reworked to provide very compact representations.
Extended weak references allow objects to pushed to and retrieved from persistent storage depending on memory demands. Objects used this way even survive reboots.
Globalization is supported via resource files. Unlike other .NET frameworks that use strings, this one uses Int16 keys to reduce space. Visual Studio generates type safe code for accessing resources to reduce the change of error.
If performance becomes an issue, individual methods may be written in native code.
I used the .NET CF for a while with PocketPC/SmartPhone devices. It was a good experience. It beats the heck out J2ME development. Especially if you're dealing with phones as you don't have to get your app signed by your phone provider - which is one of the most inane things ever IMO.
Re: Very cool
Here's a fact for you: This is my 1st time and last time at your website.
Re: Very cool
As for .NET Micro, I have to admit that I only heard about it a couple of days before I published the article. Now that we know it exists, we will be sure to watch it closer for new developments.
If in the future you think that we are missing something interesting or we are not going into enough depth on a topic, feel free to send us a note at firstname.lastname@example.org.
Tom Gilb & Kai Gilb Jan 26, 2015