SMP - dedicated processor

SMP - dedicated processor

Post by icur » Wed, 25 Jun 2003 23:10:14



Hi,

I had a question on how to make sure that a task/process is run on a
particular processor. Well, some of you would say that leave it on the
scheduler. But then there are some real-time applications such as video
applications. I understand that setting thread-priority and processor
affinity can help a great deal in this but still there is a possibility that
the scheduler might switch the processor. Moreover, is there a way, we can
make sure that only a specific task is run on a processor and it is not
burdened with anything else. ie. dedicate a processor for a specific task.

Let me give you some idea about where I am coming from. I would like to
design a 'pipe-line' processor where one processor, P1 is just dedicated for
video processing, one for user-interface, one for interrupts and say another
one for rest of the tasks. The shared memory programming helps here to a
great extent. But what is of main concern that P1 should never be made to
process other tasks no matter even if its idle. Is there a way, one can
ascertain it or write applications specific to get around this issue ?.

Thanks,

sk

 
 
 

SMP - dedicated processor

Post by Kasper Dupon » Wed, 25 Jun 2003 23:46:10



> Hi,

> I had a question on how to make sure that a task/process is run on a
> particular processor. Well, some of you would say that leave it on the
> scheduler. But then there are some real-time applications such as video
> applications. I understand that setting thread-priority and processor
> affinity can help a great deal in this but still there is a possibility that
> the scheduler might switch the processor. Moreover, is there a way, we can
> make sure that only a specific task is run on a processor and it is not
> burdened with anything else. ie. dedicate a processor for a specific task.

I believe that if you use a high realtime priority, you can be sure no
other process get the particular CPU. To ensure you stay on the same
CPU use affinity (I guess you already know how to do that). What remains
is AFAIK only interrupts. Many systems actually don't balance the
interrupts across the CPUs, so you could probably put your process on a
CPU that takes no interrupts except from IPIs. But if you do all that,
I don't know why you would get any IPIs at all. What cases could cause
unwanted IPIs?

--
Kasper Dupont -- der bruger for meget tid p? usenet.

It is NOT portable (Linus Benedict Torvalds 1991)

 
 
 

SMP - dedicated processor

Post by icur » Thu, 26 Jun 2003 03:41:43


I read that 'bindprocessor' can be used to delegate processor. Is that
correct. From high-level point of view, can this processor affinity be
specified through thread (pthread) attribute or some other API.

Moreover, looks like setting high priority and affinity would do the
job. But at the same time, is there a way to restrict a CPU's ability
to execute some processes or restrict a CPU from running at all.

sk.



> > Hi,

> > I had a question on how to make sure that a task/process is run on a
> > particular processor. Well, some of you would say that leave it on the
> > scheduler. But then there are some real-time applications such as video
> > applications. I understand that setting thread-priority and processor
> > affinity can help a great deal in this but still there is a possibility that
> > the scheduler might switch the processor. Moreover, is there a way, we can
> > make sure that only a specific task is run on a processor and it is not
> > burdened with anything else. ie. dedicate a processor for a specific task.

> I believe that if you use a high realtime priority, you can be sure no
> other process get the particular CPU. To ensure you stay on the same
> CPU use affinity (I guess you already know how to do that). What remains
> is AFAIK only interrupts. Many systems actually don't balance the
> interrupts across the CPUs, so you could probably put your process on a
> CPU that takes no interrupts except from IPIs. But if you do all that,
> I don't know why you would get any IPIs at all. What cases could cause
> unwanted IPIs?

 
 
 

SMP - dedicated processor

Post by Piotr Zgoreck » Fri, 27 Jun 2003 07:06:27



> Hi,

> I had a question on how to make sure that a task/process is run on a
> particular processor. Well, some of you would say that leave it on the
> scheduler. But then there are some real-time applications such as video
> applications. I understand that setting thread-priority and processor
> affinity can help a great deal in this but still there is a possibility that
> the scheduler might switch the processor. Moreover, is there a way, we can
> make sure that only a specific task is run on a processor and it is not
> burdened with anything else. ie. dedicate a processor for a specific task.

Try to google for 'shielded processors' or similar. I recall a paper about
a realtime linux kernel that leveraged your idea. I don't remember if it
was GPL-ed, don't even have a url. I just remember the term: shielded
processors.

Regards,
Piotr Zgorecki

 
 
 

1. Question on dedicating a processor to a specific process

Is it possible under Solaris 2.x (2.6 and up) to configure a multi-processor
machine (SPARC) to assign a dedicated processor to a specific application
process?  I need to have a web-server running on the server and then another
application running on a dedicated processor...

Thanks

2. XDMCP Problem with RedHat 6.1

3. Dedicating a Processor

4. How to improve UDP socket performance

5. Dedicated Unix dedicated Server

6. Problem using the Chooser to select a host CDE login

7. Linux dedicated UT server vs. Win32 dedicated server ?

8. Problem with pppd

9. smp kernel on a one processor system

10. SMP kernel on a uni-processor machine?

11. MOSIX farm: single processors or SMP?

12. SMP - Simple as plugging in processor?

13. SCO 5.0.4 SMP driver problems with Pentium II processors