New to my blog? You may want to think about subscribing to be notified of new posts. Thanks for visiting!
This is an extract from the book I am writing called 'Living in the Cloud'. It is presented as a draft - comments and criticism are welcome.
Layers of Abstraction
If you are planning a holiday you are probably going to need a travel agent. Of course you could try organising that trip around Europe by yourself, booking the flights, accommodation, insurance, transport and activities and saving yourself the agent's fee. That is assuming you knew who to call, were able to get the best rates, allowed for travel times in different time zones and could speak each language fluently. Similarly, you could order your next meal at a restaurant by going out the back and talking directly to the chef. It might save you tipping the waiter but it may well be the last time you eat there. Next time you go to see someone at their office without an appointment, you could just walk in and ignore the receptionist, but that might get you thrown out of the building.
The point is, when you're dealing with complex systems, there is inevitably someone or something that acts as a host. In computers, the role of host is played by the operating system. If you want to be able to use a computer without a thorough working knowledge of binary and a background in electrical engineering, you'll probably want an operating system to do all the talking to the components and deal with all those billions of binary digits for you.
An operating system itself has many functions and different departments, but the most important is the kernel. The kernel of an operating system is like the CPU's chief of staff. Of all the seething mass of data flowing around and being received, it has to prioritise the decisions to be made by the busy CPU. It decides whose messages are urgent, who can wait and who are simply troublemakers. It is tasked with keeping the CPU on schedule and will not hesitate in forcibly bringing appointments to a close if they drag on too long or stray too far off topic.
The job of kernel became necessary as computers evolved to be the universal machines Alan Turing had envisioned. Just as a restaurant with only one customer does not need a waiter, computers that were built with only one application in mind had no need for an operating system. It gradually became clear however that just as an entertainment hall is more viable when it can be used for concerts, sports and conferences, computers would be more useful and much cheaper to produce if they could be used to perform many different tasks. However, such a move would require a versatile design and fairly clever management to succeed in practice.
To achieve greatest efficiency in management, most industries have a system of tiers, each with their own sets of policy and procedure. Each tier usually has a relationship with the level directly above and below it, and communication passes up and down through one tier at a time. The sales assistant in a department store may know what the CEO looks like but would be surprised and probably a little unsettled if they came to talk to him or her directly. Of course, we are talking about humans here, which means there are all sorts of emotional behaviours which come into play and invariably make a mockery of the tiered management system, frequently bringing its value into question. But for computers, living in a world of pure mathematics and free as it were of emotional attachments, the tiered management system makes sense.
The bottom tier is the hardware, upon which everything depends and without which nothing would work. Ultimately the hardware is commanded at the top tier by way of all the flashy graphics, menus and buttons we see which make up the software, but a lot goes on in between.
The second bottom tier directly supervises the hardware, each piece of which has its own unique set of rules and working conditions which vary between models and manufacturers. These very specific instructions which control each hardware component are called firmware. That's because it's between hardware and software. Get it? This is another example of why engineers are not known for their sense of humour.
We have already mentioned the kernel, which supervises how the tiers below spend their time and prioritises the processes that need to be done. These processes are like the different functions of the entertainment hall mentioned earlier - concerts, sports and conferences for example. The hall has to be rearranged for each, which takes time, so it makes sense to book as many of one type of event together as possible to minimise disruption and maximise availability. This sort of management is what the kernel concerns itself with, where the events are the various programs (also called applications or processes) the computer is running, such as word processor, internet browser, email and music jukebox software.
Another benefit of the tiered management system is that each of the tiers functions independently of the others and consequently can be modified or replaced independently of the others. A company can replace its board of directors without it directly affecting the frontline staff and vice versa. This is because the positions everybody in the company holds are abstract. Each position has its own requirements, but anyone with the appropriate ability can fill it. Even in the worst case scenario that a company's entire staff were lost in a disaster, the abstract nature of its management structure means those positions could eventually be refilled.
In computer science this idea is just as important, but management tiers are instead called layers of abstraction. The abstraction layer model demands certain hardware be present and that it be arranged in a particular way, but that hardware could be supplied by a variety of different manufacturers in a variety of different models. The kernel needs to be able to work with many different CPUs, just as each CPU needs to work with many different kernels.

When you consider the mind-boggling array of add-on devices used with computers such as printers, scanners, cameras, headphones, phones, modems, games controllers, graphics tablets, barcode readers and so on, it is unrealistic to expect the kernel to be able to instantly recognise and converse fluently with every piece of hardware it meets. Many of these devices are small computers in their own right. This has led to the need for a separate hardware abstraction layer within the kernel.
Like a diplomatic relationship between foreign countries, a deal was negotiated as follows: the kernel would provide a list of topics that could be discussed as well as acceptable requests that could be granted, while the hardware manufacturer would provide a list detailing which of these topics and requests it was interested in for the device in question. The information provided by the hardware manufacturer would then be used to 'drive' the relationship between the two parties. Hence this class of information is called the device drivers.
Device drivers, like trade and immigration controls, can have a significant effect on prosperity and stability. Few or no restrictions on trade can lead to a huge number of trading partners but little quality control. Tight controls can mean increased quality and scrutiny but may stifle interest. The way a kernel handles this and many other issues has a great bearing on the quality and appeal of different operating systems.
{ 0 comments… add one now }