Skip to main content
. 2019 Nov 9;19(22):4902. doi: 10.3390/s19224902
Algorithm 3 DVFS and Virtual Task Injection
  • 1:

    Tcur current temperature sensor values;

  • 2:

    Calculate Pcur with Tcur using Equation (1);

  • 3:

    Pth=(G+K)·TthK·Tamb;

  • 4:

    i0;

  • 5:

    form=1 to M do                        ▹ For each core

  • 6:

        while Pth[m]>Pcur[m] do

  • 7:

            if fa(pem)fLthen                   ▹ Frequency scaling

  • 8:

               when fa(pem)=fl, fa(pem) to fl+1;

  • 9:

            else                          ▹ Virtual task injection

  • 10:

               if um+v_exv_p·fL1 then

  • 11:

                   VV{vi};

  • 12:

                   set map(vi)=pem and update um;

  • 13:

                   ii+1;

  • 14:

               else

  • 15:

                   break;

  • 16:

               end if

  • 17:

            end if

  • 18:

            update Pcur[m];

  • 19:

        end while

  • 20:

    end for