top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How can I calculate the complexity of a system call?

+1 vote
423 views

I am using for loop. In for loop there is one system call OR POSIX API (EX : read , write, fopen, fclose, open, close , pthread_create etc...)
How can I calculate the complexity of program. Is there any link where I can see code of system call or complexity ??

posted Oct 23, 2013 by Vikas Upadhyay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Depends on what your code is doing each component of the output of time may be significant. This question deals with what those components mean. If the code you're timing doesn't utilize system calls, calculating the "user" time is probably sufficient. I'd probably just use the "real" time.

answer Oct 23, 2013 by Atul Mishra
This is partly true when system-call is datasize independent, but there can be case where system call dependent on size of DS. But yes in this case we can safely assume system call will always take fix amount of time
Total Complexity = complexity of the user code (loop)
Similar Questions
+4 votes

Calculate 1+2+…+n without multiplication, division, key words for, while, if, else, switch, case, as well as conditional operator (A ? B : C).

...