[LITMUS^RT] Job Quantity Issue

Geoffrey Tran gtran at isi.edu
Fri Aug 28 03:16:03 CEST 2015


Hi all,

I was hoping to please get assistance with the following problem. It
is somewhat related to the previous messages at:
https://lists.litmus-rt.org/pipermail/litmus-dev/2015/001107.html

I have written a simple application based off of base_task.c from
liblitmus.  However, there is some strange behaviour.  First of 
all, by the time the first job is run, the job number is around
4 or 5.  

The second problem is that the number of jobs that show up in
the traces is non-deterministic by a large range.  Below I 
show two outputs from st_job_stats, one where it behaves
somewhat as expected, and another where it does not. According to
the input parameters, there should be 10 jobs, with a WCET of
1ms, period of 100ms. However, the issue does show up at other
parameters also. 

In testing a previous version of this, it was observed that the
job number would change during the execution of the jobs, however
no sleep_next_period() was called, nor were any deadlines 
visible in the trace.

# Task,   Job,     Period,   Response, DL Miss?,   Lateness,  Tardiness
# task NAME=deadlineDetectF PID=2758 COST=1000000 PERIOD=100000000 CPU=0
  2758,     2,  100000000,       8054,        0,  -99991946,          0
  2758,     3,  100000000,      62671,        0,  -99937329,          0
  2758,     4,  100000000,     996256,        0,  -99003744,          0
  2758,     5,  100000000,     970581,        0,  -99029419,          0
  2758,     6,  100000000,     964336,        0,  -99035664,          0
  2758,     7,  100000000,     958248,        0,  -99041752,          0
  2758,     8,  100000000,     955480,        0,  -99044520,          0
  2758,     9,  100000000,     964887,        0,  -99035113,          0
  2758,    10,  100000000,     965928,        0,  -99034072,          0
  2758,    11,  100000000,     957819,        0,  -99042181,          0
  2758,    12,  100000000,     956312,        0,  -99043688,          0
  2758,    13,  100000000,     984235,        0,  -99015765,          0

# Task,   Job,     Period,   Response, DL Miss?,   Lateness,  Tardiness
# task NAME=deadlineDetectF PID=3070 COST=1000000 PERIOD=100000000 CPU=0
  3070,     2,  100000000,      33947,        0,  -99966053,          0
  3070,     3,  100000000,      42835,        0,  -99957165,          0
  3070,     4,  100000000,    1107656,        0,  -98892344,          0
  3070,     5,  100000000,     381027,        0,  -99618973,          0
  3070,     6,  100000000,    1051830,        0,  -98948170,          0
  3070,     7,  100000000,     490626,        0,  -99509374,          0
  3070,     8,  100000000,    1043252,        0,  -98956748,          0
  3070,     9,  100000000,      53935,        0,  -99946065,          0
  3070,    10,  100000000,    1082526,        0,  -98917474,          0
  3070,    11,  100000000,     308576,        0,  -99691424,          0
  3070,    12,  100000000,    1047968,        0,  -98952032,          0
  3070,    13,  100000000,      47943,        0,  -99952057,          0
  3070,    14,  100000000,    1046669,        0,  -98953331,          0
  3070,    15,  100000000,      85873,        0,  -99914127,          0
  3070,    16,  100000000,    1050608,        0,  -98949392,          0
  3070,    17,  100000000,     342484,        0,  -99657516,          0
  3070,    18,  100000000,    1058368,        0,  -98941632,          0
  3070,    19,  100000000,      98624,        0,  -99901376,          0
  3070,    20,  100000000,    1160669,        0,  -98839331,          0
  3070,    21,  100000000,     484409,        0,  -99515591,          0
  3070,    22,  100000000,    1061522,        0,  -98938478,          0
  3070,    23,  100000000,     121314,        0,  -99878686,          0

The pseudocode for this program is as follows:
	Process input parameters
	Initialize task parameters (precise enforcement, hard RT)
	init_litmus()
	set_rt_task_param()
	Change to RT task
	Wait for ts_release
	Read initial job number
	do
		sleep_next_period()
		job()
	while job count !=0
	Change to background task

	job()
		read current job #, should be old # + 1
		if not equal
			deadline missed processing(short)
		save current job #
		Do heavy computation calibrated for time
		job count --

Sorry for the long email, just wanted to try to get the details in!

Thanks for any help,
Geoffrey




More information about the litmus-dev mailing list