About the scheduling of xorg applications

Vincent Legoll vincent.legoll at gmail.com
Thu Dec 10 04:25:24 PST 2009

On Thu, Dec 10, 2009 at 11:31 AM, ZelluX <zellux at gmail.com> 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

More information about the xorg mailing list