I've recently been taking an interest in MinWin, especially as it's now
visible in Windows 7, and I want to bring up the possibility of introducing
something similar into ReactOS.
I know some of you will be familiar with WinWin and I know at least one of
you will know quite a bit more about it than I do, but for those who don't
here's an overview.
What is WinMin?
MinWin is an internal project at Microsoft that manifested around the time
of the Vista rewrite. Very basically explained, the aim is to detangle the
very core components from the full operating system, resulting in something
which can be built separately and leaving just enough components for a
working system. This minimal operating system can then boot and be tested
separately or be built as part of the full OS and tested in internally as
before.
The main problem in doing this, and one of the main benefits in solving it,
is module dependencies. By simply cutting out the bottom part of the OS
you're left with modules which potentially call out to other modules which
may now be missing. If these dependencies aren't understood you have the
possibility of an unstable OS as you never know where a code path may lead.
It also means you need to build more components to get the thing to link,
which also undermines one of the reasons for doing it.
What Microsoft did is to draw up a dependency tree and structure it in a
layered hierarchy. Modules were then rearranged to make architectural sense
according to the NT design and a top layer was decided upon. API call were
then rewritten within this hierarchy such that anything in one layer would
only call API's in the layers below it. Therefore if something in layer 8
called something in layer 7 which then called something in layer 12, the
APIs would be fixed to only use APIs at or below its level according to the
hierarchy. You're then left with a clean line where nothing calls out and
you have a tightly bound core OS which is completely independent from
anything.
What is essentially left in Microsoft's WinMin is what people class as
Cutlers NT along with supporting components to get a bootable system. The
main components are:
The kernel (main kernel, not the full ntoskrnl module), parts of the
executive, memory manager, networking, a file system driver and core drivers
(basc IO and Bus, etc)
This is then exposed in usermode by 2 dlls, ntdll.dll and the new
kernelbase.dll. On top of this you have a console for issuing commands.
This comprises of the full OS and amounts to about 25Mb on disk and has
around a 40Mb working set.
Let's quickly explain the new kernelbase dll.
As many of the API's in the lower level dlls such as kernel32 and advapi32
were targeting functionality which wasn't in WinMin, it was decided to pull
out any of the API's which were required to exercise WinMin and put them
into kernelbase. This dll could then be used when building a running WinMin
to provide all the functionality this kernel offered. The dlls which had
their APIs removed now forwarded their call onto kernelbase so from a user
perspective, nothing had changed.
Microsoft went a step further and designed a new technology around virtual
dlls. They split functionality of dlls into 'api sets' These can now be
seen in Win 7 in the system32 dir with the prefix
'api-ms-win-core-<function>-<num of>-1-0.dll'. WinMin components now link
against these virtual dlls which load up the real libs listed in
apisetschema.dll.
However this involves modification to the loader and I don't think it's
something worth us considering right now.
What are the reasons for doing this?
For a start, it's a much better design from an engineering perspective.
The more software you have running on a system the more noise is created and
the more things can interfere with each other.
It gives us a base to innovate with without worrying about affecting
anything outside.
It gives us a more reliable base for the OS and a better platform to run
comprehensive and efficient tests.
It makes us more attractive to external companies as we would have a slick
NT compatible kernel ready for companies to build their products on,
especially embedded applications.
With a few more additional items such as the base win32 subsystem, we'd have
something along the lines of a stripped out ServerCore or Windows PE.
This is only a quick overview for discussion purposes, but it outlines the
main design and goals of WinMin.
Comments, questions, concerns and gripes welcome J
Ged.
hi,
i wonder if this commit should be sync'ed in the reactx branch...... (and,
if DSound should be synced as a whole in there)
im not dev, so its up to you devs....
And if not.. why?
Hello,
I had noticed that some of the developers are working pretty vigorously to
get off of requiring GCC. I don't pretend to understand what that is about,
and I honestly would like to know.. However, I just wanted to list a couple
of alternative open source C/C++ compilers that could probably be used with
ReactOS.
Of course, what do I know, I'm just a newbie at being a C++ programmer...
Anyway, the two compilers are:
* OpenWatcom ( http://openwatcom.org/index.php/Main_Page )
* LLVM 2.6 w/clang ( http://llvm.org/ )
On Tue, Oct 27, 2009 at 9:32 AM, KJK::Hyperion <hackbunny(a)reactos.org> wrote:
> Alex Ionescu wrote:
>> I bet Hitler would've said the same at Nuremberg....
>
> he wouldn't have, unlike us he had written a specification beforehand
Too funny. I love the Mein Kampf as an example of how to do a proper
system design specification ;)
--
Steven Edwards
"There is one thing stronger than all the armies in the world, and
that is an idea whose time has come." - Victor Hugo
Ged Murphy wrote:
> I’ll be attending this year’s Microsoft PDC in Los Angeles
> and I should be there between 16th November and 20th November.
You absolutely have to attend the session with Mark Russinovitch
"Windows 7 and Windows Server 2008 R2 Kernel Changes".
See if you can dig up something useful for our baby ROS.
(When they released NT, at least they gave us "Inside Windows NT" :)
Oh, and "C++ Forever: Interactive Applications in the Age of Manycore"
could be vaguely interesting I guess (the multicore bits).
All the other sessions seem to be boring application stuff,
C#, ASP.NET, SQL and all that goop.
Don't snore on the sessions ;)
Rock on // Love
__________ Information from ESET Smart Security, version of virus signature database 4549 (20091027) __________
The message was checked by ESET Smart Security.
http://www.eset.com
I'll be attending this year's Microsoft PDC in Los Angeles and I should be
there between 16th November and 20th November.
If anyone else is going and wants to meet up for a chat at the conference or
a beer in the evening drop me a mail.
Cheers,
Ged.