예제 #1
0
 public static SuspendedReadyQueue createSuspendedReadyqueue()
 {
     if (thisClass == null)
     {
         thisClass = new SuspendedReadyQueue();
     }
     return(thisClass);
 }
예제 #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();
 }