Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
1699 Discussions

Restricting OS service and appilcation to use specific set of cores

kiranprabhu
Beginner
1,065 Views

Hi is there any way to restrict OS(Windows 2008 Server) services and startup applications to runon a set ofCores/Processor so that other cores are free to execute an application written by me( i am using C++/.Net). I wish to dedicate certain cores for my application.

Thanks

Kiran

0 Kudos
2 Replies
Dmitry_Vyukov
Valued Contributor I
1,065 Views

The easiest way to achieve this is as follows.

Bind your application's threads to a subset of processors with SetProcessAffinityMask(GetCurrentProcess(), mask).

Raise priority of your process as much as possible with SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);

Raise priority of all your threads as much as possible with SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);

I believe this way you will occupy the processors almost entirely. OS can schedule some episodic activities on the processors anyway, but I think that's inevitable.

0 Kudos
iekpo
Beginner
1,065 Views
I believe OpenMP and Intel TBB have tools that would allow you to set the affinity for a particular thread to a specific core. You should look into it.
0 Kudos
Reply