Functions of operating systems
An operating system is a collection (or suite) of programs that manages and controls the computer. Operating systems have many functions:
- controlling hardwareThe physical parts of a computer system, eg a graphics card, hard disk drive or CD drive. components
- providing a platform for software to run on
- providing a user interface
- managing processes
- managing the computer's memory
- managing input and output devices
- managing applications
- managing security
Example operating systems include:
- Microsoft Windows
- Apple OS X
- Linux
- Android
- IOS
User interfaces
A user interface is a program, or suite of programs that allows a user to interact with a computer. There are three types of interface to be considered:
- graphical user interface (GUI) - sometimes known as WIMP (Windows, Icons, Menus, Pointers) interface
- mobile user interface (Mobile UI)
- command line interface (CLI)
A graphical user interface is familiar to most users of PCs and laptops. GUIs feature a desktop where everything is displayed. Applications run in Windows, and all objects (apps, hardware and files) are represented by icons. Application features are accessible through the use of menus. Users interact with the interface by using a mouse and on-screen pointer.
GUIs are powerful and easy to use, but require a lot of processing power.
Mobile UIs are similar in many ways to GUIs, except that they respond to touch. Fingers are used to open programs and interact with them. Gestures such as swiping are used to scroll within documents. Pinching and stretching are used to re-size images.
Mobile UIs are found on smartphones and tablets.
Command line interfaces are text-based. Users control the computer by typing in commands.
CLIs require little processing power and are extremely powerful, but are difficult to use. Originally most interfaces were CLIs, and they still exist within modern operating systems, for example the command prompt app in Windows, and Terminal in OS X.
Processor management
Multitasking means to be able to run more than one program simultaneously. These programs perform processes. In the past, computers with CLIs were unable to multitask - the operating systems of the day only allowed one program to run at a time.
Modern operating systems are multitasking in that they allow several programs to run side-by-side. It is not uncommon for a user to be streaming music while entering text into a word processor, or streaming a video while making a backup of files.
Multitasking is possible only if:
- the operating system can support multitasking
- the computer has enough memory to hold more than one program in primary memory at the same time
Memory management
Computer memory must be managed to ensure that:
- more than one program can run at the same time
- more than one document can be opened at the same time
One method of memory management is known as paging. Memory is broken up into fixed-size blocks, known as pages.
Different operating systems allocate their own size to pages. For example, memory pages in modern operating systems are typically 4 kilobytes (KB) in size.
When a program is run, it is loaded into memory. The operating system determines how much memory the program requires, and allocates enough pages to hold it and its documents. When the program is closed, the allocated pages are freed up for use by other programs.
The pages a program occupies may or may not be contiguous, but this does not matter. The operating system knows what each page occupies and fetches the data held in them when needed.
Consider this example. Program A requires two pages. It is allocated pages 0 and 1. Program B requires three pages. It is allocated pages 2, 3 and 4.
Program A now closes, and Program C now runs. Program C requires three pages. Pages 0 and 1 are now free, so Program C is allocated pages 0, 1 and 5.
Input/output devices management
Input and output devices, which are also known as peripherals, are hardware devices connected to a computer, such as a screen, printer, keyboard or camera.
To operate a peripheral, the operating system uses a program called a device driver. Device drivers contain instructions on how to control a device. Each connected device has its own driver.
Using device drivers brings two advantages:
- any device can be used with the operating system, as long as a driver is available for it
- drivers can be updated, usually to give better performance or to remove a bug
Applications management
Application programs and hardware can communicate through an interface provided by the operating system. This is known as the application programs interface (API).
The applications manager allocates memory space and determines time needed by a processor for an application to run.
Security management
Operating systems also manage security. They allow:
- individual users to be created and deleted
- access levels to be given to users, such as administrator rights or standard user rights
- auditing (keeping a log) of files a user creates, accesses, edits and deletes