Linked by Thom Holwerda on Wed 9th Nov 2011 21:26 UTC, submitted by edwin
General Unix Way back in 2002, MIT decided it needed to start teaching a course in operating system engineering. As part of this course, students would write an exokernel on x86, using Sixth Edition Unix (V6) and John Lions' commentary as course material. This, however, posed problems.
Thread beginning with comment 496763
To read all comments associated with this story, please click here.
binary for windows....
by neozeed on Wed 9th Nov 2011 23:34 UTC
Member since:

I slapped together an elf cross compiler, and set it up so that you can cross compile the kernel from windows with a simple 'build' command...

I've seen patches that include VM & a basic TCP/IP stack.. I guess all that is missing is a functional libc, and shared memory, shared libraries....

It is amazing how quickly it compiles! ... with MinGW or Cygwin dd will work correctly and you can build the whole thing much easier.

Reply Score: 2

RE: binary for windows....
by bogomipz on Thu 10th Nov 2011 22:35 in reply to "binary for windows.... "
bogomipz Member since:

I guess all that is missing is a functional libc, and shared memory, shared libraries...

What makes you so sure shared libraries is important or even desirable?

Reply Parent Score: 2

RE[2]: binary for windows....
by Alfman on Fri 11th Nov 2011 04:04 in reply to "RE: binary for windows.... "
Alfman Member since:


Regarding shared libraries, I've often wondered this myself. Shared libraries are the cause of all dependency problems, but is there really that much of a net benefit?

I think maybe when RAM was extremely tight, the answer may have been yes. But these days, they may be of less value, we really ought to test our hypothesis.

Consider, that shared libraries can't be optimized over API calls. It might take 30 bytes to call a libc function, which shifts the bytes around again to do a syscall. In a static application, it could theoretically optimize away all the glue code to do a syscall directly while saving space.

Obviously we have to look at bigger libraries too, like libjpg, but even there I wonder how much space would be wasted if it were statically compiled.

This isn't to preclude to the use of shared libraries for applications which are genuinely related and deployed together. But I do see an awful lot of application specific libraries under /lib which have to be managed in lockstep with their associated application, why should these be shared libraries at all?

Reply Parent Score: 3

christian Member since:

"I guess all that is missing is a functional libc, and shared memory, shared libraries...

What makes you so sure shared libraries is important or even desirable?

All well and good until you find a critical bug in that DNS client library that every network capable program you have installed uses, and you now have to recompile (or relink at least) every single one of them.

Shared libraries may give memory usage benefits or not, may cause DLL hell in some cases, but from a modularity and management point of view, they're a god send.

Performance poor? That's an implementation detail of using lookup tables. There's nothing stopping the system implementing a full run time direct link, at the expense of memory and start up performance.

Reply Parent Score: 2

RE[2]: binary for windows....
by jabjoe on Fri 11th Nov 2011 11:32 in reply to "RE: binary for windows.... "
jabjoe Member since:

Shared objects aren't really about saving space any more (much of Window's bloat is having a massive sea of common DLLs that might be needed, and multiple versions of them, for both x86 and AMD64). It's about abstraction and updates. You get the benefits of shared code from static libs, but to take advantage of new abstractions or updates, with static libs, requires rebuilding. That's a lot of rebuilding. Check out the dependency graph of some apps you use some time. They are often massive. To keep those apps up to date would require constant rebuilding. Then the update system would have to work in deltas on binaries else you would be pulling down much much more with updates. With shared objects you get updated share code with nothing but the shared object being rebuilt. Easy deltas for free. Having to rebuild everything will have a massive impact on security. On a closed platform this even worse because the vendor of each package has to decide it's worth them updating. Often it's even worse because each vendor has their own update system that may or may not be working. Worse, on closed platforms, you already end up with things built against many versions of a lib, often needing separate shared object files (which defeats part of the purpose of shared objects. Manifest is crazy with it's "exact" version scheme.) Static libs would make this worse. With shared objects not only do you get simple updates but abstraction. Completely different implementations can be swapped in. Plugins are often a system of exactly that. Same interface to the plugin shared objects, but each adds new behaviour. Also put something in a shared object with a standard C interface, and many languages can use it.

With an open platform and a single update system, shared objects rock. You can build everything to a single version of each shared object. You update that single version and everything is updated (fixed/secured). You can sensibly manage the dependencies. You removed shared objects if nothing is using them. You only add shared objects something requires. This can and is, all automated. This does save space, and I would be surprised if that if you build everything statically the install wasn't quite a lot bigger, unless you have some magic compressing filesystem witch sees the duplicate code/data and stores only one version anyway. But space saving isn't the main reason to do it.

Any platform that moves more to static libs is going in the wrong direction. For Windows, it may well save space to move to having static libs for everything because of the mess of having so many DLLs not actually required. But it will make the reliability and security of the platform worse (though not if it already has an exact version system, then it's already as bad as it can be).

In short, you can take shared objects only from my cold dead hands!

Reply Parent Score: 3