running legacy apps in a managed os

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
redoktober
Member
Member
Posts: 109
Joined: Thu Feb 26, 2009 12:58 am
Location: Gurgaon/New Delhi, India
Contact:

running legacy apps in a managed os

Post by redoktober »

heylo, one and all!
okay, i'm thinking (read: wondering!) about writing a small os in managed code, just for research work and yeah, for the sake of it. so the thing is, i checked out microsoft's singularity project, and 2 projects being undertaken by the managed operating system alliance. i think it'd be cool, if i could run old apps, written in, say c/c++, or vb 6.0, in the planned os. and guess what? singularity makes no mention of this idea, while MOSA states that they will run such apps using virtualization.
i don't want to use virtualization. not yet, anyway.
and i don't think porting wine's the key...that would introduce a lot of unsafe c code into the kernel, and create havoc!
so....please, help!
i really appreciate it, mates!
:)

thanking ye..
"Do you program in Assembly?" she asked. "NOP," he said.

"Intel Inside" is a Government Warning required by Law.
cyr1x
Member
Member
Posts: 207
Joined: Tue Aug 21, 2007 1:41 am
Location: Germany

Re: running legacy apps in a managed os

Post by cyr1x »

Create an user mode addressspace and load the image in there.
BTW, the Singularity team plans to do so, too.
Benk
Member
Member
Posts: 62
Joined: Thu Apr 30, 2009 6:08 am

Re: running legacy apps in a managed os

Post by Benk »

Hi im working on Cosmos at the moment.. The sweet thing about Cosmos is it supports the normal Microsoft .NET framework and just compiles it all to x86 when we encounter a method like a pinvoke we cant handle we PLUG it ie replace it with a custom Plug method written in C# .

Anyway its practically impossible to run native apps on a managed OS except through virtualization. There is no support for malloc etc etc
, the whole OS assumes Managed applications by assuming only managed apps many optimizations and improvements can be made . The purpose of a managed OS is to get improvements in reliability, scaling and security with no reduction or even an increase in performance by restricting what applications can do . Note the term Managed OS is interesting as the Managed OS actually runs native x86 code all the time the catch is they compile it themselves from MISL (.NET managed assembler ) .

The whole Memory Management systems is normally an integrated Memory Management/Garbage collector service. Note you could compile some C++ or ( asm) put it at a location and it could call compiled managed parts but its difficult. The APIS would never be compatible with win32 , your memory would be hard to clean up etc.


If you read the Singularty docs there is mention of supporting other things via Virtualization. They will prob support Windows apps and maybe even a Java VM that way.
Post Reply