Esempio n. 1
0
 public static void executequeue3(MLFQ_Queue queue)
 {
     while (queue.Count != 0 && reverttohigherpriority != 1 && reverttohigherpriority != 2)//Run while queue1 and queue2 do not have any processes
     {
         Process p = queue.Dequeue();
         printexecution(p, queue.queue1, queue.queue2, queue);
         if (p.firstrun == true)
         {
             p.responsetime = p.wait;
             p.firstrun     = false;
         }
         fcfs(queue, p);//Execute the Processes in queue3 using FCFS
     }
 }
Esempio n. 2
0
 public static void executequeue1(MLFQ_Queue queue)
 {
     reverttohigherpriority = 0;//Reset priority variable
     while (queue.Count != 0)
     {
         Process p = queue.Dequeue();
         printexecution(p, queue, queue.queue2, queue.queue3);
         if (p.firstrun == true)
         {
             p.responsetime = p.wait;
             p.firstrun     = false;
         }
         roundrobin(queue, p);//Execute the Processes in queue1 using Round Robin with TQ 6
     }
 }
Esempio n. 3
0
        public static void executequeue2(MLFQ_Queue queue)
        {
            while (queue.Count != 0 && reverttohigherpriority != 1)//Run while queue1 does not have any processes
            {
                Process p = null;

                p = queue.Dequeue();
                printexecution(p, queue.queue1, queue, queue.queue3);

                if (p.firstrun == true)
                {
                    p.responsetime = p.wait;
                    p.firstrun     = false;
                }
                roundrobin(queue, p);//Execute the Processes in queue2 using Round Robin with TQ 11
            }
        }