Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Why not use a RTOS with microkernel architecture for web servers? The scheduler is deterministic and all requests will be handled quickly leading to faster response time? It's easy to extend an OS based on microkernel architecture, since everything is like a client-server communication via message passing. Also, the server will be very light weight and requires less resources. Say that you are developing the web service using C++. I am thinking about QNX for the OS. Is it a bad idea, or it does not matter?

share|improve this question
    
Why do you want an RTOS? Also, hard or soft real-time? A hard RTOS would be very hard for a micro-kernel because of its async nature. –  tjameson May 14 '13 at 6:43

3 Answers 3

up vote 6 down vote accepted

The scheduler is deterministic and all requests will be handled quickly leading to faster response time?

Deterministic does not imply faster. An RTOS schedules guarantees that all requests will be served in some given time T, but a best effort scheduler may provide better average performance with the downside that some requests take a lot longer than T to serve.

share|improve this answer
2  
+1: real-time guarantees come at a cost! Usually that cost is in absolute throughput (and development time!) –  Joachim Sauer May 14 '13 at 7:41

A direct answer to your question: it doesn't matter. Most RTOS come with libraries that implement web servers.

But I guess a misconception in your question:

Realtime does not mean faster.

Realtime means that the time of the outcome is as much important as its value.

For example, a video decoder must deliver video frames at the exact time they are expected. It is better for the user experience not to deliver a late frame than delaying the whole movie (and desynchronizing image and sound).

As a side note, you may notice that many realtime problems are solved with high performance instead of realtime OSes.

share|improve this answer

Because it will not make much difference!

Modern *nix and windows server OSes were designed to handle large concurrent workloads, and, anyway web serving is done by specialist applications such as Apache, ISS etc. which make very few demands on the OS apart from threading, network IO and file IO.

Its hard to see what a micro-kernal OS would bring, the scheduling algorithms are different, RTOS is optimized towards the predictable response times required by a real time systems, *nixes and windows are optimized for overall throughput, which, would seem an altogether better bet for a web server.

Add in the years of experience, tooling and tuning that have gone into web servers running on the mainstream OSes and its hard to see what gains you would make.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.