Fog Creek Software
Discussion Board

Server Operating System

I'd like to run internet server application software on one or more machines dedicated to running that software. Some vague thoughts about the OS:

* Should provide stated advantages over other OSes
* Should let my application be sovereign (e.g. use the CPU efficiently, run in ring 0 on Intel)
* Should be 32-bit at least
* Should drive the following hardware: local disk[s] (not only NAS) with efficient file/disk drivers; network interface card[s]; 4 GB address RAM at least (not 16-bit); one and/more more than one CPU
* Criteria: first, reliability (for 24-by-almost-7 service) and trustedness (e.g. no vulnerable daemons); second, pedal-to-the-metal performance (to handle as many transactions with as little hardware on as few application machines as possible); third, run on one or more than one type of off-the-shelf hardware (for example something Intel-like, or Sun), with available 32-bit device drivers for network and local disk - and run on telecom hardware e.g. as described in ; fourth, be affordable for development; fifth, be zero maintenance
* OS services: start program on boot, owning all remaining RAM; access network and disk; access hardware (e.g. system clock); install interrupt handlers or DPCs (e.g. timer tick, and I/O completion); e.g. like DOS but 32 bit API to disk and to network; multithreading (cooperative realtime, or preemptive soft-realtime); file system (perhaps with a standard disk layout), whose API exposes asynch I/O ... and/or whose API is SQL; heap manager (not garbage-collecting) to support file and network drivers and thread manager; TCP/IP stack (sockets API)
* Optional (not required) extras: built-in run-time monitor; http, ftp, telnet etc server daemons
* A GUI is not required - the GUI-less server application responds to IP over the network
* Do today's BIOS provide some of these OS-like services? For example my laptop can boot from CD.

The above is not necessarily MS NT. A specific unix or embedded OS? Or run as a priviledged kernel device driver in a general-purpose OS such as NT, Linux, Solaris? What about a SQL DB on the local disk, memory-resident SQL, and up to 64-bit of RAM space, or just a client driver to a SQL DB running on a remote machine? Assume I'm a programmer with server application software written in C/C++ currently processing gigabytes of data.

Various results are returned searching 32+bit+bios+api from google.

Christopher Wells
Thursday, August 22, 2002

It really sounds like you want a RTOS, not a traditional server OS. Especially with that "run in ring 0" requirement.

VxWorks is the 800 pound gorilla in that space, and it runs on just about everything. Costs a small fortune, though.

I've heard some very good things about QNX, but never used it.

Chris Tavares
Thursday, August 22, 2002

QNX would be a straightforward OS for it.
FlexOS if you can find it now and its an Intel based small device.

Simon Lucy
Thursday, August 22, 2002

I'm not sure VxWorks can handle SMP. QNX does I believe.

Just me (Sir to you)
Thursday, August 22, 2002


just out of curiosity. May we enquire what the application will be? Since you frame your question in OS feature terms as opposed to application requirements, it does not give a clue as to what it might be.

Just me (Sir to you)
Thursday, August 22, 2002

Well QNX is Great and it offers alot more...
We use to have a automation systeme running PCP Virgo on a QNX... We stop using it for Modicon Qutantum's and Windows NT with Intouch...

But i working on a Open Source deal to make a Linux PLC... in C, For my part i'm going to POSIX to hole thing and make it run on a QNX.. cause its a REAL  real time Operating system... i like it alot.

Thursday, August 22, 2002

Windows 2000 Server?

What in that list disqualifies W2K? Just curious.

Luke Duff
Thursday, August 22, 2002

What disqualifes Win2K Server?

* Lets his app run in ring 0. Win2K runs apps in ring 3
* Runs on more than one off-the-shelf hardware platform. NT once did, but they dropped all but Intel support for 2000.
* No vulnerable daemons. It would be a step up for Win2K to have a single invulnerable daemon, much less all of them invulnerable.

I don't know of *any* OS that meets all the requirements he listed.

Troy King
Thursday, August 22, 2002

Why must your application run in ring 0? Is it directly accessing hardware resources? Perhaps a better design would be to pair your userland application with a custom device driver for your "ring 0 work". Running your entire application within the kernel space while wanting to access a SQL DB seems a rather odd design decision..

Besides that, Linux is an obvious, flexible, and affordable choice.

Zwarm Monkey
Thursday, August 22, 2002

What you want is LynxOS.  It is a fully protected mode POSIX conformant hard real-time operating system.  It is the most elegant operating system I've ever worked with:

1. Hard real-time performance across user mode applications.  This eliminates any need to be running at ring-0 (kernel mode). 

2. One of the beauties of this OS, is the low cost (CPU cycles) of switching from user to kernel mode (system call trap, context switch).  The OS maintains a user mode stack and kernel stack for each thread.  Therefore, the kernel is completely re-entrant.  This eliminates the entire notion of having what should be a user mode process running in kernel space.

3. Hard real-time performance.  This is an OS which is designed for medical systems, avionics (used heavily at Rockwell, Thomson CSF, and many others).  If you give a thread a priority, it is guaranteed to run when no other thread above that priority is running. 

Its use of blocking objects (semaphores, etc.) span across the user/kernel mode boundary.  This enables the kernel to truly honor all thread priorities and to properly priority invert threads of low priority which may be blocking higher priority threads.

In has an elegantly simple scheduler which guarantees (with a number) that your thread will run within so many clock cycles of "ready" (assuming its the high priority thread).

4. Tested against strict POSIX conformance (more than just compliance).  No need to learn something new.  Systems calls behave exactly as expected.

Nat Ersoz
Thursday, August 22, 2002

It seems like you are going out of your way to optimize things that are actually inconsequential to performance, and possibly cutting corners as far as reliability is concerned.  Things such as the ring-0 requirement provide absolutely no performance benefit and will virtually guarantee that should something unexpected happen in your application (a disk write error, for example), your entire system will unrecoverably crash.  Your time would be much analyzing your choice of SQL DB vendor, setting up your DB schema, and optimizing your application than worrying about these trivia.

In short, by the time you shell out money for the expensive OS, got the engineers up over the learning curve of the new OS, ported and then maintained your application on the new OS, you might as well have just thrown more hardware at the problem and solved your performance problems that way.  Hardware's cheap these days. 

Remember the KISS principle.  After all, take a look at Google.  When they designed the number one search engine in use today, what did they use?  Linux on plain old off-the-shelf PCs.  Low tech is often the right way to go.

Friday, August 23, 2002

I seems to be that some of the posts misunderstood the 2nd citieria bullet.
The citeria, I believe, refers to the OS not the application.
The OS should use the CPU efficiently.
The OS should run in ring 0 on Intel.

BTW You can run an application in ring 0 in Win2K.
Common examples are drivers, but there are others.
I've seen an http server that ran as a driver.
It didnt seem worth it to me, but I think MS does some kernelmode in IIS6.

Realtime on 2K has been done by third parties.

'course there no reason not to use BSD either...


Saturday, August 24, 2002


> just out of curiosity. May we enquire what the application will be?

I won't be specific - any of a range of applications, in general any network service: internet and telecom servers and gateways. There are many network applications beyond serving http and files - for example about 3000 registered and well known port numbers in each for a different protocol - and telecom protocols (wireless, etc) and gateways.

> Since you frame your question in OS feature terms as opposed to application requirements, it does not give a clue as to what it might be.

My NDA thanks me for that.

Briefly, some applications: user and machine authentication; billing transactions (e.g. per-call); roaming, directory and routing; IVR; document and media stream processing.

All of these applications have some requirements in common, as follows.


First, the customer for network services (Voice over IP for example) can be anyone, who owns or uses a network. I restrict my question to customers who will dedicate one or more machine[s] to running the service - telecom carriers and ISPs and corporations. Sharing the machine with other tasks is not a requirement.

Now the application requirements:

1) Reliable - if e.g. a network's authentication service goes down, then the network is down. For all applications, nothing is more important than the application running almost continuously: MTBF and MTTR (should run unattended for 24 hours for 7 days, and recover asap after an outage).

2) Scaleable - telecom carriers handle 1000s and 1000s of calls etc.

That was it - there are only two application requirements.

Re 'scaleable', it means three things:

1) Predictable on one machine when heavily loaded - The first face of scaleable is whether the application can 'scale' to the extent that it runs successfully on its own machine. The customer runs ever increasing traffic on one precious machine, and is reluctant to buy and administer a second machine until after the first is fully utilised. When the machine is running continuously at full utilization then it must schedule its tasks carefully - if the application has 30 thread classes servicing 7 types of client, then what Nat said about scheduling in LynxOS sounds like a welcome relief. It must also behave predictably when over-loaded: shed load, reroute traffic, queue jobs for later, or flow control (throttle) the traffic.

2) Distributable to run on more than one machine - You don't want to sell just one. There is more traffic than one machine can handle; you need different machines in different locations; the machines must intercommunicate and be administered centrally - these are axioms of network service applications.

3) Low cost of hardware per transaction - how much or preferably how little hardware does it take to handle a given traffic volume? This is so important: if you're going to deploy a new telecom application, by putting a dedicated server machine (cluster) in every city in a country, then it matters how much that machine costs. Similarly, when you dedicate any machine to one application.

Hardware requirements:

1) Multiple CPU - some applications such as image, stream, and document processing are CPU-intensive, and therefore benefit from being run on multi-CPU machines.

2) Relatively slow CPU - when the customer buys rack-mounted systems at $?0K each they do not want to replace them one year later; 2 GHz may be this year's processor, but the expensive machines they bought two years ago are dual 600 Mhz. Also, perhaps low-power CPUs are slower, as are cheaper CPUs.

3) Local disk - at a minimum a local disk is needed for the application's output log files. It may be needed too for storing an application's documents and media files.

4) SQL - applications need at least structured input of their configuration data, by reading from SQL, XML, INI, REG, SNMP, NDS, LDAP ... Some applications also write structured output (e.g. database updates) as they run ... or, log files are written which are loaded into a database later.

Prime directive:

The need for CPU efficiency follows directly, from reliability (some of the protocols are real-time), and from hardware cost (scaleability).

Christopher Wells
Monday, August 26, 2002


> It really sounds like you want a RTOS, not a traditional server OS.

Maybe, sometimes, may be. Most applications can run on Solaris or NT ... call setup protocols tolerate delays of a second or more. But these aren't light-weight OSes. A light-weight OS could improve the throughput. Many of the protocols are UDP-based. How are file systems on a RTOS?

> VxWorks, QnX, LynxOS

All these are listed as ACE platforms in

> It would be a step up for Win2K to have a single invulnerable daemon


Perhaps there should be no other running daemon at all, competing for CPU: only the application itself and a built-in network monitor agent.

> I don't know of *any* OS that meets all the requirements he listed.

My listing "asynchronous file API" as a requirement was speculative, possibly wrong; you people are saying to use POSIX all the way. Can anyone recommend where I can find more information, comparing OSes and about each OS?

> Why must your application run in ring 0?

It needn't, but it might as well. A protected system is of limited use when there's one application running and it's not allowed to crash anyway.

> Is it directly accessing hardware resources?

No; I'd be happy to use APIs to access hardware. I do like to be notified on I/O event completion though ... you can do that using sockets, but not (sfaik) using the POSIX file API.

> What you want is LynxOS.

That's a nice description you gave.

> Things such as the ring-0 requirement provide absolutely no performance benefit and will virtually guarantee that should something unexpected happen in your application (a disk write error, for example), your entire system will unrecoverably crash.

I don't want to write file system and disk device drivers. Also it takes extra oomph to lauch a separate task for each job, and to communicate between tasks, so an application tends to get coded as a single multi-threaded monolithic long-lived task anyway (and so perhaps doesn't need a multi-tasking OS).

> got the engineers up over the learning curve of the new OS

I've done software for proprietary telecom hardware, DOS, Win31, Win32, NLM, and Solaris. The less OS in the end, the better perhaps. <g> I was wondering what OS I would choose, to run a dedicated application on general-purpose hardware.

Christopher Wells
Monday, August 26, 2002


If you are dead set on kernel mode app, cross your heart & hope to die set on it, then VxWorks is what you want.

1. Its a well known entity in embedded space.
2. It was designed to be used this way - in fact it has no other way.
3. It is debuggable and profilable as a kernel mode app, whereas most other OS's are difficult to debug in kernel space.  WindRiver has some pretty cool tools for profiling your application.

I've been happy to move away from flat memory model OS's like VxWorks (OS/Open, pSOS, HeliOS).  They offer no security for untrusted users and applications.  You will have to write many things you commonly take for granted yourself - like a bootloader perhaps - depending on the hardware platform. 

Nat Ersoz
Monday, August 26, 2002

*  Recent Topics

*  Fog Creek Home