LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-20-2016, 01:14 PM   #1
HalfMadDad
Member
 
Registered: Jun 2010
Location: Canada
Distribution: Trisquel
Posts: 113

Rep: Reputation: 9
Creating An Uninterruputable Process from User Space


Hi Everyone

I am thinking about using a Raspberry Pi or Beagleboard to control slave microcontrollers via SPI.

I may need to have these microcontrollers performing in tandem. Not really tight tolerances but synchronized in the kHz range.

If I call a function to pass instructions to the microcontrollers, the call should end fairly quickly, perhaps 100 milliseconds to 1 second but that is a really long time for an OS which might decide to go and check for emails or whatever in the meantime, losing synchronization of the microcontrollers.

I want the call to be uninterruputable, is there a way to do this from Linux? I can use C for this.

Thanks-Patrick
 
Old 07-22-2016, 08:44 AM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179
"Uninterruptible?" No, and you wouldn't want it to.

All that you really need is to be certain that the control processes are given a better-than-normal execution priority, so that the scheduler will favor them and switch to them quickly, pre-empting other activity. (Given that CPUs do things with nanosecond timing, "100 milliseconds" is eternity.)

Also, this board will only do what you give it to do. Unless you particularly want your Beagle to fetch your mail (or your morning newspaper) for you, of course it won't. If your board doesn't have anything to do but to service those controllers, you probably don't need to do anything with execution priorities at all, because the board will have nothing else to do.

Linux is, by design, not an RTOS = Real-Time Operating System. But, you don't seem to require that here.

Last edited by sundialsvcs; 07-22-2016 at 08:46 AM.
 
1 members found this post helpful.
Old 07-23-2016, 07:09 AM   #3
HalfMadDad
Member
 
Registered: Jun 2010
Location: Canada
Distribution: Trisquel
Posts: 113

Original Poster
Rep: Reputation: 9
Thanks sundialsvcs. I am looking into the nice command now. Have a great day
 
  


Reply

Tags
microcontroller, raspberrry pi


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to know which user space process is writing to SD card? sanrio alvares Linux - Newbie 2 09-07-2012 02:03 AM
memory management of a process in kernel space and user space. embeddedlinux Linux - Newbie 1 05-08-2012 09:08 AM
Virtual space seen by each new process in User space shreshtha Linux - General 2 06-22-2010 06:47 AM
How to access device from user space process stardust496 Linux - Hardware 3 07-23-2008 02:40 PM
Creating Multiple Directories in the same location in user space leebrent Linux - General 3 10-29-2007 01:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration