Beispiel #1
0
        public KThread(
            AThread Thread,
            Process Process,
            Horizon System,
            int ProcessorId,
            int Priority,
            int ThreadId) : base(System)
        {
            this.ThreadId = ThreadId;

            Context        = Thread;
            Owner          = Process;
            PreferredCore  = ProcessorId;
            Scheduler      = System.Scheduler;
            SchedulingData = System.Scheduler.SchedulingData;

            SiblingsPerCore = new LinkedListNode <KThread> [KScheduler.CpuCoresCount];

            MutexWaiters = new LinkedList <KThread>();

            AffinityMask = 1 << ProcessorId;

            DynamicPriority = BasePriority = Priority;

            CurrentCore = PreferredCore;
        }
Beispiel #2
0
        public KThread(Horizon system) : base(system)
        {
            _scheduler      = system.Scheduler;
            _schedulingData = system.Scheduler.SchedulingData;

            SiblingsPerCore = new LinkedListNode <KThread> [KScheduler.CpuCoresCount];

            _mutexWaiters = new LinkedList <KThread>();
        }
Beispiel #3
0
        public KThread(Horizon System) : base(System)
        {
            Scheduler      = System.Scheduler;
            SchedulingData = System.Scheduler.SchedulingData;

            SiblingsPerCore = new LinkedListNode <KThread> [KScheduler.CpuCoresCount];

            MutexWaiters = new LinkedList <KThread>();
        }
Beispiel #4
0
        public KScheduler(Horizon System)
        {
            this.System = System;

            SchedulingData = new KSchedulingData();

            CoreManager = new HleCoreManager();

            CoreContexts = new KCoreContext[CpuCoresCount];

            for (int Core = 0; Core < CpuCoresCount; Core++)
            {
                CoreContexts[Core] = new KCoreContext(this, CoreManager);
            }
        }
Beispiel #5
0
        public KScheduler(Horizon system)
        {
            _system = system;

            SchedulingData = new KSchedulingData();

            CoreManager = new HleCoreManager();

            CoreContexts = new KCoreContext[CpuCoresCount];

            for (int core = 0; core < CpuCoresCount; core++)
            {
                CoreContexts[core] = new KCoreContext(this, CoreManager);
            }
        }
Beispiel #6
0
        public KScheduler()
        {
            SchedulingData = new KSchedulingData();

            CoreManager = new HleCoreManager();

            CoreContexts = new KCoreContext[CpuCoresCount];

            for (int Core = 0; Core < CpuCoresCount; Core++)
            {
                CoreContexts[Core] = new KCoreContext(this, CoreManager);
            }

            if (!MultiCoreScheduling)
            {
                Thread PreemptionThread = new Thread(PreemptCurrentThread);

                KeepPreempting = true;

                PreemptionThread.Start();
            }
        }