Learn
A1.3.2 | FUNCTIONS OF AN OPERATING SYSTEM
01 | WHAT HAPPENS WHILE YOU WORK?
You open a browser, play music and save a report. A printer job waits in a queue, a network connection receives data, and a background service checks for updates. You see a few windows, but the computer is coordinating many activities.
The operating system carries out several connected functions to keep that work organised. It manages resources, supplies services and enforces rules so that one activity does not simply take over the whole machine.
This lesson covers the nine functions named in the specification: memory management, file system, device management, scheduling, security, accounting, graphical user interface, virtualization and networking.
Learn what each function does and connect it to an example. A list of names alone does not describe how the OS supports the system.
02 | MEMORY MANAGEMENT: A WORKSPACE FOR EACH PROCESS
A program stored on an SSD is not the same thing as a running program. When it runs, its process needs working memory for instructions, variables and other data. Several processes need memory at the same time.
The OS tracks available memory, manages allocations and reclaims resources when they are no longer needed. Together with hardware support, it also protects process address spaces so that one ordinary process cannot freely overwrite another’s memory.
An address space is the set of memory addresses a process can use. In a virtual-memory system, these addresses are mapped to physical memory. Programs can work with their own address spaces without knowing the physical location of every byte.
Virtual memory is more than “using the SSD as RAM”. Some systems can move pages between RAM and backing storage when needed. Accessing a page that must be brought back from storage is much slower than accessing a page already in RAM, so heavy paging can reduce responsiveness.
For example, opening several large applications increases memory demand. The OS manages their allocations and mappings; it cannot turn a small amount of physical RAM into unlimited fast memory.
03 | TRY ALLOCATING AND RECLAIMING MEMORY
This simplified model has 16 equal memory units. Three are reserved for OS work, and four are initially allocated to the browser. Start or close the other example processes and watch the available capacity change.
The display groups units by owner for readability. It does not model real addresses, contiguous allocation, virtual-memory mappings, caches or paging. An application’s real memory use also changes over time. The model illustrates allocation, capacity limits and reclamation.
Try starting the editor and then the game. If the request cannot fit, close a process to reclaim its allocation and try again.
04 | FILE SYSTEM: ORGANISE PERSISTENT DATA
A document should still be available after you close the editor and restart the computer. A file system organises data on storage into files and directories and maintains information needed to locate and manage them.
The OS provides operations such as creating, opening, reading, writing, renaming and deleting files. File-system metadata can include names, sizes, locations, timestamps and access information, depending on the file system.
When an editor saves a report, the application decides how its document is encoded. OS file services manage the named file and underlying storage operations. The OS does not have to understand the meaning of every paragraph to store its bytes.
File management and memory management are different. RAM supplies working space; a saved file provides persistent storage. A write may be buffered or cached before reaching the physical device, and saving a file is not the same as creating a separate backup.
05 | DEVICE MANAGEMENT: CONTROL ACCESS TO PERIPHERALS
A keyboard, printer, storage controller and network adapter each have their own behaviour. The OS coordinates input/output, tracks device status and uses suitable device drivers to communicate with supported hardware.
A driver is software, not the device itself. It handles device-specific interactions so applications can use higher-level services rather than implement every hardware protocol themselves.
A buffer temporarily holds data while it is transferred or processed. For example, data can arrive from a device at a different rate from the rate at which an application consumes it. Buffering helps handle that mismatch.
A print service can spool jobs: store them in a queue, often on storage, for the printer to process. Several applications can submit jobs without all attempting to send competing page data at once. A job being queued does not mean its pages have already printed.
If the printer runs out of paper, device status and error reporting help the system inform the user. The OS cannot physically add the paper, but it can manage the waiting work and report the problem.
06 | SCHEDULING: DECIDE WHICH RUNNABLE WORK GETS CPU TIME
A process needs opportunities for its instructions to execute. A scheduler selects runnable work for processor cores according to the system’s scheduling policy. In many systems the scheduled unit is a thread within a process.
On one core, tasks can take turns over time, creating the appearance of simultaneous progress. Multiple cores also allow parallel execution. The OS must consider responsiveness and efficient resource use rather than simply letting one program keep a core forever.
Not every process is ready to run. A process waiting for a file read may be blocked until data is available. The scheduler can run other ready work instead of treating waiting as useful CPU activity.
A context switch saves the execution state of one task and restores another’s. Switching has overhead, so scheduling is not free. The next lesson compares policies such as first-come first-served, round robin and priority scheduling.
07 | SECURITY: CONTROL WHO MAY DO WHAT
A shared school computer must distinguish between a student reading their own work and trying to alter another user’s files. OS security functions help control access to files, processes, devices and privileged operations.
Authentication establishes an identity. Authorisation determines what that identity is allowed to do. Logging in does not automatically grant permission to every resource.
Permissions can distinguish reading a file from changing it. Privilege separation and process isolation help prevent ordinary applications from freely altering core system state or other processes. Security-related logs can record events for investigation.
For example, a student may be permitted to read a shared worksheet but not overwrite the teacher’s original. An application requesting a write should receive an error if the applicable policy denies it.
These controls help maintain protection; they do not guarantee immunity from every attack or fault. Their effectiveness depends on implementation, configuration and appropriate maintenance.
08 | ACCOUNTING: MEASURE RESOURCE USE
In operating systems, accounting usually means recording resource use, not preparing a spreadsheet of business finances. The system can track measures such as CPU time, memory use, input/output activity and user or process activity.
A system monitor can use these measurements to show which process is consuming resources. An administrator can use records to investigate slow performance, plan capacity or apply usage limits. Some shared services also use measurements for charging.
Consider two applications: one uses large amounts of CPU time; another uses little CPU but waits for storage. Accounting helps reveal the difference. A single high memory figure does not by itself prove that a program is faulty.
Accounting records use; scheduling decides which runnable work executes. Security decides what access is permitted. These functions can support each other, but they are not interchangeable.
09 | GRAPHICAL USER INTERFACE: MAKE SERVICES ACCESSIBLE
A graphical user interface (GUI) lets people interact using visual elements such as windows, icons, menus, buttons and a pointer. A desktop environment and system settings provide familiar ways to request OS services.
When you drag a file into a folder, the interface turns that gesture into an appropriate request. File services perform the operation, and the interface shows its outcome or an error. The GUI makes access easier; it is not the entire file system.
Applications also supply graphical interfaces. A photo editor’s filters are application features, even though its windows appear alongside OS controls. Do not attribute every visible button to the OS.
An OS can also support command-line interaction or operate without a local desktop. The GUI is an important function in many systems, not a requirement that every OS must display windows.
10 | VIRTUALIZATION: PROVIDE VIRTUAL COMPUTING ENVIRONMENTS
Virtualization represents computing resources in software so that environments can use virtual resources rather than directly owning a whole physical machine. A virtual machine (VM) can present virtual processors, memory, storage and devices to a guest OS.
A hypervisor manages virtual-machine execution and access to physical resources. Some run directly on hardware; others operate with a host OS. Operating systems can supply virtualization support and management facilities, but a normal desktop interface does not itself act as the hypervisor.
For example, a development team can run separate test operating systems on one physical computer. Each guest manages its own applications, while virtualization software coordinates access to shared physical resources.
Isolation can help separate environments, but VMs still consume real CPU, RAM and storage. They do not create unlimited hardware or guarantee perfect security. Virtualization is also different from virtual memory: one provides virtual computing environments, while the other concerns process memory addressing and management.
VIRTUAL MACHINE A
Applications
Guest operating system
Virtual hardware
VIRTUAL MACHINE B
Applications
Guest operating system
Virtual hardware
HYPERVISOR
Coordinates access to physical resources
PHYSICAL HARDWARE
CPU cores · RAM · storage · devices
11 | NETWORKING: PROVIDE COMMUNICATION SERVICES
A browser, chat client and file-transfer application can all communicate through one network connection. The OS supplies networking facilities so applications do not each have to implement the complete communication system.
The networking stack implements supported communication protocols and works with network-device drivers. Applications can use interfaces such as sockets to send and receive data. A socket is a software communication endpoint, not the physical cable port.
For a web request, the browser handles its application-level task while OS networking services help move data through the network adapter. The remote server and the network infrastructure also have roles; the OS alone does not create the whole internet.
Networking, device management and security overlap in this example. The adapter needs a driver, communication consumes resources, and configured access controls may restrict traffic. A working local network connection does not guarantee that every remote service is reachable.
12 | BACKGROUND OPERATIONS AND SYSTEM INTEGRITY
An OS and its associated services continue working when you are not clicking anything. They may handle device events, manage cached data, record usage, maintain connections and perform configured maintenance.
System integrity means preserving the correct, consistent operation and protected state of the system. Memory isolation, access checks, coordinated resource use and controlled updates all contribute. No single function provides integrity on its own.
Background work also needs resources. A large maintenance task competing with interactive work can affect responsiveness. Scheduling and other management policies help balance useful background work with the user’s current task.
Consider a program that crashes while a document is open. Process isolation can reduce the chance that its memory error damages unrelated programs, and the OS can reclaim its resources. The OS does not automatically guarantee recovery of the application’s unsaved work.
Safe shutdown and appropriate file-system mechanisms help reduce inconsistent storage state. They do not replace backups or guarantee that sudden power loss can never cause data loss.
13 | FOLLOW THE FUNCTIONS THROUGH A SINGLE TASK
Choose a situation and reveal the main functions involved. The examples show how several OS functions contribute to one outcome, rather than pretending that every event belongs to just one category.
14 | IDENTIFY THE MAIN FUNCTION
Each case focuses on one primary function even though a real system may involve others. Choose a function, check your answer and use the explanation to separate easily confused ideas such as accounting and scheduling.
15 | NINE FUNCTIONS AT A GLANCE
| Function | What it does | Example |
|---|---|---|
| Memory management | Allocates, maps, protects and reclaims memory | Provides working memory for an editor |
| File system | Organises and manages persistent files and directories | Creates a named report file |
| Device management | Coordinates I/O using drivers and related services | Queues a printer job |
| Scheduling | Selects runnable work for CPU execution | Lets interactive and background work make progress |
| Security | Controls access and privileged actions | Denies an unauthorised file change |
| Accounting | Records resource usage | Shows a process’s accumulated CPU time |
| GUI | Provides visual interaction with services | Uses a file manager to rename a file |
| Virtualization | Supports and manages virtual computing environments | Runs a separate guest OS for testing |
| Networking | Provides protocol and communication services | Lets an application send data using a socket |
Use this table after reading the examples. In an answer, expand the relevant row into a description of what the OS does and how that supports the stated situation.
16 | DESCRIBE THE ACTION AND ITS PURPOSE
For a describe question, give the main characteristics of the function with relevant detail. For example: “Memory management tracks and allocates working memory to processes, and reclaims it when no longer needed. It also supports protected address spaces so one process cannot freely overwrite another.”
For device management: “The OS uses drivers to communicate with supported devices and coordinates I/O. A print service can queue jobs so several applications can use a shared printer.” This is stronger than writing only “it manages devices”.
Keep related functions distinct. Accounting measures use; scheduling allocates execution opportunities. A GUI presents controls; file services perform the requested file operation. Virtual machines are not the same as virtual memory.
The next lesson compares scheduling approaches. Here, make sure you can describe every named function and show how several functions contribute to system integrity.
Further reading: Virtual address spaces and physical storage · OS resource accounting · A hypervisor architecture example