Subsystems concept in Windows

Hi
I hope this is not wrong question for this mail group.
We know Windows NT provides Win32, OS/2, POSIX, Win16, and DOS interfaces
using the subsystems concept.Win32 use PE file format or PE file format use
win32.So what does OS/2 or Posix use?I mean what are their extensions or
file format?

Can we write linux subsytem?So linux specific file can support by
windows.Isthis possible?

SERIMC:

This is really not my thing, but as it is late and you might not get a
response for a while, here are my best guesses (which I’m pretty sure
are correct).

The only OS/2 file format of which I am aware is called “NE;” it is the
same as the Windows 3.1 file format (actually, the other way around).
If you open WinNT.H, and do a search for “IMAGE_OS_HEADER,” you can see
some of the details. Because the format is the same as for 3.1, the
OS/2 subsystem has no issues supporting the native format.

To the best of my knowledge, the POSIX subsystem does not support any
file formats other than what the rest of the system supports (PE, PE+,
et. c.).

You may already know this, but just to be sure, as it is important,
both the OS/2 and POSIX subsystems are almost literally useless. For
example, the OS/2 subsystem supports only character based applications.
The POSIX subsystem does not support any existing UNIX variant
applications, unless they happen to be written specifically for it.
The long and short is that in over a decade of developing for NT, I have
never seen, read or even heard of anyone using either of these. Most
people who wish POSIX type support, end up using Cygwin.

You need to check with someone who knows more than I about whether
either of these subsystems will support your specific needs.

Hope this helps,

mm

>> xxxxx@gmail.com 2006-12-19 02:01 >>>
Hi
I hope this is not wrong question for this mail group.
We know Windows NT provides Win32, OS/2, POSIX, Win16, and DOS
interfaces
using the subsystems concept.Win32 use PE file format or PE file format
use
win32.So what does OS/2 or Posix use?I mean what are their extensions
or
file format?

Can we write linux subsytem?So linux specific file can support by
windows.Isthis possible?


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thank you Martin
What about linux subsystem in windows?
Is this possible?.I mean can we write a subsystem without recompiling
loader?
So does windows architect give permission to us for writing a subsystem as a
component?
2006/12/19, Martin O’Brien :
>
> SERIMC:
>
> This is really not my thing, but as it is late and you might not get a
> response for a while, here are my best guesses (which I’m pretty sure
> are correct).
>
> The only OS/2 file format of which I am aware is called “NE;” it is the
> same as the Windows 3.1 file format (actually, the other way around).
> If you open WinNT.H, and do a search for “IMAGE_OS_HEADER,” you can see
> some of the details. Because the format is the same as for 3.1, the
> OS/2 subsystem has no issues supporting the native format.
>
> To the best of my knowledge, the POSIX subsystem does not support any
> file formats other than what the rest of the system supports (PE, PE+,
> et. c.).
>
> You may already know this, but just to be sure, as it is important,
> both the OS/2 and POSIX subsystems are almost literally useless. For
> example, the OS/2 subsystem supports only character based applications.
> The POSIX subsystem does not support any existing UNIX variant
> applications, unless they happen to be written specifically for it.
> The long and short is that in over a decade of developing for NT, I have
> never seen, read or even heard of anyone using either of these. Most
> people who wish POSIX type support, end up using Cygwin.
>
> You need to check with someone who knows more than I about whether
> either of these subsystems will support your specific needs.
>
> Hope this helps,
>
> mm
>
>
> >>> xxxxx@gmail.com 2006-12-19 02:01 >>>
> Hi
> I hope this is not wrong question for this mail group.
> We know Windows NT provides Win32, OS/2, POSIX, Win16, and DOS
> interfaces
> using the subsystems concept.Win32 use PE file format or PE file format
> use
> win32.So what does OS/2 or Posix use?I mean what are their extensions
> or
> file format?
>
> Can we write linux subsytem?So linux specific file can support by
> windows.Isthis possible?
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

You know there are two different things here –

  1. file format

  2. api compatibility.

When you think of sub-systems, think about from the api compatibility. But
file format compatibility that a loader would understand totally depends on
the loader and underlying file systems. Remember the loader does file
mapping for fast loading, so having a coff- formatted file loaded and
executed might not be supported, even though PE format has lot of reflection
from COFF.

-pro

On 12/19/06, serimc wrote:
>
> Thank you Martin
> What about linux subsystem in windows?
> Is this possible?.I mean can we write a subsystem without recompiling
> loader?
> So does windows architect give permission to us for writing a subsystem as
> a component?
> 2006/12/19, Martin O’Brien :
> >
> > SERIMC:
> >
> > This is really not my thing, but as it is late and you might not get a
> > response for a while, here are my best guesses (which I’m pretty sure
> > are correct).
> >
> > The only OS/2 file format of which I am aware is called “NE;” it is the
> > same as the Windows 3.1 file format (actually, the other way around).
> > If you open WinNT.H, and do a search for “IMAGE_OS_HEADER,” you can see
> > some of the details. Because the format is the same as for 3.1, the
> > OS/2 subsystem has no issues supporting the native format.
> >
> > To the best of my knowledge, the POSIX subsystem does not support any
> > file formats other than what the rest of the system supports (PE, PE+,
> > et. c.).
> >
> > You may already know this, but just to be sure, as it is important,
> > both the OS/2 and POSIX subsystems are almost literally useless. For
> > example, the OS/2 subsystem supports only character based applications.
> > The POSIX subsystem does not support any existing UNIX variant
> > applications, unless they happen to be written specifically for it.
> > The long and short is that in over a decade of developing for NT, I have
> > never seen, read or even heard of anyone using either of these. Most
> > people who wish POSIX type support, end up using Cygwin.
> >
> > You need to check with someone who knows more than I about whether
> > either of these subsystems will support your specific needs.
> >
> > Hope this helps,
> >
> > mm
> >
> >
> > >>> xxxxx@gmail.com 2006-12-19 02:01 >>>
> > Hi
> > I hope this is not wrong question for this mail group.
> > We know Windows NT provides Win32, OS/2, POSIX, Win16, and DOS
> > interfaces
> > using the subsystems concept.Win32 use PE file format or PE file format
> > use
> > win32.So what does OS/2 or Posix use?I mean what are their extensions
> > or
> > file format?
> >
> > Can we write linux subsytem?So linux specific file can support by
> > windows.Isthis possible?
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
> >
> >
>
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
> Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Microsoft has never documented subsystems. I believe that they have
stated that they will not, but, either way, it is not going to happen.

I have no idea of either (1) what “Windows architect” is; or (2) what
you mean by this.

It sounds like you are trying to run unmodified linux elf’s on Windows.
If this is, in fact, what you are after, cease - this is complete waste
of time, as Windows will not in any way help you accomplish this goal.
Unless you reverse engineer or otherwise obtain the requirements for a
subsystem, or have access to the Windows source code, you are completely
out of luck here. You are options, to the best of my knowledge, are
either to modify your linux applications to run under Cygwin, or write
your own emulator.

mm

>> xxxxx@gmail.com 2006-12-19 05:13 >>>
Thank you Martin
What about linux subsystem in windows?
Is this possible?.I mean can we write a subsystem without recompiling
loader?
So does windows architect give permission to us for writing a subsystem
as a
component?
2006/12/19, Martin O’Brien :
>
> SERIMC:
>
> This is really not my thing, but as it is late and you might not get
a
> response for a while, here are my best guesses (which I’m pretty
sure
> are correct).
>
> The only OS/2 file format of which I am aware is called “NE;” it is
the
> same as the Windows 3.1 file format (actually, the other way
around).
> If you open WinNT.H, and do a search for “IMAGE_OS_HEADER,” you can
see
> some of the details. Because the format is the same as for 3.1, the
> OS/2 subsystem has no issues supporting the native format.
>
> To the best of my knowledge, the POSIX subsystem does not support
any
> file formats other than what the rest of the system supports (PE,
PE+,
> et. c.).
>
> You may already know this, but just to be sure, as it is important,
> both the OS/2 and POSIX subsystems are almost literally useless.
For
> example, the OS/2 subsystem supports only character based
applications.
> The POSIX subsystem does not support any existing UNIX variant
> applications, unless they happen to be written specifically for it.
> The long and short is that in over a decade of developing for NT, I
have
> never seen, read or even heard of anyone using either of these.
Most
> people who wish POSIX type support, end up using Cygwin.
>
> You need to check with someone who knows more than I about whether
> either of these subsystems will support your specific needs.
>
> Hope this helps,
>
> mm
>
>
> >>> xxxxx@gmail.com 2006-12-19 02:01 >>>
> Hi
> I hope this is not wrong question for this mail group.
> We know Windows NT provides Win32, OS/2, POSIX, Win16, and DOS
> interfaces
> using the subsystems concept.Win32 use PE file format or PE file
format
> use
> win32.So what does OS/2 or Posix use?I mean what are their
extensions
> or
> file format?
>
> Can we write linux subsytem?So linux specific file can support by
> windows.Isthis possible?
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

While not a subsystem, http://www.colinux.org/ is one way to run native
Linux apps on Windows. I don’t think coLinux is ready for prime time,
but it’s an interesting concept.

Also… The Windows POSIX subsystem is much improved in Windows
Longhorn. It won’t run native Linux binaries, but it now appears to be
a viable way to quickly port Linux apps to Windows. You do have the
source code for your favorite Linux app, don’t you? ./configure && make
&& make install.

–John

Do you know what the improvements are? This surprises me, as it was, to
the best of my knowledge, static for years. I know they bought some
package from Connectix a while back; I wonder if this is the result?

Whatever the case, assuming the applications to be ported use the GNU
autotools, I don’t imagine that the result will be easy porting, unless
the new subsystem & services support them, or autotools has been update
to support the new subsystem; neither one seems at all likely to me, but
I would be very happy to be wrong.

mm

>> john.mcnamee@hp.com 2006-12-19 10:48 >>>
While not a subsystem, http://www.colinux.org/ is one way to run
native
Linux apps on Windows. I don’t think coLinux is ready for prime time,
but it’s an interesting concept.

Also… The Windows POSIX subsystem is much improved in Windows
Longhorn. It won’t run native Linux binaries, but it now appears to
be
a viable way to quickly port Linux apps to Windows. You do have the
source code for your favorite Linux app, don’t you? ./configure &&
make
&& make install.

–John


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Hmm
Thanks for answers.I asked this because i am reading undocumented nt book.
http://www.windowsitlibrary.com/Content/356/01/1.html
It writes:
“Extensibility
Windows NT is highly extensible, but because of a lack of documentation, its
extensibility features are rarely explored. The list of undocumented
features starts with the subsystems. The subsystems provide multiple
operating system interfaces in one operating system. You can extend Windows
NT to have a new operating system interface simply by adding a new subsystem
program. Windows NT provides Win32, OS/2, POSIX, Win16, and DOS interfaces
using the subsystems concept, but
Microsofthttp:keeps
mum when it comes to documenting the procedure to add a new subsystem”
colinux is intersting.

2006/12/19, McNamee, John <john.mcnamee>:
>
> While not a subsystem, http://www.colinux.org/ is one way to run native
> Linux apps on Windows. I don’t think coLinux is ready for prime time,
> but it’s an interesting concept.
>
> Also… The Windows POSIX subsystem is much improved in Windows
> Longhorn. It won’t run native Linux binaries, but it now appears to be
> a viable way to quickly port Linux apps to Windows. You do have the
> source code for your favorite Linux app, don’t you? ./configure && make
> && make install.
>
> --John
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
></john.mcnamee></http:>

“serimc” wrote in message news:xxxxx@ntdev…
> Hmm
> Thanks for answers.I asked this because i am reading undocumented nt
> book.
> http://www.windowsitlibrary.com/Content/356/01/1.html
> It writes:
> “Extensibility
> Windows NT is highly extensible, but because of a lack of documentation,
> its
> extensibility features are rarely explored. The list of undocumented
> features starts with the subsystems. The subsystems provide multiple
> operating system interfaces in one operating system. You can extend
> Windows
> NT to have a new operating system interface simply by adding a new
> subsystem
> program. Windows NT provides Win32, OS/2, POSIX, Win16, and DOS
> interfaces
> using the subsystems concept, but
> Microsofthttp:keeps
> mum when it comes to documenting the procedure to add a new subsystem”
> colinux is intersting.
>
The book is terrible, mainly a jumber of hackers techniques, Intel manuals
and incorrect documentation on some undocumented calls. It should be
noted that even Microsoft is not using the subsystems concept much.
Services for Unix for instance is mostly libaries and emulation not the
subsystem.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply</http:>

The original POSIX subsystem is dead. Microsoft bought a new POSIX
subsystem when they acquired Interix (Connectix is totally different –
that’s where Virtual PC came from). It’s called “Services For Unix” on
Windows 2003, and “Subsystem for UNIX-based Applications” on Longhorn.
The GNU toolchain is available.

See http://en.wikipedia.org/wiki/Microsoft_Windows_Services_for_UNIX.

-----Original Message-----
From: Martin O’Brien
Sent: Tuesday, December 19, 2006 11:33 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Subsystems concept in Windows

Do you know what the improvements are? This surprises me, as it was, to
the best of my knowledge, static for years. I know they bought some
package from Connectix a while back; I wonder if this is the result?

Whatever the case, assuming the applications to be ported use the GNU
autotools, I don’t imagine that the result will be easy porting, unless
the new subsystem & services support them, or autotools has been update
to support the new subsystem; neither one seems at all likely to me, but
I would be very happy to be wrong.

mm

serimc wrote:

Hmm
Thanks for answers.I asked this because i am reading undocumented nt book.
http://www.windowsitlibrary.com/Content/356/01/1.html
It writes:
“Extensibility
Windows NT is highly extensible, but because of a lack of
documentation, its extensibility features are rarely explored. The
list of undocumented features starts with the subsystems. The
subsystems provide multiple operating system interfaces in one
operating system. You can extend Windows NT to have a new operating
system interface simply by adding a new subsystem program. Windows NT
provides Win32, OS/2, POSIX, Win16, and DOS interfaces using the
subsystems concept, but
http:Microsoft
> http: keeps mum
> when it comes to documenting the procedure to add a new subsystem”

It is theoretically possible, in the same way that a manned trip to Mars
is theoretically possible. Neither one is going to be easy or cheap.
In the 15 years that Windows NT has been in existence, there has never
been a subsystem added beyond the original three.

In answer to your original question, the desired subsystem is one of the
fields in the PE header. A POSIX binary will be a PE file, just like a
Win32 binary.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.</http:></http:>

McNamee, John wrote:

While not a subsystem, http://www.colinux.org/ is one way to run native
Linux apps on Windows. I don’t think coLinux is ready for prime time,
but it’s an interesting concept.

Also… The Windows POSIX subsystem is much improved in Windows
Longhorn. It won’t run native Linux binaries, but it now appears to be
a viable way to quickly port Linux apps to Windows.

But isn’t this improvement the result of Services For Unix (the former
Connectix product) now being included for free, rather than any
fundamental improvements in the POSIX subsystem? There isn’t really
very much to the POSIX subsystem itself.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

You can see a subsystem as the provider of an API. The subsystem then
translates this API to NT native API.

The problem with writing a Linux subsystem, if you discard the fact you
would need the “How to write a Windows Subsystem” book that doesn’t exist,
is that you would have to define what is a Linux subsystem, ie what features
it provides in addition to Posix. Think it’s easy? Where is the Linux
specification ? OOopss.

In addition, if you would want to run a desktop, let’s say KDE, in the
Linux subsystem you would be in a world of pain, because I don’t think you
can have two desktops on the same screen (AFAIK the win32 subsystem start is
mandatory and is the first to be started (others are optionally started)).

That’s however a very interesting question. It could be interesting to
write a “secure windows subsystem” with a very reduced set of features for
example.

EA

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of serimc
Sent: Tuesday, December 19, 2006 11:14
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Subsystems concept in Windows

Thank you Martin
What about linux subsystem in windows?
Is this possible?.I mean can we write a subsystem without recompiling
loader?
So does windows architect give permission to us for writing a subsystem as a
component?

2006/12/19, Martin O’Brien :

SERIMC:

This is really not my thing, but as it is late and you might not get a
response for a while, here are my best guesses (which I’m pretty sure
are correct).

The only OS/2 file format of which I am aware is called “NE;” it is the
same as the Windows 3.1 file format (actually, the other way around).
If you open WinNT.H, and do a search for “IMAGE_OS_HEADER,” you can see
some of the details. Because the format is the same as for 3.1, the
OS/2 subsystem has no issues supporting the native format.

To the best of my knowledge, the POSIX subsystem does not support any
file formats other than what the rest of the system supports (PE, PE+,
et. c.).

You may already know this, but just to be sure, as it is important,
both the OS/2 and POSIX subsystems are almost literally useless. For
example, the OS/2 subsystem supports only character based applications.
The POSIX subsystem does not support any existing UNIX variant
applications, unless they happen to be written specifically for it.
The long and short is that in over a decade of developing for NT, I have
never seen, read or even heard of anyone using either of these. Most
people who wish POSIX type support, end up using Cygwin.

You need to check with someone who knows more than I about whether
either of these subsystems will support your specific needs.

Hope this helps,

mm

>>> xxxxx@gmail.com 2006-12-19 02:01 >>>
Hi
I hope this is not wrong question for this mail group.
We know Windows NT provides Win32, OS/2, POSIX, Win16, and DOS
interfaces
using the subsystems concept.Win32 use PE file format or PE file format
use
win32.So what does OS/2 or Posix use?I mean what are their extensions
or
file format?

Can we write linux subsytem?So linux specific file can support by
windows.Isthis possible?


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Why not just get VmWare for Windows and install a Linux OS? Works fine for
me when needed.

Bill


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Edouard A.
Sent: Tuesday, December 19, 2006 1:13 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Subsystems concept in Windows

You can see a subsystem as the provider of an API. The subsystem then
translates this API to NT native API.

The problem with writing a Linux subsystem, if you discard the fact you
would need the “How to write a Windows Subsystem” book that doesn’t exist,
is that you would have to define what is a Linux subsystem, ie what features
it provides in addition to Posix. Think it’s easy? Where is the Linux
specification ? OOopss…

In addition, if you would want to run a desktop, let’s say KDE, in the
Linux subsystem you would be in a world of pain, because I don’t think you
can have two desktops on the same screen (AFAIK the win32 subsystem start is
mandatory and is the first to be started (others are optionally started)).

That’s however a very interesting question. It could be interesting to
write a “secure windows subsystem” with a very reduced set of features for
example.

EA

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of serimc
Sent: Tuesday, December 19, 2006 11:14
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Subsystems concept in Windows

Thank you Martin
What about linux subsystem in windows?
Is this possible?.I mean can we write a subsystem without recompiling
loader?
So does windows architect give permission to us for writing a subsystem as a
component?

2006/12/19, Martin O’Brien mailto:xxxxx >:

SERIMC:

This is really not my thing, but as it is late and you might not get a
response for a while, here are my best guesses (which I’m pretty sure
are correct).

The only OS/2 file format of which I am aware is called “NE;” it is the
same as the Windows 3.1 file format (actually, the other way around).
If you open WinNT.H, and do a search for “IMAGE_OS_HEADER,” you can see
some of the details. Because the format is the same as for 3.1, the
OS/2 subsystem has no issues supporting the native format.

To the best of my knowledge, the POSIX subsystem does not support any
file formats other than what the rest of the system supports (PE, PE+,
et. c.).

You may already know this, but just to be sure, as it is important,
both the OS/2 and POSIX subsystems are almost literally useless. For
example, the OS/2 subsystem supports only character based applications.
The POSIX subsystem does not support any existing UNIX variant
applications, unless they happen to be written specifically for it.
The long and short is that in over a decade of developing for NT, I have
never seen, read or even heard of anyone using either of these. Most
people who wish POSIX type support, end up using Cygwin.

You need to check with someone who knows more than I about whether
either of these subsystems will support your specific needs.

Hope this helps,

mm

>>> xxxxx@gmail.com mailto:xxxxx 2006-12-19 02:01 >>>
Hi
I hope this is not wrong question for this mail group.
We know Windows NT provides Win32, OS/2, POSIX, Win16, and DOS
interfaces
using the subsystems concept.Win32 use PE file format or PE file format
use
win32.So what does OS/2 or Posix use?I mean what are their extensions
or
file format?

Can we write linux subsytem?So linux specific file can support by
windows.Isthis possible?


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
http:

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
http:


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
http:

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
http:

— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</http:></http:></http:></http:></mailto:xxxxx></mailto:xxxxx>

The OP’s question is much deeper than just running vmware or just running
cygwin or ecos I think !

(S)he wants to have an environment. It’s not clear enough what is the
requirement. Does he wants to take a binary built using linux env. and run
under windows system ( the answer is simply impossible, until the loader can
understand the format of the binary to parse and create different sections
when it creates a process out of a program ).

Does (s)he want to take a (simple) linux program src and build under windows
environment, without much changes?. It might be possible, but there might be
some porting issues ( for example, file related and stats related issues I
can think of - will show off the differences)…

So it is not clear what OP wants here!. It might be that (s)he is after
building some pseudo-subsystem for linux.

-pro

On 12/19/06, Payne, William L Contr ESC OL-DE/GA <
xxxxx@tinker.af.mil> wrote:

Why not just get VmWare for Windows and install a Linux OS? Works fine
for me when needed.

Bill


*From:* xxxxx@lists.osr.com [mailto:
xxxxx@lists.osr.com] *On Behalf Of *Edouard A.
*Sent:* Tuesday, December 19, 2006 1:13 PM
*To:* Windows System Software Devs Interest List
*Subject:* RE: [ntdev] Subsystems concept in Windows

You can see a subsystem as the provider of an API. The subsystem then
translates this API to NT native API.

The problem with writing a Linux subsystem, if you discard the fact you
would need the “How to write a Windows Subsystem” book that doesn’t exist,
is that you would have to define what is a Linux subsystem, ie what features
it provides in addition to Posix. Think it’s easy? Where is the Linux
specification ? OOopss?

In addition, if you would want to run a desktop, let’s say KDE, in the
Linux subsystem you would be in a world of pain, because I don’t think you
can have two desktops on the same screen (AFAIK the win32 subsystem start is
mandatory and is the first to be started (others are optionally started)).

That’s however a very interesting question. It could be interesting to
write a “secure windows subsystem” with a very reduced set of features for
example.

EA

*From:* xxxxx@lists.osr.com [mailto:
xxxxx@lists.osr.com] *On Behalf Of *serimc
*Sent:* Tuesday, December 19, 2006 11:14
*To:* Windows System Software Devs Interest List
*Subject:* Re: [ntdev] Subsystems concept in Windows

Thank you Martin
What about linux subsystem in windows?
Is this possible?.I mean can we write a subsystem without recompiling
loader?
So does windows architect give permission to us for writing a subsystem as
a component?

2006/12/19, Martin O’Brien :
>
> SERIMC:
>
> This is really not my thing, but as it is late and you might not get a
> response for a while, here are my best guesses (which I’m pretty sure
> are correct).
>
> The only OS/2 file format of which I am aware is called “NE;” it is the
> same as the Windows 3.1 file format (actually, the other way around).
> If you open WinNT.H, and do a search for “IMAGE_OS_HEADER,” you can see
> some of the details. Because the format is the same as for 3.1, the
> OS/2 subsystem has no issues supporting the native format.
>
> To the best of my knowledge, the POSIX subsystem does not support any
> file formats other than what the rest of the system supports (PE, PE+,
> et. c.).
>
> You may already know this, but just to be sure, as it is important,
> both the OS/2 and POSIX subsystems are almost literally useless. For
> example, the OS/2 subsystem supports only character based applications.
> The POSIX subsystem does not support any existing UNIX variant
> applications, unless they happen to be written specifically for it.
> The long and short is that in over a decade of developing for NT, I have
> never seen, read or even heard of anyone using either of these. Most
> people who wish POSIX type support, end up using Cygwin.
>
> You need to check with someone who knows more than I about whether
> either of these subsystems will support your specific needs.
>
> Hope this helps,
>
> mm
>
>
> >>> xxxxx@gmail.com 2006-12-19 02:01 >>>
> Hi
> I hope this is not wrong question for this mail group.
> We know Windows NT provides Win32, OS/2, POSIX, Win16, and DOS
> interfaces
> using the subsystems concept.Win32 use PE file format or PE file format
> use
> win32.So what does OS/2 or Posix use?I mean what are their extensions
> or
> file format?
>
> Can we write linux subsytem?So linux specific file can support by
> windows.Isthis possible?
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>
>
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
> Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

“Prokash Sinha” wrote in message news:xxxxx@ntdev…

>So it is not clear what OP wants here!. It might be that (s)he is after
>building some pseudo-subsystem for linux.

Based on OP’s messages in microsoft.public newsgroups, he is
learning, or planning for his studies. No strings attached, just the usual
beginners questions.

Regards,
–PA

> The POSIX subsystem does not support any existing UNIX variant

applications, unless they happen to be written specifically for it.
The long and short is that in over a decade of developing for NT, I have
never seen, read or even heard of anyone using either of these. Most
people who wish POSIX type support, end up using Cygwin.

POSIX subsystem is now called Microsoft Interix and has gcc and a heap of
open-source tool binaries in it. I think it is better then Cygwin, which is
known to forget to use the NT’s native fork().


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

> package from Connectix a while back; I wonder if this is the result?

No, Connectix is Microsoft Virtual Machine :slight_smile:


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

>under windows system ( the answer is simply impossible, until the loader can

understand the format of the binary to parse and create different sections

NT’s loader - MmCreateSection/SEC_IMAGE path - cannot understand any non PE
format. The PE format is hard-coded.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

> ----------

From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Maxim S. Shatskih[SMTP:xxxxx@storagecraft.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, December 21, 2006 9:34 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Subsystems concept in Windows

POSIX subsystem is now called Microsoft Interix and has gcc and a heap of
open-source tool binaries in it. I think it is better then Cygwin, which is
known to forget to use the NT’s native fork().

Some time before I was interested about reasons why CygWin uses its own obscure fork() implementation and ignores native one. I hoped using native would improve performance of the shell scripts where fork() is the main bottleneck. To my surprise the native implementation isn’t faster than CygWin one. Both were really and equally slow which causes poor scripts performance. I wonder if anything changed since then; I’m affraid poor fork() performance is the “feature” of NT implementation. Instead of UNIXes where fork() is natural and fast and in turn overused.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]