public static void SleepProcess(string Name) { PCB pcb = PCB.GetPCB(Name); if (pcb != null) { pcb.WaitForSomething(); } }
public void Lock(PCB Proces) { if (Check()) { proces = Proces; this.Name = proces.Name; open = 1; proces.WaitForSomething(); Proces.InstructionCounter--; } else { waiting.Add(Proces); Proces.WaitForSomething(); Proces.InstructionCounter--; } }