Operating Systems Content from the guide to life, the universe and everything

Operating Systems

4 Conversations

An Operating System coordinates complex electrical circuits, like the ones you find in a computer, electronic gadget or mobile phone. So, if you don't have several thousand transistors to manage, the chances are you don't need an operating system.

An Operating System (OS) is a computer program that manages the use of resources of the device and, intriguingly, its companion programs that also run on that computer. Typically it looks after the scheduling, sharing and coordinating between these programs. Modern operating systems also generally make sure that the device also presents a pretty and useable interface to the world and to other devices that might be connected to the same networks.

The operating system must be matched to the circuitry of the hardware that it manages. It has to be written to flip the right switches of the circuits in the right order in the CPU and the attached peripherals (screens, keyboards, radio antennae, railway points etc). This is known, in the trade, as being 'in the language' of the device. Many operating systems are made to function for specific processor types but some famous ones can be easily adapted to run on anything.

Where Do I Find One and How Will I Know?

With very few exceptions, operating systems can be found on any sort of electronic device, including washing machines, personal computers, traffic light controllers, robotic arms in factories and mobile phones. They are not normally found on simple electrical devices such as hair dryers - but it would be foolish to be dogmatic.

If you find yourself working with an automated system that seems to continue doing things regardless of what you do, there is probably an operating system behind it. The telephone exchange is an example. You enter a sequence of digits into your phone and, via a mysterious path, someone in Peru starts to talk to you. Clearly there is a lot of automated activity between your phone and the phone of the person in Peru. The active programs that complete the call are not part of the operating system (these will vary between regulatory regions, phone companies and exchanges) but the logic that waits for you to start the call, detects signals on the incoming and outgoing wires in the exchanges, sets the voltages to reasonable levels and keeps the exchange ticking over when no one is making any calls: that is the operating system.

Pulling Itself up by Its Boot Straps

A system of wires, electrical switches (often transistors) and very fast refresh micro-batteries (memory), no matter how small or cleverly devised, is lifeless without electricity and when electricity is first powered through it, it is a mass of randomly directed switches and the micro-batteries are charged to random degrees. The art of starting a computer is to get the computer to start itself, to use its own logic circuits to set its switched logic circuits to something sensible and charge/discharge the memory to known voltage levels.

This is booting the system.

On powering up a device, the very first action is a power supply generated reset. Somewhere deep inside the device a small program runs on hardware that has its transistors set to a fixed logic pattern and the first thing it does is turn off all of the circuits to stop the power running through the system randomly. Next it finds every bit of memory1 and charges it from a random amount of electrical charge to the amount that is known as zero2.

Then this small, fixed program can load some predefined logical instructions and data into the processor, which starts to cycle through them. This logic finds out all of the peripheral bits and pieces connected to the device. Now the operating system can be loaded as if it were a normal program.

Given it is expensive (that is, it is a painstaking and slow task for large teams of expert staff) to get the logic right on an operating system3, it is sometimes easier to compose one operating system with modular logic that supports physical systems composed from matching modules - obviously with the prior agreement with the designers of the device modules. Then when a physical module is found on booting, the matching logic module is enabled in the operating system. That is, it can use the information found out about the hardware by the hardware and then operationally join all of the appropriate parts of the system together. For instance if the device has a screen and a keyboard (say as in a PC or mobile phone), then the operating system not only not only fires up the part of the systems that will translate the electrical signals generated when you press '3' on the keyboard to mean '3' to any programs that monitor the keyboard, but it will also link the keyboard and the screen modules so that when you press '3', '3' is sent to all of the appropriate programs and to the module of the operating system that runs the screen so that it can print '3' as well.

Single or Split Mind

Most computers are really fast - much faster than a person can type, a mobile phone network can send telephone voice data or a traffic light can change colours. The operating system can be so sophisticated that it can give every user and every program the impression that each of them completely controls the device and can see every event exactly as it happens at the same time.

The user doesn't care - as long as the operating system makes sure that the buttons they press immediately register on the display device (say, the readout on a modern washing machine), they don't mind how many other jobs happen in the background.

What Does It Look Like to Me

The part people are used to seeing of the operating system is the User Interface. On MS DOS this is the Command shell with the mysterious input prompt A:>_. On most systems you are presented with a GUI (Graphical User Interface) such as X-Windows on Unix/Linux, Windows (on Microsoft's systems), Aqua on Apple's MacOS, Series 60 on Nokia's Symbian operating system phones and the red/amber/green and flashing people lights on the computers that are housed in those small roadside boxes maintained by road departments next to traffic lights.

Many systems have a concept of users and they will require you to identify yourself as legitimate user of the system either with a username and password or by entering an unlock key sequence. Other systems identify users by a proximity sensor (solenoid metal detectors under roads, movement sensors for sophisticated building access control or track circuits for railway trains).

Nearly all systems give ordinary users a limited level of control over the operating system. Administrative users can do all sorts of things. What they can do depends on the device. Sometimes even administrative access is limited to prevent chaos (for instance, the operating systems that control railway signals won't allow points and signals to disagree). Other times it is possible to physically break the device with poorly chosen combinations of settings; for instance, by incorrectly setting the refresh rates on projector displays and televisions. The operating system normally has logic to prevent even administrators from doing things that are too stupid (even administrative users cannot normally override the core logic) but there are nearly always lots of contradictory settings for things that do require skilled experts to set. The operating system controls the electronics and makes things easy for programmers - it doesn't make people use their devices wisely.

Ordinary users are normally fairly protected and can only use applications that are set up for robust use. The banks' ATMs are very complex machines with detailed processes for electronic and paper auditing running all the time, but the user interface is a series of single button pushes, a simple set of screens and a device to push out your card, money and a receipt.

The Network is the ...

Most people think of the internet as part of their computer - having a personal computer at home without the internet is as silly as having the internet without a computer. Imagine a mobile phone without its network - the phone is really just the interface into the radio voice network.

Networks are actually quite complex and operating systems have extremely detailed logic to manage their network interfaces. Mobile phone radio networks may have thousands of handsets appearing and disappearing under each cell tower's control and each handset may be able to connect to dozens of towers' networks at any time. The operating system on the mobile phone must be able to adjust power outputs to make sure that a connection remains, even when the user walks into a radio shadow behind a building, moves between various towers' networks or travels through a tunnel at 120 miles an hour (all while the operating system is minimising power usage and tracking battery drain, a value which it constantly passes to the device's display logic). The application programs expect one and only one 'good enough' connection, regardless of what the radio world really looks like. The user just wants to make calls and text other users without the phone connection dropping out.

'Almost wired' networks such as Bluetooth near proximity radio are somewhat easier and wired/cable networks are much easier (but still not simple). If two devices connected to the same 'wire' send out an electronic message on the shared radio frequency or on the length of cable at the same time, then the electrical signals merge and create meaningless electrical noise rather than the sharp voltage peaks that typify a clear signal (on the wire or the aerial). So one operating system must back-off and let the other one go first - but how do two systems that already have demonstrated they struggle to coordinate sharing a wire coordinate this? The answer is that the operating system's logic has standard well-thought-out procedures for every occasion, and a well-behaved operating system implements these procedures exactly.

It is no accident that it takes at least a year of testing to introduce a new operating system onto a mobile phone network operator's network.

Embedded vs. Freestanding vs. Runs on Everything

Many operating systems are very tightly integrated with the device. This is often because the device itself is custom job - say in a hydraulic controller for a crane arm. By the time the central processor is connected to the hydraulic sensors and the cab control lines, it makes sense to write a new operating system for its specific job and put it directly onto the device along with any programs it needs to run. Every thing goes on the chip because the peripheral devices the operating system will have to worry about on the crane arm are the actual crane mechanics, rather than replacable external hard drives or varyingly large banks of memory!

Other times it makes sense to have an operating system that is developed independently to the device. The more complex the hardware, generally the more difficult (and more costly) it is to get the operating system logic right. Keeping the operating system separate allows both the device and operating system to be continuously developed for as long that that class of device is in service. IBM's personal computer was invented in the early 1980s and, although IBM no longer manufactures its personal computers, other companies have taken over the development and they will continue to do so for a while yet. This class of computer runs wide variety of independently developed operating systems such as Microsoft-DOS, Microsoft-Windows, Pick and various types of Unix including Linux.

Still again, sometimes developing the operating system takes on a life of its own. The system provides such a high degree of service to its programmers and users that it is cheaper to adapt it to new hardware than it is to invent a new operating system and train everyone anew. Unix is the classic example. It was written in 1974 to run on computers made by companies that disappeared years ago and 30 years later it is known as Linux, BSD, System V, Solaris, MacOS/Darwin among others. It runs on pretty much all hardware including mobile phones, Cray super-computers and it is used in embedded systems.

Big Operating Systems have Small Operating Systems on their Backs...

The notion that an operating system provides programmers and users a standard view of the single underlying electronic device has taken a new turn. Instead operating system designers have started to design operating systems that run on seperate multiple devices but that make each one look like a component of a single, albeit composite, underlying virtual device. If it is done well, with appropriate support in the devices' electronic logic, an operating system can run all of these components as a single system and programmers and users may never even realise this has happened.

This leads to aggregating computers into a single virtual computer. After all, what is the difference between a computer with lots of bits and pieces inside a single box, and a computer with lots of bits and pieces in many boxes? They definitely look different but there are advantages to hooking lots of cheap computers up together into, what is known as, a cluster. Firstly, it is slightly cheaper to build computers this way; and secondly, you can keep adding more cheap computers to extend the cluster if you want more power. All you need is a small operating system in each box to fool the real operating system that it is all one big box with lots of loosely coupled components.

The idea has a flip side in that sometimes a really big computer is cheaper to run than lots of small ones. This is because sometimes a really big computer is physically a single box that takes less floor space, has only one power transformer system for the entire system (as opposed to one system per cheap box)4 and is easier to keep track of and identify faults in (big boxes often have very advanced fault management systems). So you can put an operating system on the big computing device that slices and dices it up into two moderately-sized virtual devices, each with their own operating systems that believe they control a whole, real device. If you believe that computer hardware is not terribly reliable, this makes life much easier because if something blows up, you know exactly where to look. On the other hand, if something critical does blow up, then you have possibly lost access to all of the virtual systems with all of their operating systems and programs in one puff of smoke.

Where To, What Ho!

There have been more futures written for operating systems than for possibly any other part of the computing industry (except maybe mobile phones). A great design for an operating system can promote great hardware, for instance, Microsoft's peripheral support logic in its Disc Operating System (MS-DOS version 2.2) completely revolutionised how the hardware designers produced add-on hardware: Microsoft wrote a facility for every hardware module designer to write an operating system module that the computer's owner could graft into the core, running operating system as it booted. This users did, extending their computers with colour screens, fancy mice, odd looking keyboards, fully integrated photocopiers, cash register keypads and who knows what else (many are now so standard you wouldn't think of them as being innovations nor requiring special operating system extensions).

The laptop with its own battery has made the possibility of computers being 'always on' with 'going to sleep' possible. Traditionally, when the power stopped on an electronic device then it stopped and had to be restarted with a power on reset. Now most people expect to pick up where they left off5.

Mobile telephone data networks have made it possible for the operating system to let applications know exactly where the device is, which is great for labelling photos or looking for restaurant reviews.

Mobile data networks may enable another big change: the always there, always on network. No matter where you are, the device is always with you and always connected to the internet. The Symbian 'smart phone' operating system (used by Nokia Series 60 phones among others) and Research in Motion's Blackberry OS made this idea quite popular. Programs that were traditionally run on the local device and its operating system but which were limited by the capabilities of the device, are now accessible via the internet from computers that are permanently on and which are every bit as big as they need to be.

This means that very large data stores, maps, music libraries, socialiable chats, email, text editing, calculators, star charts, photograph albums, telephone messages and the answer to 'where on earth are am I' are always available, always in your pocket or hand. The actual device the user carries can be sized to be exactly as big as is needed to show the information. As far the user is concerned the operating system on the device is a transparent link to the systems on the cloud of computers attached to the radio waves. This means that the operating systems will become less useful to the sorts of programmers who write complex word processing programs and instead the operating system will represent a more coherent view of a much wider world of networks and data streams as well as providing some very good presentation tools to make it all so easy for the user.

1Memory is not just a big block of RAM on a set of memory chips - in most types of devices, memory is found in the main processors' core units, in all sorts of locations on the communications paths between the processors and the peripherals, on the peripherals themselves as well as in those big blocks known as RAM.2In electronics, zero is never represented by a nothing charge, instead it is represented by an amount of charge or a change from one charge level to another. The rule is, keep the power running and transmit information by the way the power flows rather than if it flows.3The level of detail can be mind boggling.4Electrical transformers and power supplies leak a lot of expensive and hot electrical energy.5In the very early days, computers used memory that was physically switched and didn't need to be reset when it restarted - it always picked up where it left off, unless it stopped working because something in the memory was already wrong. So in some ways, an 'always on' computer is returning to the behaviour of computers from the 1940s and 50s.

Bookmark on your Personal Space


Edited Entry

A306839

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry

Categorised In:


Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more