Board index » kylix » Re: Kylix now officially alive?

Re: Kylix now officially alive?


2005-01-10 09:15:11 PM
kylix1
On 2005-01-09, Michael Schnell < XXXX@XXXXX.COM >wrote:
Quote
>Are you sure this is MP safe?

As _only_ bus locking instruction are used for the critical variable, it
is multi processor save _if_ it's thread save. I can't guarantee same,
but I did not find a reason why it would not be. It's running in an
embedded (single processor) project since years without any problem, but
of course this is no proof.
I don't know either :-)
I just asked around a few times when I thought a certain construct was
overweight, and it was almost always because of SMP.
Quote
>IIRC the Indy problems of last spring were due to such constructs which turned
>out to be not MP (and thus HT) safe.

Supposedly they did not use the appropriate bus locking instructions
(which need to be done using ASM).
Could be. Or maybe, because lock costs a lot of time, they call the OS, and
the SMP kernel has lock() and the uniproc not.
 
 

Re:Re: Kylix now officially alive?

On 2005-01-09, Michael Schnell < XXXX@XXXXX.COM >wrote:
Quote

>Are you sure this is MP safe?

BTW. 1: I remember that the Delphi 4? string handling was not multi
processor save.
I know. Thread in c.p.l.m last week.
Quote
BTW. 2: I remember that last time I worked with FP some years ago the
memory management was not even thread save.
Depends on major version. 1.1.x/1.9.x is for a year or two, though bugs
were fixed for a while after that, 1.0.x stil is not.
There is a standard simple threadvar test in the testsuite that adds a
character to a string in 10 different threads, and that works on all
4 major archs (PPC,x86_64 , x86 and Sparc(32+64)), don't know about ARM.
Quote
Is the FP memory management and string handling (and other basic stuff)
thread and multi processing save now ?
It should be thread safe. There are some duals here and there, so I think
most is also MP safe, but I don't think that has tested enough to be sure.
 

Re:Re: Kylix now officially alive?

Quote
Could be. Or maybe, because lock costs a lot of time, they call the OS, and
the SMP kernel has lock() and the uniproc not.
If you are accessing a shared memory AFAIK using a lock with an
instruction (e.g. inc or dec) does not cost much time. At least _much_
less than doing a system call.
-Michael
 

{smallsort}

Re:Re: Kylix now officially alive?

Quote
It should be thread safe. There are some duals here and there, so I think
most is also MP safe, but I don't think that has tested enough to be sure.
That is _very_ hard to test, as the likelihood of a concurrent access to
the same memory cell from different processors is _extremely_ small (it
needs to be done within two or three memory cycles).
So looking at the code with multiple eyes is much needed.
-Michael