From: "Duane Sand" <duane.sand@mindspring.com>
Subject: Re: Tru64 .vs. HP-UX (was: Compaq's Secret VMS Plans (The Inquirer))
Date: Thu, 29 Nov 2001 04:48:48 GMT [thread overview]
Message-ID: <Q6jN7.54684$RG1.29896820@news1.rdc1.sfba.home.com> (raw)
In-Reply-To: FbdN7.137529$qx2.8519246@bin5.nnrp.aus1.giganews.com
> Duane Sand wrote
> > The starting question is,
> > Will the merged Unix be big-endian, like PA-RISC and IPF HP-UX are,
> > or little-endian, like Tru64?
> > The IPF hardware can do both, even at same time for different processes,
> > but no practical OS will ever be bi-endian in its raw file support.
Bill Todd wrote:
> I'm not sure what you mean by the last clause above: while applications
> may (or may not) elect to embed endian-sensitive data in their files (and
> if they do will certainly have problems sharing that data with other-endian
> applications), that's an application-level rather than a file-system issue,
> so it's not clear what application-visible implications file-system
> endianness has (assuming of course that at the API appropriate
> conversions are made when dealing with other-endian applications)?
Sorry, that phrase "bi-endian in its raw file support" was unclear
and/or wrong. Of course, the file system's support for byte stream
files or disk block files doesn't care in any way, how those bytes
and words are arranged and interpreted by applications.
A big-endian file server can service little-endian clients
and vice versa, no problem.
What I should have said, is that any automatic byte-swapping
service supplied by the OS or runtime library, is going to be
useless for automatically converting files whose internal
layouts are unknown to the system. So the system generally
can't help a big-endian version of an application work together
with a little-endian version of that same application. The
problem is that when items of different sizes are intermixed
in a file or struct, the two-byte numbers must be byte-reversed
on a two-byte basis, and four-byte numbers must be byte-
reversed on a four-byte basis, etc. The system doesn't
know enough about each application's declarations or
methods to know how to parse and reverse each part.
Some cases of file interchange can work via automatic byte
swapping. This includes data bases (whose internal
structures are self-described somewhere), and simple files
where all items are the same size (eg text files), and
Fortran binary files (where the read/write statements show
how to parse each record into bigger and smaller fields).
The cases that don't work, include C programs reading and
writing structs with scalar fields of different sizes, or
worse yet, unions of those. (And that's most every program
I deal with.)
> > One camp of users or the other will be losers, in having to fix endian-
> > sensitive nonportable source code before doing the "just a recompile",
> > even if both sets of APIs are supported, and in not having the option
> > for a binary translator for unchanged PA-RISC or Alpha binary
> > programs.
>
> While I agree that any migration to an other-endian environment
> requires at a minimum exhaustive testing to ensure that there is no
> endian-sensitive code in one's applications,
In my experience, nearly every program is endian-sensitive, unless it
has already been ported back and forth between big- and little-endian
machines already. And it's some hassle to find declarations or methods
that need changing, and some hassle to make those changes.
> I would have thought that the ability to run a
> process in either-endian mode on IA64 would make binary translation
> possible - and 'just a recompile' migration possible as well if an IA64
> compiler that generates same-endian output code was available.
> Assuming, again, that the OS was capable of handling either-endian
> processes (possibly by stub translators).
Yes, yes, and yes. It's possible to create an entirely big-endian
environment on top of a little-endian machine, and vice versa.
It's not even particularly inefficient; just requires inserting an
XOR operation on addresses, and many of those can be
folded at compile time or moved out of loops.
But what sucks, is trying to have anything in that application
environment talk to opposite-endian software outside that
environment, including the OS.
next prev parent reply other threads:[~2001-11-29 4:48 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0033000042788869000002L092*@MHS>
[not found] ` <91666EA00warrenspencer1977@207.126.101.97>
[not found] ` <D4PM7.70514$uB.11455648@bin3.nnrp.aus1.giganews.com>
[not found] ` <91668821Cwarrenspencer1977@207.126.101.97>
2001-11-27 19:00 ` Compaq's Secret VMS Plans (The Inquirer) Bill Todd
2001-11-28 1:52 ` John McNulty
2001-11-28 6:33 ` Bob Marcan
2001-11-28 14:43 ` Terry C. Shannon
2001-11-28 7:53 ` John McLean
2001-11-28 13:52 ` Tru64 .vs. HP-UX (was: Compaq's Secret VMS Plans (The Inquirer)) John McNulty
2001-11-28 14:33 ` Bob Koehler
2001-11-28 14:46 ` Terry C. Shannon
2001-11-29 7:54 ` Jack Patteeuw
2001-11-28 16:34 ` JF Mezei
2001-11-28 16:45 ` John F Carr
2001-11-28 16:49 ` david20
2001-11-28 17:20 ` Duane Sand
2001-11-28 22:04 ` Bill Todd
2001-11-28 22:59 ` Milton
2001-11-29 5:26 ` Duane Sand
2001-11-29 11:55 ` Larry Kilgallen
2001-11-29 4:48 ` Duane Sand [this message]
2001-11-29 9:54 ` Martin Knoblauch
2001-11-29 5:06 ` Vance R. Haemmerle
2001-11-29 5:11 ` Vance R. Haemmerle
2001-11-30 21:56 ` The new Sun server, more Digital knock-offs Marty Kuhrt
2001-12-01 13:57 ` Tru64 .vs. HP-UX (was: Compaq's Secret VMS Plans (The Inquirer)) Peter da Silva
2001-12-01 13:53 ` Peter da Silva
2001-12-01 17:05 ` Bill Todd
2001-12-01 20:13 ` Peter da Silva
2001-12-01 20:46 ` Bill Todd
2001-12-03 14:04 ` Bob Koehler
2001-12-04 3:52 ` David J. Dachtera
2001-12-04 13:32 ` Bob Koehler
2001-12-01 16:50 ` Linux? (was: Tru64 .vs. HP-UX) Mike Coleman
2001-12-01 17:11 ` Tobias Ernst
2001-12-01 19:33 ` Mike Coleman
2001-12-02 8:10 ` Adam Price
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox