Scott Hanselman

Im Writing A Pile Of A Hrefhttpwwwmicrosoftcomnet

April 21, '02 Comments [0] Posted in XML
Sponsored By

I'm writing a pile of C# lately.  Mostly I've been working on a project for school in my spare time.  (I'm in the 11th year of my 4 year degree at www.oit.edu)  I'm working on a virtual CPU and OS in C#.  It was (is being) written for an Operating Systems Class.  As a process, it's single threaded, because it's meant to teach one how OS's schedule processes and provide services.  It has 36 "opcodes" for things like MOV, PUSHI, etc...It differentiates between process memory, addressable memory and physical memory. It supports virtual memory, swapping 16 byte pages to XML (kind of silly, but fun). 

It's certainly something people could play with and extend, either by writing programs for it in it's "tiny ASM" language, or by adding opCodes or features of their own.

What's interesting about it, IMHO, is that in the process of writing it I've used nearly all the features of C#, and a few neat ones of the .NET Framework like serialization:

Like:

OS Feature          à  C#, DOTNET Feature

VirtualMemory       à XML Serialization, System.IO
RunningProcesses    à
System.Collections
PhysicalMemory      à
"fixed", "unsafe"
ProcessScheduling   à
ArrayList, IComparable
InstructionParsing  à
System.RegEx
Memory Protection   à Operating Overloading

And about a dozen more.  More on this soon, or you may see it posted on a C# code site.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.