11
votes

I have a program that uses pthread library to do the matrix multiplication of 500x500 matrix. Each thread calculates 50 rows of the matrix.

When I time its execution:

shadyabhi@shadyabhi-desktop:~$ time ./a.out

real    0m0.383s
user    0m0.810s
sys     0m0.000s
shadyabhi@shadyabhi-desktop:~$

Why is sys+user is greater than real time?

1
If its relevant, I have a Core 2 Quad Processor & I have 64-bit ubuntu installed..Abhijeet Rastogi

1 Answers

20
votes

It is greater, because it adds the time from all the cores together.