[Mono-devel-list] Operating System in C# Project

Konstantin Triger kostat at mainsoft.com
Sat Jul 2 12:32:28 EDT 2005


Lets make an additional clarification about what managed code is. You 
say that it's a code based an CLI + IL + GC, I'll would also add a 
"Verified" attribute, meaning the code is checked to not harm the system 
(stack overflow etc). I'll indicate Verified as "V".

I would say that
1. CLI can be implemented as IL+GC + some parts no V.
2. GC can be implemented as IL+CLI + some parts no V.

The parts being not validated mainly lie in CPU specific code and 
pointer arithmetic. Possibly they can be even "closed" in special drivers.

The boot process can be made as the following: bootloader loads CLI + 
GC, jits them, start some entry point and unloads.
The bootloader itself can be a CLI+GC subset with a relevant 
"application" above. It can be prejitted per CPU architecture.

Regards,
Konstantin Triger



Kornél Pál wrote:

> This discussion seems to be a play with words.:)
>
>> From: "Richard Matthias" <richardmatthias at gmail.com>
>> They have a C# compiler that creates native code directly which helps of
>> course.
>
>
> If this is true then the operating system will not be implemented in 
> managed
> code it will be only in C#. An operating system can be written in 
> BASIC as
> well if you have good compiler (with some extra feautes:).
>
>> From: "Elliot Paquette" <elbaami at gmail.com>
>> At some level there will be some unmanaged code, sure, but I think
>> that the environment which you just described, Kornél, could be
>> considered an integral part of an operating system, if not for
>> simplicity's sake the operating system itself.
>
>
> .NET Framework is said to be an integral part of Windows Server 2003
> altought I think it is a part and not an integral part of it.
>
> But I'm sure that .NET Framework will be an itegral part of Windows 
> Longhorn
> as it is said to have functionality that will be available through 
> managed
> code only.
>
>> From: "Elliot Paquette" <elbaami at gmail.com>
>> If you add the extra contraint that only IL code will be executed (as in
>> Singularity), then the unmanaged requirements are further reduced.
>
>
> But saying that an operating system can be implemented using managed code
> only in a nonsense.
>
> Of course the answer depends on what do you mean on managed code. 
> Usually it
> means something that is based on the CLI and is in IL code. A less 
> extensive
> interpretation could be if you mean managed code on something that 
> uses the
> garbage collector. But in both situations the operating system cannot be
> implemented in managed code as neither CLI nor GC can be based on itself.
>
> The lowest level where the CLI can be implemented is the kernel. As a 
> result
> the kernel itself and the CLI cannot be based on themselves so they 
> cannot
> be in managed code.
>
> And depends on what do you mean on an operating system. If you don't
> consider the kernel to be part of the operating system then as all the 
> user
> mode code can be in managed code you can say that the operating system is
> written entirely in managed code.
>
> But the kernel is an important part of the operating system, for 
> example if
> you use an inefficient kernel the whole operating system will be
> inefficient.
>
> In the world of Unix/Linux it's normal that the kernel and other 
> componets
> are from different vendors but this doesn't mean that any of these 
> comonets
> alone are operating systems, this means that the system built from this
> components is the operating system.
>
> An operating system is a complex system that has the ability to run on a
> computer without any other systems. This means that anything that is
> required to run integral parts of the operating system has to be integral
> part as well and if it's removed the operating system is not an operating
> system anymore.
>
>> From: "Richard Matthias" <richardmatthias at gmail.com>
>> ...just as skeptical as Kornél manages to take up
>> pages and pages of posts with their complete failure to understand how
>> an OS written in C# could be possible.
>
>
> I am not sceptical. I belive and know that an operating system can be
> written in C# as it is a language. I only said (because I know) that it
> cannot be implemented entirely in managed code as it requires a CLI that
> cannot be implemented in managed code. As of the CLI has to be part of 
> the
> operating system if you want to run it the operating system itself 
> cannot be
> implemented entirely in managed code even if it's only unmanaged part 
> is the
> CLI.
>
> As a conclusion an operating system can be implemented entirely in 
> managed
> code if and only if the native code that the underlaying hardware
> understands and can execute is IL in other words when the CLI is 
> implemented
> at hardware level.
>
> Kornél
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list