Example #1
0
 public Scheduler(Memory memory, Processor processor)
 {
     this.memory = memory;
     this.processor = processor;
     jobQueue = new Queue(10);
     readyQueue = new Queue(10);
     deviceQueue = new Queue(10);
     processes = new ArrayList();
 }
Example #2
0
        public ProcessControl()
        {
            jobQueue = new Queue(10);
            readyQueue = new Queue(10);
            memory = new Memory(1000);
            processor = new Processor(1000);

            createThread = new Thread(Create);
            readyThread = new Thread(Ready);
            runThread = new Thread(Run);
            ioThread = new Thread(IO);
        }
Example #3
0
        /**Enables or disables appropriate menu selections to facilitate
         * intuitive user interaction.
         **/
        private void Initialize()
        {
            int os = (int)(new Random().NextDouble() * 130) + 120;
            memory = new Memory(1000, os);
            processor = new Processor(1000, 4);
            scheduler = new Scheduler(memory, processor);

            stopToolStripMenuItem.Enabled = false;
            pauseToolStripMenuItem.Enabled = false;
            quantumText.Text = processor.Quantum + "";
            freeLabel.Text = memory.FreeMemory + " kb";

            updateThread = new Thread(UpdateGUI);
            memoryThread = new Thread(Repaint);
            dbThread = new Thread(UpdateDatabase);
        }