views:

394

answers:

4

operating systems related question dunno if i can ask here

but thought i would get proper explanation in this forum

when a process be exec in user context... wont the higher priority precesses in kernel context blocking the process in user context all the time...

it is hazy for me... the concepts

......

+1  A: 

Your process in kernel mode can as well be preempted, when it reaches the quantum.

Wikipedia: Preemption

Jérôme
Could you add some links to your response Jerome?
Richard Ev
+1  A: 

http://en.wikipedia.org/wiki/Ring_0

vartec
+3  A: 

There is two main kind of scheduler in operating system, preemptive schedulers and non-preemptive schedulers.

Non preemptive schedulers would behave like you think, a process with higher rights and higher priority will keep using the cpu until it finish OR until it block (on a mutex for example or with a call to yield which explicitly release the cpu in order to schedule another one.)

But non-preemptive schedulers are rare and linux scheduler isn't that kind. It uses time slices to let process work for a short period of time before de-scheduling it, it also include priority but keep scheduling processes with lower priority, you should take a look at this linux scheduler article.

claferri
+2  A: 

This Stackoverflow posting has a discussion that includes a run-down of how kernel mode works with an explanation of some of the jargon. In particular look at the section titled 'A brief primer on kernel vs. user mode'. It might help to shed some light on your question.

ConcernedOfTunbridgeWells