About runqueues in Linux

Sowmya Sridharan sowmya.sridharan at tcs.com
Thu Dec 23 05:58:26 EST 2010


Greetings List,

I have certain queries regarding the maintenance of runqueues in Linux.
In case of an SMP system, will a same process be added to multiple 
runqueues? 

In the sample data given below, I am seeing that the process "Appstart" is 
added to the runqueue on CPU1, but it is not run on that CPU. Instead it 
is added to CPU0's runqueue, and it is run on that CPU. I have not affined 
the process to any CPU, and it is not multi-threaded.

CPU1 data:
Cpu: 1, HRT: 1290079896.698994, Pid: 6577, Pname: Appstart 
added_to_runqueue, current process: irc(6103)
Cpu: 1, HRT: 1290079896.706994, Pid: 6103, Pname: irc 
added_to_runqueue,current process: swapper(0)

CPU0 data:
Cpu: 0, HRT: 1290079896.702994, Pid: 6577, Pname: Appstart 
added_to_runqueue, Current process: eventd(5370)
Cpu: 0, HRT: 1290079896.702994, Pid: 14247, Pname: Conn_agent 
added_to_runqueue, Current process: Appstart(6577)

What is the default CPU on which a process runs, if cpu affinity is not 
set?
Is it possible that a process added to one runqueue can be moved to 
another runqueue?
Also I have seen swapper getting scheduled frequently even if there are 
runnable processes. Shouldn't swapper be run, only if there are no 
runnable processes?

Your insights will be appreciated.

Regards,
Sowmya
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20101223/1a0b89ff/attachment.html 


More information about the Kernelnewbies mailing list