public PCBList(int UIprocesses, int calculatingProcesses, int ProdConsumProcesses) {
		pcbList = new HashMap<Integer, ProcessControlBlock>();
		prodMutexMap = new HashMap<Integer, ProcessControlBlock>();
		conMutexMap = new HashMap<Integer, ProcessControlBlock>();
		int pid = 0; // Usually PID 0 is for scheduler.
		int mutex = 0; // The memory location that the producer-consumer pair looking at.
					   // A pair share the same mutex number.
		
		for (int i = 0; i < UIprocesses; i++) {
			GenericProcess ui = new UIProcess();
			ProcessControlBlock uiPCB = new ProcessControlBlock(pid, ui);
			setRandomPriority(uiPCB);
			pcbList.put(pid, uiPCB);
			pid++;
		}
		
		for (int i = 0; i < calculatingProcesses; i++) {
			GenericProcess compute = new ComputeProcess();
			ProcessControlBlock cPCB = new ProcessControlBlock(pid, compute);
			setRandomPriority(cPCB);
			pcbList.put(pid, cPCB);
			pid++;
		}
		
		for (int i = 0; i < ProdConsumProcesses; i++) {
			GenericProcess producer = new ProducerProcess();
			GenericProcess consumer = new ConsumerProcess();
			ProcessControlBlock producerPCB = new ProcessControlBlock(pid++, producer);
			ProcessControlBlock consumerPCB = new ProcessControlBlock(pid++, consumer);
			producerPCB.setMutex(mutex);
			consumerPCB.setMutex(mutex);
			setRandomPriority(producerPCB);
			setRandomPriority(consumerPCB);
			pcbList.put(producerPCB.getPid(), producerPCB);
			pcbList.put(consumerPCB.getPid(), consumerPCB);
			prodMutexMap.put(producerPCB.getMutex(), producerPCB);
			conMutexMap.put(consumerPCB.getMutex(), consumerPCB);
			mutex++;
		}
		
		/*
		for (int i = 0; i < IOprocesses; i++) {
			GenericProcess io = new IOProcess();
			pcbList.put(pid, new ProcessControlBlock(pid, io));
			pid++;
		}*/
		
	}