DragonFly kernel List (threaded) for 2008-04
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
libthread_xu VS libc_r
I've been writing a report on threading and wanted to test our threading
libraries for fun (and graphs), so I wrote a short program to test the
time for:
pthread_create()
pthread_join()
fork() to wait()
It was done on my Athlon X2 6000+ with the frequency taken from
kern.cputimer.freq
My questions are now:
1 - How come libthread_xu has two peaks in both pthread tests?
2 - How come libthread_xu is overall faster with fork() ?
3 - What are those spikes near 0 in fork() ?
Here are the results:
http://www.rluciani.com/files/fork.png
http://www.rluciani.com/files/pthread_create.png
http://www.rluciani.com/files/pthread_join.png
// PTHREAD TEST
void * nullf(void * foo) {
return NULL;
}
t1 = rdtsc();
pthread_create(&thread, NULL, nullf, NULL);
t2 = rdtsc();
pthread_join(thread, NULL);
t3 = rdtsc();
// FORK TEST
if(fork()) {
wait();
t2 = rdtsc();
} else {
return 0;
}
--
Robert Luciani
Chalmers University of Technology, SWE
Department of Computer Science and Engineering
http://www.rluciani.com/rluciani@gmail.com.asc
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]