Research Article

CaLRS: A Critical-Aware Shared LLC Request Scheduling Algorithm on GPGPU

Algorithm 1

CaLRS scheduling algorithm.
queue[5] contain 5 LLC priority queue
cur_mreq is current memory request
prio stands for a memory request’s priority
prioMap[5] is the mapping table for queue priority rotation
CF-prio[33] =
       [−1,  0,  1,  1,  1,  2,  2,  2,  2,  3,  3,  3,  3,  3,  3,  3,  3,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4]
       is the CF to priority mapping table
Procedure  CaLRS(cur_mreq, queue[5])
     Insertion:
         prio = CF-prio[cur_mreq->CF]; //change CF to priority
         while  queue[prioMap[prio]].full() && prio  <  4
                prio++;
         end while
         if  prio  =  4
         Set_LLC_Queue(STALL);
         else
               queue[prioMap[prio]].push_back(cur_mreq);
     Issue:
         int = 0;
         while  queue[prioMap[i]].empty()
                 ++;
         if    <  6
                cur_mreq = queue[prioMap[]].pop_front();
                ISSUE(cur_mreq);
     Rotation:
         if  queue[prioMap[]].empty()
                for  int     =  0;   <  5; ++
                        prioMap[] = (prioMap[]  +  4)%5;
                if  Get_LLC_Queue() = STALL
                        Set_LLC_Queue(UNSTALL);