Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site watcgl.UUCP Path: utzoo!watmath!watcgl!dmmartindale From: dmmartindale@watcgl.UUCP (Dave Martindale) Newsgroups: net.unix-wizards,net.arch Subject: Re: Boundary alignment: Ken Reek responds (LONG!) Message-ID: <2543@watcgl.UUCP> Date: Thu, 10-May-84 11:09:29 EDT Article-I.D.: watcgl.2543 Posted: Thu May 10 11:09:29 1984 Date-Received: Sun, 13-May-84 00:45:45 EDT References: <1052@ritcv.UUCP> Organization: U of Waterloo, Ontario Lines: 39 To address your last point first, I do not see how you can agree that UNIX was written "wrong" because parts of it assume that all pointers will fit in an int, an then say that your sofware is right and the hardware is wrong for not allowing non-aligned references. If you believe that all hardware should allow non-aligned references for the benefit of the software, why don't you also argue that all hardware should use byte addressing, with all pointers the same length and the pointer the same size as the int? These latter restrictions are actually far more important to porting much code than having the processor do unaligned fetches. Hardware design is a series of tradeoffs. It would be nice to have hardware that would accept data on arbitrary byte boundaries. It would be even nicer to extend that to arbitrary bit boundaries. It would be nice if no machine had an address shorter than 24 bits, 32 would be much better. It would be nice if all machines had floating-point instruction times which are comparable to their integer instruction times. It would be nice to have virtual memory capability on all machines (this makes a much greater difference in "size of problem that can be handled" than the ability to pack data to eliminate wasted space). But all "it would be nice to have" features cost something - in speed, cost, power, size of board, or somewhere. Manufacturers will continue to decide to include or exclude a feature based on these tradeoffs. Computer users will continue to evaluate the machines produced in light of their capabilities, restrictions, and the application they are intended for. Now, if you choose to ignore all machines which will not do unaligned fetches, that is your right. But please do not badmouth other people who see other issues as more important to what they do. And if you really want to call your software "portable", it should run on machines which have different sizes of pointers, different byte orders within the word, different native character sets, and even restrictions on the alignment of data. You make software which is portable by making it independent of the details of the implementations of a wide variety of machines, not by arguing that a certain class of those machines should not be allowed to exist. Dave Martindale