Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Bind all processes to a single core by default.: (5 Items)
   
Bind all processes to a single core by default.  
Is there any way to force all system processes and threads to use a single processor core?

I know I can use 'on' to set the runmask of a particular process and I can use ThreadCtl( 
_NTO_TCTL_RUNMASK_GET_AND_SET_INHERIT.. to bind particular threads. But is there any way to bind all process to a single
 core by default, preferably at boot time.

My aim is to get all the system tasks and drivers to run on one processor core, leaving the other cores free to run our 
real-time tasks.  Note I DO want to use the all the processor cores, just I want to use of all but one of the cores 
exclusively for our application code. Currently I can see our application code is being interrupted by the system 
threads.

Thanks
Alastair
--------------------------------------------------------------------------------------------------
This email and any attachments are confidential and are for the use of the
addressee only. If you are not the addressee, you must not use or disclose the
contents to any other person. Please immediately notify the sender and
delete the email. Statements and opinions expressed here may not
represent those of the company. Email correspondence is monitored by
the company. This information may be subject to export control
regulation. You are obliged to comply with such regulations.

Renishaw plc (company number 1106260) and Wotton Travel Limited (company
number 01973158) are companies registered in England and Wales with a registered office
at New Mills, Wotton-under-Edge, Gloucestershire, GL12 8JR,
United Kingdom, Telephone +44 1453 524524.
--------------------------------------------------------------------------------------------------
Attachment: HTML sf-attachment-mime35020 3.79 KB
Re: Bind all processes to a single core by default.  
You could try to write a system boot script that launches all your drivers and system tasks. You invoke that script with
 on -C0 <your core 0 boot script.sh>. To the best of my knowledge, the binding on core 0 will be inherited. As a last 
point in that script, you could call you application starter script like this: on -C1 -C2 -C3 <your application start 
script.sh>.

Regarding the interruption you are seeing and trying to resolve, not sure if this binding will solve all your needs, at 
least not without more core migrations. Maybe using priorities (perhaps try SCHED_SPORADIC) or APS is a better choice. 
It depends on the timing resolution that you require.

Regards,
Albrecht
Re: Bind all processes to a single core by default.  
Thank you for your reply.  I was experimenting with running our application code on different process cores. I realised 
I was easily able to lock our application to one or more cores, but this does not allow us exclusive use of those cores.
 I was wondering if it was possible to have exclusive use of one or more cores. From your reply, it sounds as if this 
might be possible but not simple. While it would make a nice and clean design if we were able to assign 3 of the 4 cores
 on our processor for exclusively for our use, in reality it is not causing us an issue at the moment. If this does 
become a problem, then I will investigate your suggestion in more detail.

Thank you for your time
Alastair
Re: Bind all processes to a single core by default.  
Hi

Thanks for your suggestions. I have edited the start-up script in my boot image and I have managed to move all the tasks
 onto a single core, except “procnto-smp-instr”. Am I right in assuming that “procnto-smp-instr” must be free to run
 on all cores? I assume since this is the microkernel it needs to run threads on all the cores.

Thanks
Alastair
Re: Bind all processes to a single core by default.  
Maybe you can use the command 'on' with your specific runmask ( option '-R' and '-C' ) for starting your processes.