This may be a stupid question but is it possible to make Linux service only one application. If there is only one .exe file to be run is it possible to tell Linux to stop polling round, for want of a better word, looking to see if anything else requires service. I am new to Linux and its distro,s so it may well be a stupid question.
Regards Mark
-
- Posts: 81
- Joined: Tue Apr 17, 2012 4:44 pm
Re: Can linux be made to service one application.
No. Linux is multiuser multiprocess by nature.
-
- Posts: 220
- Joined: Tue Oct 09, 2012 8:13 pm
Re: Can linux be made to service one application.
If you have your application, you can make the Pi start that when it boots. If you can make the Pi shutdown when you exit the application (also part of the start script) it might do what you want it to. You can stop some of the services to cut down the drain on CPU / memory. Although Linux is multiuser by design, you can login with only one user
Note that Linux programs are not .exe's as these are Windows only
Add a few details for a more comprehensive answer
Note that Linux programs are not .exe's as these are Windows only
Add a few details for a more comprehensive answer
- tedhale
- Posts: 114
- Joined: Thu Sep 20, 2012 4:52 pm
- Location: Williamsburg, VA, USA
- Contact: Website
Re: Can linux be made to service one application.
The best you can do is load a minimal system with all un-needed services disabled.
Several people have posted links to minimal Raspian images on this board.
Several people have posted links to minimal Raspian images on this board.
- Ted B. Hale
http://raspberrypihobbyist.blogspot.com
http://raspberrypihobbyist.blogspot.com
-
- Posts: 81
- Joined: Tue Apr 17, 2012 4:44 pm
Re: Can linux be made to service one application.
Thanks for your comments. I have written a Lazarus program that runs fine on the RPI , however it is useing the GPIO to monitor real time events from IR beams. It is not as yet useing interrupts only monitoring loops. I have put "application.processmessages" lines in the code at points that I expect the program to be simply waiting for the next event in the hope that Linux will do its thing in responce to these lines and less likely to be wanting to do something when my code is active. There will only be the one Lazarus .exe file running. Hope that may help.
Regards Mark
Regards Mark
Re: Can linux be made to service one application.
The literal answer is yes. If you add " init=/path/to/your/program" to cmdline.txt, then at boot the kernel will start your application and no others.metal mark wrote:This may be a stupid question but is it possible to make Linux service only one application.
Some programs will not function without the assistance of the normal background daemons, however. And even if there are no other user processes to schedule there will still be hardware interrupts and kernel threads, so you cannot guarantee to get exclusive access to the CPU for long periods.
If you just want high scheduling priority for short periods, then see "man chrt".
-
- Posts: 81
- Joined: Tue Apr 17, 2012 4:44 pm
Re: Can linux be made to service one application.
Thank you all for your replies , I now have a few things to try out.
Many thanks.
Kind regards MM
Many thanks.
Kind regards MM