Przemyslaw Czerpak wrote:
> For me it looks like normal CPU balancing done by OS.
> It's out of Harbour application controll. Sometimes it
> can be controlled by OS settings.
> 
Yes, I've added a call to set affinity to a single cpu and now I have one cpu
maxed out and the other nearly idle.

I was not 'prepared' to the fact that OS/2 reschedules to the cpu with less
work (which is what is causing cpu monitor to spike).

Anyway, it still is slower than the same program on a 2.4Ghz CPU with UNI
kernel, so maybe there is some slowdown in the kernel and/or the SMP kernel
should be used on a real multi-cpu PC while I have a HT one.

Maybe changing speedtst to divide it into two functions and execute both at
the same time with two threads could gain something.

That said, all is working as it should :)

>> PS. BTW, If I press Alt-C process does not stop, probably only single thread
>> gets stopped. See here, I had to press Alt-C two times.
>> (E:\repository\harbour-svn\tests\mt)mau
>> Cancelled at: T (9) in mau.prg
>> Cancelled at: INKEY (0)
>> MAIN (5) in mau.prg
>> (E:\repository\harbour-svn\tests\mt)
> 
> Yes ALT-C stops only the thread which received such key.
> If this is the main thread then QUIT request is send to all other
> threads. Otherwise only one thread is terminated.
> 
IMHO this is 'wrong' since I don't know which thread I'm killing, because
killing a single thread in a multi-threaded program could create problems to
the whole program and because I need a way to stop a program without having to
press Alt-C a few tens of times :)

So, I'd say that Alt-C should terminate the whole process.

Best regards.

Maurilio.

-- 
 __________
|  |  | |__| Maurilio Longo
|_|_|_|____| farmaconsult s.r.l.


_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to