An operating system (OS) manages a computer’s hardware and software resources and provides an interface between users, applications, and hardware. Its main functions include memory management, processor scheduling, device and file management, security, and providing a user interface.
Main OS Functions
| Function | What the operating system does |
|---|---|
| Memory management | Allocates RAM to programs and data, tracks occupied and available locations, prevents processes from accessing each other’s memory without permission, and releases memory when it is no longer required. It may also use virtual memory when RAM is insufficient. |
| Processor scheduling | Selects which process receives CPU time and for how long. Scheduling enables multitasking and aims to use the processor efficiently while maintaining responsiveness. |
| Process management | Creates, executes, suspends, and terminates processes. It also coordinates processes and manages competition for shared resources. |
| Device management | Controls peripherals such as keyboards, printers, and storage devices, usually through device drivers. The OS handles communication between applications and hardware. |
| File management | Organizes files and directories, records their storage locations, and supports operations such as creating, opening, saving, copying, and deleting files. |
| User interface | Provides a way for users to interact with the computer. This may be a graphical user interface (GUI), command-line interface, menu-driven interface, or another interface type. |
| Security and user management | Authenticates users, assigns access rights, protects data, and prevents unauthorized access to system resources. |
| Error and interrupt handling | Detects hardware or software problems and responds to interrupts so that urgent events can receive processor attention. |
A common misconception is that a GUI is the operating system. A GUI is only one possible user-interface component; an OS can instead use a command-line interface or operate with little direct user interaction.
Exam Technique
For an IB response using the command term explain, do more than list functions. State each function and show how it helps the system operate, such as explaining that scheduling allocates CPU time among processes to support multitasking.