Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1. how sum of system time and user time can be greater than real time ?
2. Even though my program is not waiting for any I/O the real time is smaller than system time as shown
thanks for ur reply..
the things which I know regarding this are:
real time is the actual elapsed time(from beginning to end of the program)
user time includes time needed for executing user defined code.
System time for executing system calls(kernel time).
but I am confused as to how system time can be greater than real time. even i am not clear with it.
just waiting for someone to answer.
Chaitanya.
Last edited by chaitanyajun12; 04-07-2011 at 02:23 PM.
It is absolutely logical that sometimes the wall clock time (real) is smaller than the sum of sys and user time.
Sys and user time is the time that CPU spends within the process. If you have an application with multithreading, then the time could be larger than that of real.
Also real time could be way larger than the sum of sys and user time, because of blocking actions like IO.
Real time on a PC with a CPU is referring to clock time of the CPU, to call and execute a function call in real time is -- "right now" without delay, this is machine language that manipulates the hardware of the system, whereas software has a delay to it due to having to go through the API or a driver therefore, not actually speaking to the hardware directly. Hence a delay in time occurs due to this effect of having to go through a proxy of sorts first before the hardware actually receives the call to do something. It is not real time programming but that other one which the name of it escapes me at this moment.
In computer science, real-time computing, or reactive computing describes hardware and software systems subject to a "real-time constraint", for example from event to system response. Real-time programs must guarantee response within specified time constraints, often referred to as "deadlines". Real-time responses are often understood to be in the order of milliseconds, and sometimes microseconds. A system not specified as operating in real time cannot usually guarantee a response within any timeframe, although actual or expected response times may be given.
therefore anything other programming will be slower then "real time" if it is not machine code assembly language.
Actually, the most likely explanation in this case is that your times are just too small to measure (meaningfully). When you're dealing in the realm of "0.00x seconds," 'irrelevant curiosities' (ahem...) may appear.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.