Larry Osterman's WebLog

Confessions of an Old Fogey
Blog - Title

The purpose of an operating system, redux

The purpose of an operating system, redux

  • Comments 46
Something changed in the stress mix last week, and I've been swamped with stress failures, that's what caused the lack of posts last week.  But I've spent a fair amount of time while driving into work thinking about my last post (on the purpose of an operating system).  I've not actually read most of the comments (I've really been busy), so if I'm echoing comments made on the other post, forgive me for poaching your ideas, it really is a coincidence.  I'm a little surprised it's taken me this long to have this idea gel in it's current form - it's blindingly obvious, but I never put the pieces together in this way before.

I still stand by my original premise.  The purpose of an operating system is to shield the application from the hardware.

But the thing that you purchase in the store (or buy with your new computer, or download from RedHat) ISN'T an operating system.  It's a platform.  

And a platform does more than just isolate the user from the hardware, a platform is something on which you build applications.  This is a key distinction that it seems many people have a really hard time making.

Let me take Linux as an example, even though I'm far from a Linux expert.  The Linux operating system exists to isolate the user from the hardware.  It hosts drivers and presents a fundamental API layer on which to build systems.  But someone who receiving a machine with just copy of Linux would be rather upset, because it's not really very useful.  What makes Linux useful is that it's a platform on which to build applications.  In the FOSS community, the "platform" is called a "distribution", it contains a set of tools (Apache, Perl, etc).  Those tools make up the platform on which you write applications.  Btw, RMS has been saying this for years now in insisting that people call the "OS" known as Linux "GNU/Linux" - he's explicitly making the differentiation between Linux the operating system and GNU/Linux the platform.

 

Similarly, Windows isn't an operating system.  Windows is a platform.  Nowadays, the Windows platform runs on the NT operating system, in previous years, the Windows platform ran on the Windows VXD operating system, and before that it ran on the MS-DOS operating system.  OSX is also a platform, it runs on an operating system that is (I believe) a derivative of the Mach OS, running with a BSD personality layer (I may be wrong on this, I'm not enough of an OSX expert to know the subtleties of its implementation).

For convenience sake, we refer to the Windows platform as an operating system, just like people refer to OSX or Linux as operating systems, it's simply easier to present it that way to users. 

If you make the paradigm shift to considering the "operating system" as an operating system plus a development platform, it makes a heck of a lot more sense why the platform contains things like an HTML renderer, a sockets layer, a TCP/IP stack, an HTTP server, a directory service, a network filesystem, etc.  These aren't things that shield an application from the hardware, but they ARE things that provide value to applications that want to run on that platform. 

As an easy example, consider an application like the game Neverwinter Nights.  Because the developers of Neverwinter Knights knew that there was an HTML renderer built-into the platform, it meant that they could leverage that renderer in their launcher application (or their update application, I forget which of them used the MSHTML control).  Because they knew that the platform contained a multimedia stack with WAV file rendering, they didn't have to build in a WAV renderer into the game.  Because they knew the platform had support built-in for video rendering, they didn't have to include a video renderer.  They might have had to include a video codec along with their application, because the platform didn't necessarily include that, but it's orders of magnitude easier to write (or license) a video codec than it is to write or license an entire multimedia pipeline.

A rich platform means that applications can depend on that platform, which, in turn makes the platform more attractive to the applications.  Everything that the platform does that an application doesn't have to do is one less thing an application needs to worry about.  Of course, the challenge when enhancing the platform is to ensure that the platform provides the right level of capabilities, and the right ease of use for those capabilities, otherwise applications won't use the platform's implementation, but will chose to roll their own.