Thread starvation and resource saturation in atomicity functions?
Chad Attermann
chad@broadmind.com
Tue Apr 1 15:27:00 GMT 2008
"Chad Attermann" <chad@broadmind.com> writes:
> Running at least i486 code would make sense on AMD Opteron processors. I
> am shocked that the gcc version shipped by Sun Microsystems would be
> compiled for i386. I compiled my own version of gcc 4.2.2 n the same
> platform and it too appears to have used i386 code. Perhaps the gcc build
> configuration process for Solaris is flawed? Regardless I will be
> attempting to build a new version today that is forced to use the i486
> code. Would apprecite if you have any tips.
My bad... I was mistakenly thinking I needed re-build gcc in order to get
i486 code. In reality I should only need to specify the architecture type
when building my own application using "-march=i486", or perhaps even
"-march=opteron" in my own case.
As stated in gcc docs, i386 is the default instruction set for "i386 and
x86-64 family of computers" when the architecture is not explicitly defined,
so presumably atomic test-and-set operations will use spin-locks by default.
So I suppose the moral of the story remains... excercise extreme caution
when using varying thread priorities.
Regards.
More information about the Gcc
mailing list