Re: Linux vs Solaris?

From: Chuck Dillon (spam_at_nimblegen.com)
Date: 02/18/05


Date: Fri, 18 Feb 2005 08:45:30 -0600

Måns Rullgård wrote:

> Chuck Dillon <spam@nimblegen.com> writes:
>
>
>>Måns Rullgård wrote:
>>
>>>Nils Weller <me@privacy.net> writes:
>>>
>>>>(Another system that does this is Tru64 UNIX. Both systems optionally
>>>>print an error message to the console when such a fault occurs.)
>>>
>>>In my opinion, any program that does such accesses is badly broken in
>>>the first place. There is simply no excuse for not doing it right.
>>
>>I wouldn't paint such a broad brush. I agree that if one is
>>attempting to develop for optimal performance and/or for portability
>>one must account for known hardware based issues/limitations. But I
>>don't think it's reasonable to consider all software that required
>>neither to be broken. Especially if the author is not the one who
>>decided it needed to be ported.
>
>
> The only way these accesses happen is through bad programming style.

Not if you include usage of mmap'd data, and to some extent shared
memory segments. The particular case that comes to mind is mmap'ing a
file of a standard format in which the format is not inherently aligned
to comply with your system's addressing limitations. Or are you
suggesting that all file formats that don't ensure long word alignment
are broken?

> I have *never* had to do anything special to avoid unaligned accesses.
> When using proper types for your data, you simply won't get any
> unaligned pointers to worry about.

Neight have I except when dealing with mmap'd or shared memory cases.
We benefit from the allocation functions and compilers that know how to
avoid system limitations.

It seems you consider SIGBUS as a debugging aide. I couldn't agree
more that developers need to know how to properly manage data
structures and that it's good for the system to send SIGSEGV if they
mangle memory or mismanage pointers. But SIGBUS is not a reliable way
to report on or catch such problems. SIGBUS is an artificial and IMHO
from the developer's perspective arbitrary limitation that we accept
for the sake of faster execution.

-- ced

>
> There are situations where unaligned data makes sense, but someone who
> doesn't know to deal properly with it shouldn't be writing such
> programs in the first place.
>

-- 
Chuck Dillon
Senior Software Engineer
NimbleGen Systems Inc.


Relevant Pages

  • Re: Using the HMS functions in a user RPL program.
    ... to decide when it's proper to use these functions, ... between Polar and Rectangular coordinates; ... The format itself, however, inherently introduces ...
    (comp.sys.hp48)
  • Re: Record Duplication & Formatting Advise Please.....
    ... Instead of just Copy then Paste, you need to copy then Edit>Paste Special> choose Values as this will change the formulae into the absolutes of what the formulae are doing i.e. the Proper names. ... The Properfunction cannot be used in the cell with the entry itself. ... using auto correct but I wondered if this is the correct use of this feature ... I also looked at the "Proper " format, but can't seem to get it to work. ...
    (microsoft.public.excel)
  • Re: NotInList will not allow me to modify NewData
    ... This may help you to understand how to use the NotInList event: ... > "in the format Last Name, First Name.", vbExclamation Or vbSystemModal, ... > If I don't use the proper format I get the ... > I have tried using acDataErrContinue but I still get the NotInList ...
    (microsoft.public.access.formscoding)
  • Re: Month only field problem
    ... reports are fiscal year, some calendar. ... names alphabetically so assigning a number value should keep it in the proper ... calendar order. ... >>field size is long interger and Format is mmmm. ...
    (microsoft.public.access.tablesdbdesign)
  • format command algorithms
    ... Does anyone know the algorithms and limitations that the 'format' ... I've seen examples of format.dat entries for SCSI disks. ...
    (comp.unix.solaris)

Loading