Page 1 of 1

Process Situations vs. Priority

Posted: Sat Sep 29, 2007 10:26 am
by piranha
So, there is priority scheduling....-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6
Each number is a consecutive priority.

What about process situations? Like:
-1: Nobody Cares about these processes.
0: Background, really low priority.
1: Background, normal.
2: Normal.
3: High priority.
4: Vital User processes.
5: Vital System Processes, non-killable.
6: Emergency, non-killable, when one of these is running ALL of the process < 4 pause.

Other then that, each one could have it's own rules for the running of the processes, or rules that define what situation process can run when others are running......
There could also be a combo of priority and situation scheduling...
Tell me what you think.

-JL

Posted: Sat Sep 29, 2007 11:01 am
by 01000101
That is a good idea.
But doesnt Windows already utilize that?

There are already non-killable critical process usage that makes the other lower non-critical processes slow down or even halt until it is finished.

Posted: Sat Sep 29, 2007 12:50 pm
by piranha
Yeah, but in my idea you can change priority of everything. Even critical.

Yes windows does this, but to me it doesn't seem to work very well.

Windows uses priority only. I haven't come up with specific rules, but there could be a setup of automatically moving the priority/situation up or down depending on CPU usage, signals, or something.

-JL

Posted: Sat Sep 29, 2007 2:06 pm
by Avarok
In my opinion the problem with Window's critical processes - like shutting down a process - is that they're processes at all.

1) Why the hell do you need a process to free an address space and remove an item from a scheduler?
2) Doesn't creating one to kill another cost more than just killing it in the first place?

In my opinion, it doesn't matter which one is full of invigorating youthful vitality. The only reason I see for prioritization at all is to allow us to define which drivers go first. We can usually figure that out using the LAPIC, and we usually tend to use more or less the same prioritization layout; give or take depending on our OS' design objectives.

Posted: Sat Sep 29, 2007 7:12 pm
by AndrewAPrice
Minix 3, from what I've gathered from studying it's source, priorities processes as; Kernel, Driver, Server, User. The process will not get a share of the CPU if a process in a former category still has work to do.

So the user processes get CPU time, drivers and servers are forced to do their work as fast as possible. That's why if a driver or server is using up enough CPU resources, a special process server will 'ping' it, and if it does not reply then the driver or server will be considered stuck in a loop and will be killed and restarted.