Exemple #1
0
 public void checkForPendingProcess()
 {
     if (pendingProcessesQueue.Count() > 0)
     {
         if (pendingProcessesQueue[0].getArrivalTime() <= count1)
         {
             PendingProcess tempP = pendingProcessesQueue[0];
             pendingProcessesQueue.Remove(tempP);
             new Process(tempP.getName(), tempP.getPriority(), tempP.getMeasuredTime(), tempP.getSize(), tempP.getIOTime(), tempP.getThreadEnabled(), tempP.getIsDuplicateForIO());
         }
     }
 }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            new Thread(Program.createGui).Start();
            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                if (row.Cells[0].Value == null)
                {
                    break;
                }
                string name          = row.Cells[0].Value.ToString();
                bool   threadEnabled = false;
                if (row.Cells[6].Value.ToString() == "t")
                {
                    threadEnabled = true;
                }
                PendingProcess tempProc = new PendingProcess(row.Cells[0].Value.ToString(), (int)row.Cells[2].Value, (int)row.Cells[3].Value, (int)row.Cells[1].Value, (int)row.Cells[4].Value, (int)row.Cells[5].Value, threadEnabled, false);
                Program.agingHandler.addPendingProcess(tempProc);
                Program.agingHandler.startAging();
            }

            this.Close();
        }
Exemple #3
0
 public void addPendingProcess(PendingProcess p)
 {
     pendingProcessesQueue.Add(p);
 }