Ejemplo n.º 1
0
        public override bool TryAddOverflow(Process process)
        {
            var oldestProcess = ProcessList.OrderBy(m => m.CreateDate).First();

            Kill(oldestProcess.PID);
            return(true);
        }
Ejemplo n.º 2
0
        public override bool TryAddOverflow(Process process)
        {
            var lowerPriority = ProcessList.OrderBy(m => m.CreateDate)
                                .FirstOrDefault(m => m.Priority < process.Priority);

            if (lowerPriority == null)
            {
                return(false);
            }

            Kill(lowerPriority.PID);
            return(true);
        }