1.5.1 Operating Systems
In this lesson, you will learn the purpose and main functions of an operating system. You will explore how an operating system provides a user interface, manages memory and multitasking, controls peripheral devices using drivers, manages users and access rights, and organises files and folders.
Operating Systems
An operating system (OS) is system software that manages the hardware and resources of a computer and provides an environment in which applications can run. Almost all computing devices use an operating system, including desktop computers, laptops, smartphones, tablets and games consoles.
The operating system acts as an important link between the user, applications and hardware. Its main functions include providing a user interface, memory management and multitasking, peripheral device management and drivers, user management, and file management.
User Interface
The user interface (UI) allows the user to interact with the computer system and operating system. Through the user interface, users can open applications, manage files, change settings and give instructions to the computer. Two common types of user interface are the Graphical User Interface (GUI) and Command-Line Interface (CLI).
Graphical User Interface (GUI)
A GUI uses visual elements such as windows, icons, menus and buttons that users can select using a mouse, touchpad or touchscreen. Many desktop GUIs use a WIMP interface:
- Windows display applications and documents.
- Icons represent files, folders and applications.
- Menus provide lists of commands and options.
- A Pointer allows the user to select and interact with items on the screen.
Touchscreen devices can also allow users to interact directly with graphical elements using gestures such as tapping, swiping and pinching.
Command-Line Interface (CLI)
A CLI allows users to interact with the operating system by typing text commands. Users need to know the correct commands and syntax, but a CLI can provide experienced users with fast and precise control over the system.
Memory Management and Multitasking
Programs and the data they are currently using must be loaded into RAM before the CPU can process them. One role of the operating system is therefore to manage how RAM is used.
When an application starts, the operating system allocates an area of RAM for its instructions and data. Different applications are allocated different areas so that they do not overwrite or interfere with one another's data.
As programs run, data and instructions are transferred between RAM and the processor when they are needed. When an application is closed or no longer needs some of its allocated memory, the operating system makes that space available for other applications.
Modern computers often have several applications running at the same time. This is known as multitasking. The operating system manages multitasking by keeping the required programs in memory and sharing processor time between the different processes that need to run. The CPU switches rapidly between tasks, giving each one time to execute. This happens quickly enough that the applications appear to the user to be running at the same time.
If there is not enough available RAM, the operating system may also make use of virtual memory, as explored in Lesson 1.2.1 Primary Storage. However, virtual memory is slower than RAM because it uses secondary storage.
Peripheral Management and Drivers
A peripheral is a hardware device connected to a computer that is not part of the CPU. Examples include keyboards, mice, monitors, printers, speakers, webcams and external storage devices.
The operating system manages communication between the computer and these peripheral devices. Data may need to travel from an input device to the processor, or from the processor to an output or storage device, and this transfer must be controlled.
A device driver is software that allows the operating system to communicate correctly with a particular hardware device. Different devices can operate in different ways, so the driver acts as an intermediary between the operating system and the hardware. It translates instructions from the operating system into a form the device can understand and allows data from the device to be passed back to the computer.
For example, when a user sends a document to a printer, the operating system uses the printer driver to communicate the print instructions and data in a form that the printer can understand.
The operating system may also temporarily store data in a buffer while it is being transferred between devices. This is useful when two devices operate at different speeds. For example, print data can be held temporarily while the printer processes it at its own pace.
User Management
The operating system can manage multiple user accounts, allowing different people to use the same computer or network while having their own settings and permissions. When an account is created, the operating system can store information such as the user's username, password, personal settings and access rights.
Access rights determine which resources a user is allowed to use. For example, one user may be allowed to read a file but not edit or delete it, while an administrator may be allowed to install software or change system settings.
User management therefore helps protect the system by preventing ordinary users from accessing resources or performing actions for which they do not have permission. Accounts may also be secured using passwords or other authentication methods.
| User | Staff Files | Install Software | Change Settings |
|---|---|---|---|
| Student | No | No | No |
| Teacher | Yes | No | Limited |
| Administrator | Yes | Yes | Yes |
File Management
The operating system manages the files and folders stored on a computer. It provides a structured way for users to organise data and keeps track of where files are stored on secondary storage.
Files can be arranged into folders and subfolders, creating a hierarchical structure that makes information easier to organise and locate. The operating system allows users to perform common file-management tasks as shown in Table 2 below.
| Operation | Explanation |
|---|---|
| Naming | Assigning or changing the name of a file or folder so that it can be identified. |
| Creating | Creating a new file or folder in a chosen location. |
| Moving | Changing the location of a file or folder. |
| Copying | Creating another copy of a file in the same or a different location. |
| Deleting | Removing files or folders that are no longer required. |
| Saving | Writing new or changed data to secondary storage so that it can be retrieved later. |
The operating system also keeps track of information about each file, such as its name, type and storage location. When a user opens a file, the operating system can identify the appropriate application and locate the stored data so that it can be loaded.
On shared computers or networks, file management can also work with user access rights to control who is allowed to view, edit or delete particular files and folders.
