header
Schedule and Schedule2

Tag:
Edit edit   Starstar

Program Information

Name: Schedule and Schedule2
Domain: Algorithm
Functionality: These two programs perform priority scheduling,which internally maintain four mutually exclusive job lists:(1) Three priority job-lists $P_1,P_2$ and $P_3$;(2) One blocked job list $P_B$. 
Input: $\small \textbf{command coded ``5"(QUANTUM_EXPIRE):}$ releases the currently activated job and puts it to the end of the corresponding job list. $\small \textbf{command coded ``3"(BLOCK):}$ puts the currently activated job to the block list $P_B$  $\small \textbf{command coded ``4"(UNBLOCK):}$ takes a ratio r as a parameter.The index of the selected job to be unblocked from $P_B$ is determined by multiplying the length of $P_B$ by the ratio $r$. $\small \textbf{command coded ``1"(NEW_JOB):}$ takes an integer $i(1 \leq i \leq 3)$ as its parameter to specify the priority, and adds a new job to the end of $P_i$. $\small \textbf{command coded ``2"(UPGRADE_PRIO):}$ promotes a job from its current priority job list $(P_i)$ into the next higher priority job list $(P_{i+1})$, where $i = 1$ or 2. The programs accept three integers ($a_1,a_2$ and $a_3$),and an input file as the input parameters,where $a_i$ specifies the initial number of jobs in $P_i$ Source test case and follow-up test case are denoted as $C_s$ and $C_f$ 
Output: The output of the follow-up test case denoted as $O_f$ and the output of the source test case denoted as $O_s$.

Reference

 Metamorphic slice: An application in spectrum-based fault localization https://doi.org/10.1016/j.infsof.2012.08.008 

MR Information

MR1------ Substitution of the quantum expire command

Description:
Property: $O_s=O_f$ where $C_f$ is constructed by replacing command ``5" in $C_s$ with commands ``3" and ``4 1.00".
Source input: $C_s$
Source output: $O_s$
Follow-up input: $C_f$
Follow-up output: $O_f$
Input relation: $C_f$ is constructed by replacing command ``5" in $C_s$ with commands ``3" and ``4 1.00".
Output relation: $O_s=O_f$
Pattern:

MR2------ Substitution of the adding job command

Description:
Property: $O_s=O_f$ where $C_f$ is constructed by replacing command $``1 i+1"$ in $C_s$ with command ``1 i" followed by $``2 i 1.00"$ ($i = 1$ or 2)
Source input: $C_s$
Source output: $O_s$
Follow-up input: $C_f$
Follow-up output: $O_f$
Input relation: $C_f$ is constructed by replacing command $``1 i+1"$ in $C_s$ with command ``1 i" followed by $``2 i 1.00"$ ($i = 1$ or 2)
Output relation: $O_s=O_f$
Pattern:

MR3------ Substitution of block and unblock commands 

Description:
Property: The numbers of commands ``3" and ``4" in this list are $m$ and $n$.After processing the command list,there should be $k=m-n$ jobs in $P_B$.Therefore, we can remove all the commands ``3" and ``4" and insert the following commands in this command list, without changing the value of $k$: (1)If $k > 0$, insert command ``3" $k$ times.(2)If $k < 0$, insert command ``4" k times (the parameter of ratio can be any value within [0.00,1.00]).(3)If $k = 0$, insert no command. 
Source input:  $C_s$
Source output: $O_s$ 
Follow-up input: $C_f$ 
Follow-up output: $O_f$ 
Input relation: $C_f$ is construct by apply the above removal and insertion operations. 
Output relation: $O_s.Numbers = O_f.Numbers$ 
Pattern:
Insert title here