As an example suppose for the runs shown in figure

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: to 2.49 seconds, less than half of the elapsed time of 6.52 seconds, indicating that the processor was executing other processes at the same time. The percentage indicates what fraction the combined user and system times were of the elapsed time, e.g., ´¾ ¾¿ · ¼ ¾ µ ¾ ¼ ¿ ½. The remaining statistics summarize the paging and I/O behavior. Programmers can also read the process timers by calling the library function times, declared as follows: #include <sys/times.h> struct tms clock t clock t clock t clock t ; tms tms tms tms utime; /* user time */ stime; /* system time */ cutime; /* user time of reaped children */ cstime; /* system time of reaped children */ clock t times(struct tms *buf); Returns: number of clock ticks elapsed since system started 9.2. MEASURING TIME BY INTERVAL COUNTING 457 These time measurements are expressed in terms of a unit called clock ticks. The defined constant CLK TCK specifies the number of clock ticks per second. The data type clock t is typically defined to be a long integer. The fields ind...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online