Newsgroups: comp.sys.transputer
From: eeberger@hope (Lothar Berger)
Subject: measure execution time on T800
Organization: Swansea Info Server
Date: Thu, 17 Nov 1994 13:47:23 GMT
Message-ID: <CzEzMz.2I5@info.swan.ac.uk>

Hi,
My assignment is the measurement (extraction) of execution time of procedures
written in Parallel C running on the following target machine: T800 on a IP1 
TRAM on a B008 in a PC

If my task that includes the procedure is the only scheduled task it is no
problem, I can measure the run-time either with a resolution of 1us 
(urgent) or 64us (not-urgent). But this requires that my procedure does not 
include "channel"  and I/O commands. In this case I do not only measure the
execution time (CPU time) of my task but the execution time including my task
and the tasks invoked by my procedure plus the time for scheduling. 

Is it possible to measure how much time the CPU spends on the execution of each
task active during the start of my measurement and the end of my measurement?
I. e. what time is spend for what? (see figure)
What about the time needed for scheduling and switching to another process? -
When a non-urgend task is scheduled it is less than 1us, but can it also be
neglected when a urgent task is invoked (saving registers!)?

figure:

mytask (low prio)   ***********        *********   ***********************
2nd task (low prio)            ********          
scheduling			     	        *
urgent task			  	         **		


time for mytask =  |----------|  +      |-------|  + |--------------------|

time for 2nd task =            |-------|


I would appreciate any advise.
Thanks for your time and consideration

Lothar

*************************************************************************
*        __      ____                                           	*
*       // /    //   \   Lothar Berger                                  *   
*      // /    //____/   University of Wales Swansea, United Kingdom    *
*     // /__  //    \    Real-Time AI Group			        *
*    //____/ //_____/    email L.Berger@swansea.ac.uk                 	*
*                        		                         	*
*	fax <UK>-792-295812		phone <UK>-792-205678 - 4574    *
*									*
*************************************************************************


