Operating systems
The purpose and functionality of an operating system
A computer cannot function without an operating system unless it is an embedded system. An operating system is a collection or suite of programs that manages and controls the computer. It keeps the details of how this is done hidden from the user. The main functions performed by an operating system are:
- file management
- process management
- hardware management
- user interface management
Common operating systems include:
- Microsoft Windows
- macOS
- Linux
- Android
- iOS
File management
Computers store data on physical devices, such as hard disk drives. Users do not need to know how and where this data is stored physically, they just need a way of finding and managing that data. This is provided by the file management system.
All data is stored in files, within folders, within drives. The file management system does this by creating a virtual file structure of the physical components. It is a hierarchical A system of organising people or things in terms of a perceived importance. structure starting with the root directory, a bit like an upside-down tree. The file system also assigns metadata to each file including:
- date created
- date modified
- last date accessed
- last backup
- file creator user ID
- access permissions
- file size
There are several functions that users can perform on files, for example:
- create
- name/rename
- save
- copy
- move
- delete
Process management
All applications, including web browsers, word processors, spreadsheets and apps, are made up of computer programs. Multiprogramming enables several programs to run at the same time.
Each program is made up of program instructions. When some of these instructions are running, it is called a process. Since main memory is too small to run all the processes, the operating system uses multiprocessing to allocate use of the main memory and the CPU/processorCentral processing unit - the brain of the computer that processes program instructions. .
Multiprocessing can be used only when there is more than one processor in the system. This is common in most computer systems nowadays. That means that several processes can execute at the same time. A scheduler is used to time the different processes. Interfaces such as Task Manager in Windows let the user see what processes are running and delete them.
There are several different scheduling algorithms, which all have certain similarities:
- they all use a queue to hold waiting processes
- they all use the clock cycle to time the execution of processes
- they all switch between processes
First come, first serve (FCFS)
In this algorithm, processes run on a first come, first serveA scheduling algorithm where processes are executed in order. (FCFS) basis. It is based on a first in, first outA queue structure used in a computer to store data temporarily where the first item to join the queue is the first item to leave (FIFO) queue, where the processes arrive, are executed, then leave the queue in order. This is a slow algorithm because all the processes have to wait for the previous one to finish.
Round robin
round robinA scheduling algorithm that allocates a certain amount of time for each process to run before it is switched out temporarily. is a much more efficient algorithm. Each process is given a fixed amount of time, then it is switched out and sent to the back of the queue. The next process then has its turn, and so on.
Priority based
In a priority basedA scheduling algorithm where a priority is assigned to each process which then runs in order of priority. algorithm, each process is given a priority based on several things, including how much time it needs and how much memory it will use. A process with a higher priority will be executed before a process with a lower priority. This is ‘fairer’ than either FCFS or round robin. If there is more than one process with the same priority, then FCFS is employed as well.
Hardware management
The operating system manages input and output from hardware devices and the use of any resources needed by a process.
Input/output management
Data has to be transferred between input devices, the CPU and main memory, and output devices. Examples of input devices are keyboards, computer mice and microphones. Examples of output devices are monitors, speakers and printers. Some transfer software may already be included in the operating system. Otherwise, device drivers will need to be installed for each new device. Device drivers allow devices created by different manufacturers to communicate.
Resource management
When a process is running it may need to use resources such as printers, hard disk drives, memory and the processor. The operating system allocates the required resource to the processes that are currently running. Internally, the operating system ensures that any data and/or instructions in main memory do not conflict with each other, and allocates the memory that the process requires.
User interface management
Operating systems provide interfaces to users of the computer system, allowing them to communicate with the hardware. The user doesn’t need to know about the hardware, so the operating system uses virtualisation (zr6ct39) to give the user the impression that they are interacting directly with the hardware. The user sees a virtual machine giving access to logical devices. The operating system translates the user’s actions to match to the physical devices. In effect, the operating system uses abstraction to hide complexity from the user.
Users are granted different access rights to be able to perform tasks. In a networked system this would allow access to the data and applications they need and no more. Security features, such as user names and passwords, are included to protect the systems. The operating system can keep track of different users and what they are doing on the computer.
System administrators have special privileges to maintain the computer system. This may include being able to add users and give them access to different applications.
There are two main types of interface:
- graphic user interfact (GUI)
- command line interface/interpreter (CLI)
Graphical user interface
A GUI is familiar to most users of PCs and laptops. GUIs feature a desktop view where everything is displayed and use WIMPThe acronym for windows, icons, menus and pointers that describe the features of a graphical user interface. (windows, icons, menus and pointer) to describe the features of this interface. 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 onscreen pointer.
GUIs are powerful and easy to use but require a lot of processing power.
Command line interfaces
CLIs are text-based. Users control the computer by typing in commands.
CLIs require little processing power and are extremely powerful, but it can take longer to learn how to use a CLI than a GUI. Originally, most interfaces were CLIs. They still exist within modern operating systems, for example the command prompt app in Windows, and Terminal in macOS.
Other interface examples
Mobile user interfaces are similar in many ways to GUIs except that they respond to touch. Fingers are used to open apps and interact with them. Gestures such as swiping are used to scroll within documents. Pinching and stretching are used to resize images.
Mobile user interfaces are found on smartphones and tablets and are single-user operating systems, as opposed to multiple-user operating systems that allow different users to log on.
Voice user interfaces are becoming increasingly popular as a natural way of interacting with technology. They are used by voice device assistants. Mobile user interfaces can also respond to voice commands.
More guides on this topic
- Decomposition and abstraction - Edexcel
- Algorithms - Edexcel
- Further algorithms - Edexcel
- Truth tables - Edexcel
- Binary and data representation - Edexcel
- Programming languages - Edexcel
- Networks - Edexcel
- Network security and cybersecurity - Edexcel
- Encryption - Edexcel
- Environmental, ethical and legal concerns - Edexcel