Sturla Molden wrote:
> [This is perhaps OT on the Cython list. Please forgive me the noise.]

Well, I for one think it is interesting, so continuing OT...

> 
> Stefan,
> 
> CreateProcess in Win32 API and fork in Interix (SUA/SFU) both call the
> kernel function ZwCreateProcess in ntdll.dll. If NULL is passed as section
> handle to ZwCreateProcess, it will clone the current process. The
> copy-on-write optimization actually happen in hardware. Most modern
> processors have a paging memory-management unit that can tag pages as
> shared and copy-on-write. The reason that early versions of Unix or Linux
> did not copy-on-write optimize fork but modern do, is that CPUs have
> evolved. You can read about Windows kernel programming in Nebbet's book on
> NT kernel internals. It even has example code for a boiler-plate
> implementation of fork.
> 
> Cygwin's problem is that hooking up a process created by ZwCreateProcess
> to the Win32 or SUA subsystem is undocumented; neither MS documentation or
> Nebbet cover that. That is why Cygwin does not implement a copy-on-write
> fork yet, although most modern hardware supports it.
> 
> I recommend using Interix (SFU/SUA) instead of Cygwin. You will need 
> Windows XP professional or enterprice, or Windows Vista / Windows 7
> Ultimate. The codebase of Interix is mostly derived from OpenBSD. This
> means it is very safe. The old POSIX subsystem form Windows NT4 is
> deprecated in favour of Interix. You'll find more information at
> www.interix.com. Prebuilt binaries for common Unix tools can be downloaded
> from the Warehouse in SUA community.

How fun is it to develop something which requires Windows 
Ultimate/Enterprise though?

For applications one only uses oneself that is fine, but then one might 
just as well use Linux. In my experience, Cygwin is often used as an 
easy way out for porting open source software to Windows, and SFU/SUA 
seem to exclude at least most of the home users and quite a few laptop 
users.

Can one compile gcc for SFU/SUA? Does that have less or more problems 
than gcc for Cygwin?

-- 
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to