private void switchProcess() {
		Process process = cpu.getActiveProcess();
		if(process != null){
			process.leftCpu(clock);
			cpu.addProcess(process);
			process.enterCpuQueue(clock);
			statistics.nofForcedProcessSwitch++;
		}
		process = cpu.startNextProcess();
		if(process != null){
			process.enterCpu(clock);
			if(process.getTimeToIO() > cpu.getMaxCpuTime() && process.getRemainingCpuTime() > cpu.getMaxCpuTime()){
				statistics.totalCpuTime+=cpu.getMaxCpuTime();
				eventQueue.insertEvent(new Event(SWITCH_PROCESS, clock+cpu.getMaxCpuTime()));
			}
			else if(process.getTimeToIO()>process.getRemainingCpuTime()){
				statistics.totalCpuTime+=process.getRemainingCpuTime();
				eventQueue.insertEvent(new Event(END_PROCESS, clock+process.getRemainingCpuTime()));
			}
			else{
				statistics.totalCpuTime+=process.getTimeToIO();
				eventQueue.insertEvent(new Event(IO_REQUEST, clock+process.getTimeToIO()));
			}
		}
	}