[Wolves] Macs, Linux et al

Adam Sweet drinky76 at yahoo.com
Mon Apr 11 14:06:21 BST 2005


--- Kevanf1 <kevanf1 at gmail.com> wrote:
> I know that you can run Linux on a Mac using the
> Yellow Dog distro. 
> But, can you run FreeBSD?  What about running XP on
> a Mac? Is it
> possible?

Just to add my own 10p, I thought I'd add stuff that
nobody else said. Windows is written for IBM
compatible PC hardware in so much as it's source code
will contain assembly code that makes use of processor
instructions that are only available on processors
that are used in IBM compatible PCs (Intel, AMD,
Transmeta, Cyrix etc...). For this reason it wouldn't
run on Mac hardware.

Mac OS is almost certainly the same for PPC hardware
and formerly for Motorola 68000 (aka MK68) and
therefore wouldn't run on an Intel clone machine.

Similar for Linux, but the Linux kernel source
separates out the hardware specific stuff and offers
support for different processors, so you select your
processor in the kernel configuration process so it
knows which architecture to compile for at compile
time. Obviously never tried it, but for that reason
you couldn't compile a kernel for a Sparc machine on
PPC machine as the resultant binaries are specific to
the processor type it was compiled on and it's
processor instructions.

This is how you have Linux for Intel (386, 468, P1, 2,
3, 4 etc), AMD (K6, K7 and AMD64), Sparc (32 and 64),
PPC, Motorola 68000, MIPS etc etc etc...

Microsoft tried to become ubiquitous across most
hardware platforms, or maybe just suck in other
hardware users over to Wintel, by making Win NT
available for other hardware architectures as somebody
else said. This is the reason behind the Windows
Hardware Abstraction Layer, to make it somewhat
hardware independent and more easily portable.

The problem with this was that nobody really bought it
because software writers had to rewrite/rebuild their
products to run on more architectures and it was too
much hassle (ask the Debian project about supporting
so many architectures, in short they're thinking of
dropping some to speed up development as it's a
massive task to support the entire system in parallel
across so many archs, sadly Sparc is one of the ones
for the chop, which I have).

On top of this you have your application level
software which is not only compiled for the
architecture, but also the OS platform. On Windows you
have the umpteen levels of API calls (this is what you
write your software against, instead of telling the
program to get the kernel to do xyz, you use the API
call which tells the kernel for you, it's to stop
badly behaved programs messing with the kernel itself,
instead, the MS written API calls talk to the kernel
for you). These API calls are in all of those million
system .dll files.

http://www.webopedia.com/TERM/A/API.html

For those reasons a Windows program wouldn't run on
Linux or Mac OS regardless of architecture unless
there is some kind of port of the Windows API to
Linux. Fortunately there is, it's called Wine.
Obviously it's incomplete as they're chasing a moving
target.

On Linux, the system is flatter and it is possible to
write your software to make system calls directly,
though there are now growing masses of prewritten
libraries and frameworks that will do it for you, you
write your software against the given API.

Again, aside from architectural differences, Linux
system call and API differences mean that they can't
natively run Windows or Mac OS programs and Windows or
Mac OS[1] can't natively run Linux programs.

[1] Mac OS X, being BSD based is able to run quite a
lot of open source software by providing operating
system facilities to make it easier to port apps to OS
X.

Thats just about concludes I think. It's all in the
processor instructions and the compilation.

Ad

-- 

http://www.drinky.org.uk

http://blog.drinky.org.uk

Send instant messages to your online friends http://uk.messenger.yahoo.com 



More information about the Wolves mailing list