English 中文(简体)
• 如何把用户读物放在比方形(工作频率)更高的优先地位
原标题:How to give higher priority for a user thread than kernel thread(work_queues)

I am running an application,where certain user threads must not be preempted by kernel .I will explain my setup: OS: Linux 2.6.32 kernel

Kernel level: 1.There are many modules which are insmoded into kernel. 2.Work_queues are also initialized in some modules(I guess separate threads are created for work_queues) 3.If I am getting any hardware interrupt, I would queue this work in any of these initialized work_queue during my isr.

Application level: there are multiple threads running in parallel,some of which are of higher priority than any other thread in process.(Even kernel)

Objective: 1.If I get any hardware interrupt,isr will be automatically called in which work will be queued for any work_queue.But,I do not want scheduling of these work_queues if higher priority user level threads are running during that time.ie,certain User level threads should not be preempted by any work_queue handling in kernel.Now, i have observed that kernel gets priority than any other user thread. 2.I have multiple work_queues in kernel.How can i give different priority for different work queues.I havent seen any api to set priority for work_queues in kernel.

最佳回答

用户线必须始终先由地道-地射线透镜来预先防范,因为掩体-地射线的透镜需要应对硬件-工具。 这是按设计的。

如果您的用户对手法需要与硬件互动或实时互动,因此不应先发制人,考虑把它们放在地对地。

If you are merely encountering errors caused by your thread being descheduled during a critical operation and ending up with another thread trampling over your operation, then you should implement locking.

如果你习惯上需要打破这一支线的基本设计,那么你将需要改变格洛朗路人的行为。

问题回答

暂无回答




相关问题
Silverlight, Updating the UI during processing

I have a simple silverlight multifile upload application, and i want to provide the user with some feedback, right now its only in a test phase and i dont have the webservice. Somehow i cant get the ...

Is reading from an XmlDocument object thread safe?

I was wondering if i could safely read from an XmlDocument object using SelectNodes() and SelectSingleNode() from multiple threads with no problems. MSDN says that they are not guaranteed to be ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...

热门标签