1.1 The Operating System

1.1 The Operating System

We use computers freely, but most of us never bother to know what’s inside the box. Why should we? After all, we also use TV and never care to find out how this idiot box manages to convert invisible radio waves to real-life colorful pictures. Yes, you can certainly use spreadsheets and word processors without knowing how these programs access the machine’s resources. As long as you continue to get all those reports and charts, do you really need to know anything else?

Then the inevitable happens. The great crash occurs, the machine refuses to boot. The expert tells you that the operating system has to be reloaded. You are taken in by surprise. You’ve heard of software, and you have used lots of them. But what is this thing called the operating system? Is it just another piece of software?

Relax, it is. But it’s not just any ordinary software that helps you write letters, but a special one – one that gives life to a machine. Every computer needs some basic intelligence to start with. Unlike mortals, a computer is not born with any. This intelligence is used to provide the essential services for programs that run under its auspices – like using the CPU, allocating memory and accessing devices like the hard disk for reading and writing files.

The computer provides yet another type of service, this for you – the user. You’ll always need to copy or delete a file, or create a directory to house files. You’ll need to know the people who are working in the network, or send a mail message to a friend. As a system administrator, you’ll also have to back up files. No word processor will do all this for you, neither will your web browser. All this belongs rightly to the domain of what is known as the operating system.

So, what is an operating system? An operating system is the software that manages the computer’s hardware and provides a convenient and safe environment for running programs. It acts as an interface between programs and the hardware resources that these programs access (like memory, hard disk and printer). It is loaded into memory when a computer is booted and remains active as long as the machine is up.

To grasp the key features of an operating system, let’s consider the management tasks it has to perform when we run a program. These operations also depend on the operating system we are using, but the following actions are common to most systems:

  The operating system allocates memory for the program and loads the program to the allocated memory.

  It also loads the CPU registers with control information related to the program. The registers maintain the memory locations where each segment of a program is stored.

  The instructions provided in the program are executed by the CPU. The operating system keeps track of the instruction that was last executed. This enables it to resume a program if it had to be taken out of the CPU before it completed execution.

  If the program needs to access the hardware, it makes a call to the operating system rather than attempt to do the job itself. For instance, if the program needs to read a file on disk, the operating system directs the disk controller to open the file and make the data available to the program.

  After the program has completed execution, the operating system cleans up the memory and registers and makes them available for the next program.

Modern operating systems are multi programming, i.e. they allow multiple programs to be in memory. However, on computers with a single CPU, only one program can run at any instant. Rather than allow a single program to run to completion without interruption, an operating system generally allows a program to run for a small instant of time, save its current state and then load the next program in the queue. The operating system creates a process for each program and then control the switching of these processes.

There have been lots of operating systems in the past, one at least from each hardware vendor. They all contributed in their own way to the chaotic situation that made programs written on one machine totally incapable of running on another. Vendors required consumers to purchase expensive proprietary hardware and software if two dissimilar machines needed to talk to each other. We also had DOS and Windows (in all its manifestations) on our desktop computers providing us with a cheaper and user-friendly way of computing.

Comments

Popular Posts

2.2.3 Drawing filled triangles | JAVA 3D Programming | Chapter 2

3.1.4 Java 2 development environment (optional) | JAVA 3D Programming | Chapter 3

4.7 Immediate mode vs. retained mode vs. mixed mode

4.4 Elements of scenegraph design | JAVA 3D Programming | Chapter 4

What is Java 3D and is it for me? | Chapter 1