Пример #1
0
 public static WaitingQueue createWaitingQueue(int maxSize)
 {
     if (thisQueue == null)
     {
         thisQueue = new WaitingQueue(maxSize);
     }
     return(thisQueue);
 }
Пример #2
0
 static void Main(string[] args)
 {
     o            = new object();                                                  // created for lock object
     agingHandler = new AgingHandler();                                            // this will handle aging of processes and sort queues.
     new Thread(createFrontGui).Start();                                           // a thread will create a gui
     cpu                   = CPU.createCPU(100);                                   // cpu object will handle all processing of processes.
     newQueue              = new NewQueue();                                       // this queues will contain processes.
     readyQueue            = new ReadyQueue(1000);
     suspendedReadyQueue   = SuspendedReadyQueue.createSuspendedReadyqueue();
     waitingQueue          = WaitingQueue.createWaitingQueue(1000);
     suspendedWaitingQueue = new SupendedWaitingQueue();
     os                = new OS();                                                 // this object will handle swapping and dispatching of processes.
     newIOHandler      = new IOHandler();                                          // this object wuill handle processes io waiting in the blocked queue
     finishedProcesses = new FinishedProcesses();
 }