home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.advocacy
- Path: sparky!uunet!microsoft!hexnut!adamba
- From: adamba@microsoft.com (Adam Barr)
- Subject: What portable is
- Message-ID: <1992Jul27.165547.1517@microsoft.com>
- Date: 27 Jul 92 16:55:47 GMT
- Organization: Microsoft Corporation
- Lines: 58
-
- This whole "discussion" about portability is talking about
- the amount of assembly language code as if this is the only
- area that affects portability. This isn't true. You can
- write lots of C code that is wonderfully structured, chock
- full of comments, and completely non-portable.
-
- If you are talking about an x86 to RS/6000 port, one of the
- basic differences is bit ordering. All the kernel code that
- is twiddling bits *may* have assumptions about this, whatever
- language it is written in. There is no easy way to find code
- like this either; it may be scattered everywhere.
-
- (Cynics will point out that the current list of NT platforms
- includes only little-endian machines. This is true, for the
- *current* list. This is a case where being designed with
- portability in mind helps; you may have code like that, but
- you can put it all in one place or put a big comment about
- it in the code.)
-
- Another non-portable area is handling of things like the
- interrupt controller. The x86 machines all have an Intel
- 8259 interrupt controller sitting between the bus and the
- cpu. How often does the OS/2 kernel touch this chip? Is
- it all in one place? Assuming the RS/6000 doesn't have
- this chip, all that code needs to be replaced, not
- just converted from C to assembler.
-
- Worse, how many times did a programmer working on something
- not obviously connected to interrupt handling say to themselves,
- "I can fix this problem if I just do this and this to the 8259"?
- Again, the fact that the code is in assembler is a minor point;
- differences like this may invalidate fundamental assumptions
- that were made during the design of the OS.
-
- What about the memory manager? The scheduler? The cache?
- What crucial piece of code depends on a feature of the
- x86 that doesn't exist on an RS/6000? Or depends on a
- certain operation being really fast on one processor,
- when it is extremely slow on another?
-
-
- I'm not saying any of this happened; note that I use "may"
- a lot. Accuse me of FUD if you want; I think these are
- the kinds of questions people should be asking when IBM
- makes portability claims, instead of arguing about how
- much assembler is in the code (although this matters too!).
-
-
- I could make similar arguments about symmetric multiprocessor
- support. Are the functions for SMP support in one place? Does
- the kernel call those functions when needed? How many assumptions
- about non-preemption does the OS/2 kernel make while accessing
- global data?
-
-
- - adam
-
- DISCLAIMER: Fire hazard, do not burn
-