Ejemplo n.º 1
0
 private void button4_Click(object sender, EventArgs e)
 {
     while (q.Count() > 0)
     {
         q.Clear();
         listBox1.Items.Clear();
     }
     q = new Piramida <int>();
 }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (q.Count() == 0)
            {
                MessageBox.Show("Элементов больше нет");
                // q = new Piramida<int>();
                q = new Piramida <int>();
            }
            try
            {
                q.Remove_max();

                listBox1.Items.Clear();
                for (int i = 0; i < q.Count(); i++)
                {
                    listBox1.Items.Add(q.GetQ[i]);
                }
            }
            catch
            {
                label2.Text = Convert.ToString(0);
            }
        }
Ejemplo n.º 3
0
        public Model(double intens, int b_min, int b_max)
        {
            queue    = new SimpleQ <Process>();
            ready_pr = new Piramida <Process>();
            clock    = new Clock();
            cpu      = new CPU();
            resource = new Resource();
            planner  = new Planner(cpu, ready_pr);
            rand     = new Random();
            pl       = new Rc_planner(resource, queue);

            intensive       = intens;
            burst_min       = b_min;
            burst_max       = b_max;
            zadania         = 0;
            max_length      = 0;
            takt            = 0;
            p               = 0;
            srednee_waiting = 0;
            res             = 0;
            srednee_oborot  = 0;
            res1            = 0;
        }
Ejemplo n.º 4
0
 public Planner(CPU centr_rp, Piramida <Process> p)
 {
     cpu      = centr_rp;
     piramida = p;
 }