Operating System Features

User Interface - GUI

The user interface is the way in which we interact with computer hardware. We are all familiar with the way a PC works: click icons with the mouse, scrolling up and down pages, typing into forms etc. This is called a WIMP user interface. WIMP stands for Windows, Icons, Menus and Pointers.

Mobile phones and tablet PCs have a slightly different user interface that allows you to move things with your fingers and can sense when you tip the device. Phones have buttons down the side that perform specific functions such as recording sound or turning on a camera.

Some computer systems are embedded into everyday machines such as cars and central heating controls. Users interact with these in very different ways. The operating systems have to provide appropriate ways for the user to interact with these as well.

Some computers have a command-line interface; no mouse or menus just a text prompt where the user types a command. On a PC we sometimes need a simple and direct interface with the hardware so within MS Windows we can use the Command Prompt, which is an example of a command line interface, on a Mac OS X we can use terminal and the same interface is available for Linux based systems.

Image showing an OS X terminal Image of windows dmin command prompt

Whatever method is used for the user to communicate with a computer or computerised device, it is the operating system that provides these features.

When designing a user interface it is important to make things clear and easy to use, there should also be feedback for the user so they can determine if the system is responding in the way they expect.

Multi-tasking

A modern computer is running may programs at once, it is multi-tasking. A user may have several documents open as well as various websites. The operating system will also be running lots of background tasks just to manage the computer itself.

A process is what we call a program when it's running in main memory.

A processor can only execute one instruction at a time (assumes single core processor). The processes are taking it in turns using the processor to execute instructions but because it happens so quickly it looks like they are all happening at the same time. The operating system has to manage all of these programs to make sure each one gets enough processor time. Some programs are clearly more urgent or important than others so there are priorities to manage as well. A program that deals with a hardware error will take priority over a word processing package trying to make text bold! While one program is being executed by the processor, other programs wait in main memory.

Memory Management

When a program is running it must be in the computer’s main memory. The main memory has a finite size. The operating system must manage where in memory the programs will go. When you start up a program on the computer, the operating system copies it from the disk into main memory and gives the processor the address (location) of where it starts. The processor can then fetch, decode and execute each instruction in turn.

Image of the memory managment process in s typical OS

As the program runs it will also use data. In modern computers the programs and the data they use are stored in the same main memory. When a program runs, the variable declarations at the start will set up locations in memory, allocating appropriate space, based on the data types. For example, a variable that has the data type “integer” takes up two bytes in memory, whereas a string variable may be allocated 255 bytes. The memory management part of the operating system will need to manage space used by the programs in this way.

If a data file is accessed, data from that too must be brought into main memory. The operating system tracks where programs and data are stored using addresses. Each location in memory has a unique numerical address. (In assembly language you use these and normally refer to them in hex because human being as are not very good with long sequences of binary!).

The operating system tracks where programs and data are at any time to make efficient use of the space in memory and to make sure nothing gets overwritten by something else. As a program is finished it can be removed from memory and as new ones are run they will be loaded into memory.

Peripheral management

Peripherals are any computer hardware components that are not part of the CPU. This includes input devices, output devices and storage. For some of these the term peripheral makes sense; the keyboard and monitor are outside the main computer casing but storage is not as obvious. Although a hard disk is usually inside the computer casing, it is still considered a peripheral as it is outside the CPU (processor & main memory). Portable hard disks, memory sticks and CDs are also storage devices but these are more obviously peripheral to the main system as they are outside of the computer casing.

A function of the operating system is to manage these devices. Writing to storage or an output device is much slower than moving data around in the CPU. The operating system will use buffers (queues) to make sure that data is not lost. Reading from storage and getting data from input devices is also slow. When the processor needs input from a user (waiting for them to click “OK” perhaps), the operating system may allow other programs to use the processor. Imagine how you use your own computer. You might be typing an essay while listening to music, while downloading an album from the internet and real-time messaging a friend. All of this at the same time! The operating system manages all of this.

Image showing buffer between system and storage device