It's not a secret anymore!
The moose likes General Computing and the fly likes Barebones operating system Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Barebones operating system" Watch "Barebones operating system" New topic

Barebones operating system

Tommy Mato

Joined: Dec 14, 2007
Posts: 26

I am writing a processor-bound program that makes good use of multi-threading and runs on multi-core processors. It is essential that I wring every ounce of power out of the machine.

The program will read data from a RAM disk, will save statistics to the RAM disk. No graphics are involved, no internet access (for now), disk access required to load the programs and data into RAM disk, but not required during program running (it runs for a week at a time).

This cunning plan is somewhat spoiled by the fact that the operating system is overoccupied with virus scanning, checking for updates, indexing disks, etc, etc, in multiple unnecessary services.

I'd be interested to hear ideas on what makes a good 'bare-bones' OS. Would I be better with Linux? If so, which one? Is there an easy way to shut down all background tasks and services so that my program can get on and do its job.

Thanks in advance for your help.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

UNIX based operating systems (including LINUX) allow you to increase the priority of your process.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
John Kimball
Ranch Hand

Joined: Apr 13, 2009
Posts: 96
So does Windows, for all the good that it does

If you're serious about looking into Linux, try out Ubuntu server edition.
Of all the Linux distros, it is probably the easiest to get up and running.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
Here is what I hate about Windows - I can look at the Task Manager list of processes and see all this things taking a little bite of my memory and cpu time and I have no way of knowing which one is essential and which could easily be removed.

I especially hate applications which think it is ever so very important that they grab CPU time and bandwidth to look for updates - no matter what I am trying to do at the time.

(end rant mode)
John Kimball
Ranch Hand

Joined: Apr 13, 2009
Posts: 96
Ironically enough, Sun's Java distributions fall into that category.

Nitesh Kant

Joined: Feb 25, 2007
Posts: 1638

Moving to general computing forum ...

apigee, a better way to API!
Kees Jan Koster
JavaMonitor Support

Joined: Mar 31, 2009
Posts: 251
Dear Tommy,

If your app loses performance because of some other processes being present on the machine, I have a simple solution for you: spend € 50,- more on the processor and you get 10% more processor power. Now you have plenty of CPU to do your app *and* the update checking. All that for a few bucks.

In other words: what the hell are you worrying about? Based on what actual performance measurement have you come to this conclusion? How have you measured the overhead incurred by the background processes? And what actual percentages have you seen?

Java-monitor, JVM monitoring made easy <- right here on Java Ranch
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

For all we know, this app is going to run on a tiny machine duct-taped to a weather balloon. If someone tells you they need to get every ounce of power out of a machine, it doesn't make much sense to tell them to buy a bigger machine -- especially to tell them rudely.

Tommy, Linux is an excellent choice for small/embedded systems. You can install a bare-bones distribution and you can turn off everything you don't need (the suggestion to use Ubuntu Server is pretty funny. That's the last think you want to do.) Some distros -- Coyote Linux is one I'm familiar with -- still fit on a single floppy disk!

[Jess in Action][AskingGoodQuestions]
John Kimball
Ranch Hand

Joined: Apr 13, 2009
Posts: 96
YMMV, but the hardest hurdle for Linux newbies is getting up and running.
Ubuntu (including server) is surprisingly good in this respect.

Learning to disable daemon processes is far easier, by comparison.

That said, Coyote looks very promising as an easy-to-use distro.

Kees Jan Koster
JavaMonitor Support

Joined: Mar 31, 2009
Posts: 251
Dear All,

If I offended anyone I apologise. I was aiming to poke, not to stab.

My worry is that Tommy is investing time in tuning something that is no problem at all.

I second the choice for some form of free unix. Much more controllable and customisable.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

One of the best arguments for Linux is the "spending lots of time checking for viruses". At the moment, this isn't a problem with Linux.

Unfortunately, while Linux isn't crammed with stealth processes like "rundll32", the stock distros are pretty hefty these days and a lot of the services leverage off of other services, so you can't just run a "ps" and switch off everything you don't know what it's good for.

It might be worth investigating one of the lightweight OS's such as QNX unless it's a requirement that the OS in question be mainstream and/or "inexpensive". Possibly one of the Real-time operating systems.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Barebones operating system
It's not a secret anymore!