On Mon, 06 Oct 2008, David Arturo Macias Corona wrote:

Hi David,

> Below are results of
> [E:\harbour809mt\harbour\tests]..\bin\hbrun_mt.exe speedtst.prg --thread=2 
> --scale --exclude=mem
> Strange results, or I am confused ?
> factor are around 2 (total 1.90) but computer is SINGLE CPU
> AMD Athlon 2200+ 2.0 Ghz, 1 Gb RAM

> 10/06/08 07:08:33 OS/2 4.50
> Harbour 1.1.0dev (Rev. 9557) (MT)+ EMX GNU C 3.3.5 (32 bit)
> THREADS: 2
> N_LOOPS: 1000000
> excluded tests: 029 030 023 025 027 040 041 043 052 053 019 022 031 032 054
>                                                         1 th.  2 th. factor
> ============================================================================
[...]
> ============================================================================
> [   TOTAL   ]_________________________________________130.34  68.73 ->  1.90
> ============================================================================
> [ total application time: ]...................................260.81
> [ total real time: ]..........................................260.81

Thank you very much for test results.
The real factor is 1.00. See the total real time values:
260.81 - 130.34 = 130.47
130.34 / 130.47 = 99.9
but in 130.47 we have also cost of test envelop so it's in practice 1.00.
Such effect can be caused by irregular internal real time clock counter
updating. Such things happens in Win9x. Probably OS2 does not update
real time clock counter when more then one thread is executed simultaneously.
F.e. it can retrieve clock value from cache when other threads are still
active waiting for CPU and refresh it only when current thread is the one
working. In such case in the second column you will have only the time of
the second thread because when 1-st one finished the clock counter is not
updated and returns starting value. Above results suggest that exactly sth
like that happened in your case.
It's yet another bad side effect of using real time clock. Fortunatelly
here real results can be recalculated from total real time.
It will be interesting to see how the same test will look in OS2 on multi
CPU machine.

BTW Has OS2 some functions to retrieve CPU time consumed by process and/or
    thread?

best regards,
Przemek

ps. There is sth wrong with you mail program. All messages you sent are
    attached to very old threads from 2005. If mail/news reader can follow
    threads not only subject then it's hard to locate them.
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to