On Thu, Dec 10, 2009 at 11:31 AM, ZelluX <[email protected]> wrote:
> Hi, all
> I'm not familiar with x window system and trying to know some details about
> process scheduling.
> Considering such a situation, some applications are running on x window
> systems and one of them, for example, a web browser has the focus. If there
> comes an interrupt, such as a keyboard interrupt, and now kernel takes over
> the control. My question is that what's the running user-mode application
> now, is it the web browser, xserver, or any process is possible?
> Many thanks for your reply.

On a single CPU / core system (3), there's no user mode process "running" (1)
when an interrupt request is being serviced by the kernel. The process
that was previously running is still the "current" (2) one until a reschedule
event happens, which depending on kernel configuration may happen
just after the interrupt request returns, or just before returning from
kernel mode to user mode. So it may still be your web browser, but it
could be any other process...

(1) meaning its instructions are being executed by a cpu execution unit
(2) current is the pointer from which the kernel can access the process
that was running on the CPU before servicing the interrupt request.
(3) multi-core / SMP systems are more complicated

I hope this isn't too inaccurate to be useful...

-- 
Vincent Legoll
_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to