Re: Linux vs Solaris?
From: Chuck Dillon (spam_at_nimblegen.com)
Date: 02/18/05
- Next message: Heny Townsend: "libmba port to Solaris"
- Previous message: Kelvin Moss: "Re: Suggestions of design (contd.)"
- In reply to: Måns Rullgård: "Re: Linux vs Solaris?"
- Next in thread: Måns Rullgård: "Re: Linux vs Solaris?"
- Reply: Måns Rullgård: "Re: Linux vs Solaris?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Heny Townsend: "libmba port to Solaris"
- Previous message: Kelvin Moss: "Re: Suggestions of design (contd.)"
- In reply to: Måns Rullgård: "Re: Linux vs Solaris?"
- Next in thread: Måns Rullgård: "Re: Linux vs Solaris?"
- Reply: Måns Rullgård: "Re: Linux vs Solaris?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|