📚 IGCSE Computer Science: Operating Systems | IGCSE 计算机:操作系统 考点精讲
Every time you turn on a computer, an operating system (OS) takes control. It manages all the hardware and software, making it possible for you to run applications, save files, and connect to the internet. Understanding how an OS works is a core topic in IGCSE Computer Science, as it forms the bridge between the physical machine and the programs we use every day.
每次打开电脑,操作系统(OS)就会接管一切。它管理着所有的硬件和软件,让你能够运行应用程序、保存文件并连接互联网。理解操作系统的工作原理是 IGCSE 计算机科学的核心课题,因为它构成了物理机器和我们日常使用的程序之间的桥梁。
1. What is an Operating System? | 什么是操作系统?
An operating system is a type of system software that acts as an interface between the user, the application software, and the computer hardware. It controls all the hardware components, allocates resources like processor time and memory space, and provides a stable environment for applications to execute. Without an OS, each program would have to manage hardware directly, which would be extremely complex and impractical.
操作系统是一种系统软件,充当用户、应用软件和计算机硬件之间的接口。它控制所有的硬件组件,分配处理器时间和内存空间等资源,并为应用程序的运行提供稳定的环境。如果没有操作系统,每个程序都必须直接管理硬件,这将极其复杂且不切实际。
Common examples of operating systems include Microsoft Windows, macOS, various Linux distributions, Android, and iOS. These systems hide the messy details of hardware control behind a clean, consistent interface, allowing programmers to write software that works across many different machines.
常见的操作系统例子有 Microsoft Windows、macOS、各种 Linux 发行版、Android 和 iOS。这些系统把繁琐的硬件控制细节隐藏在一个简洁一致的接口之后,让程序员可以编写能跨多种不同机器运行的软件。
2. The Kernel and System Software | 内核与系统软件
At the heart of every OS lies the kernel—the core program that is always loaded into main memory when the computer starts. The kernel handles the most fundamental tasks: managing processes, scheduling the CPU, handling interrupts, and controlling memory and devices. It operates in a privileged mode with direct access to hardware, while ordinary applications run in user mode and must request services from the kernel via system calls.
每个操作系统的核心是内核——那颗在计算机启动时总是被加载到主存的程序。内核处理最基本的任务:管理进程、调度 CPU、处理中断以及控制内存与设备。它在特权模式下运行,可直接访问硬件;而普通应用程序在用户模式下运行,必须通过系统调用向内核请求服务。
System software includes not only the OS itself, but also utility programs (like disk formatters, backup tools, and antivirus scanners) and device drivers. This collection of software differs from application software, which is designed for end-user tasks such as word processing, gaming, or browsing the web.
系统软件不仅包括操作系统本身,还包括实用程序(如磁盘格式化工具、备份工具和防病毒扫描程序)以及设备驱动程序。这一系列软件与应用软件不同,应用软件是为文字处理、游戏或网页浏览等最终用户任务而设计的。
3. Process Management and Multitasking | 进程管理与多任务
A process is a program that is being executed. The OS is responsible for creating and terminating processes, allocating CPU time to each one, and ensuring they can run simultaneously without interfering with one another. This is achieved through scheduling algorithms that decide which process should run next and for how long. A common method is round-robin scheduling, where each process gets a small time slice in turn.
进程是正在执行的程序。操作系统负责创建和终止进程,为每个进程分配 CPU 时间,并确保它们能同时运行而互不干扰。这是通过调度算法来实现的,这些算法决定接下来运行哪个进程以及运行多长时间。一种常见的方法是轮转调度,即每个进程轮流获得一小段时间片。
Multitasking allows a single CPU to appear to run multiple tasks concurrently by rapidly switching between processes. This switching, known as a context switch, saves the state (program counter, registers, memory allocation) of the current process and loads the saved state of the next one. The OS also maintains different process states: new, ready, running, waiting, and terminated, moving processes between these queues as their status changes.
多任务处理通过快速在进程间切换,使得单个 CPU 看起来像在同时运行多个任务。这种切换称为上下文切换,它保存当前进程的状态(程序计数器、寄存器、内存分配)并加载下一个进程的已保存状态。操作系统还维护不同的进程状态:新建、就绪、运行、等待和终止,并随着状态的改变在这些队列之间移动进程。
4. Memory Management | 内存管理
Memory management is the function of an OS that handles the allocation and deallocation of the main memory (RAM) to processes. When a process is created, the OS assigns it a block of memory; when the process terminates, the memory is freed for other processes. The OS must also ensure that a process does not accidentally or maliciously access memory belonging to another process, a concept known as memory protection.
内存管理是操作系统的一项功能,它负责为主存(RAM)分配给进程以及回收空间。当进程创建时,操作系统为其分配一块内存;当进程终止时,该内存被释放以供其他进程使用。操作系统还必须确保某个进程不会意外或恶意访问属于另一个进程的内存,这一概念称为内存保护。
In many modern operating systems, virtual memory extends the apparent size of RAM by using a portion of the hard disk as if it were slower main memory. The OS swaps pages of data between RAM and the disk, allowing larger workloads to be executed even if physical RAM is limited. Although IGCSE does not go deep into complex schemes like paging or segmentation, understanding that the OS efficiently manages memory and can use disk space as an extension is essential.
在许多现代操作系统中,虚拟内存通过将一部分硬盘空间当作较慢的主存使用,从而扩展了 RAM 的视在大小。操作系统在 RAM 和磁盘之间交换数据页,这使得即使物理 RAM 有限也能执行更大的工作负载。虽然 IGCSE 不深入探讨分页或分段等复杂方案,但理解操作系统能有效管理内存并能使用磁盘空间作为扩展是必不可少的。
5. File Management | 文件管理
The OS provides a consistent way of storing, retrieving, and organising data on secondary storage devices such as hard drives and SSDs. It implements a file system that uses directories (folders) to create a hierarchical structure. Each file is identified by a name and an extension (like .txt or .jpg), and the OS keeps track of file attributes: size, creation date, modification date, and access permissions.
操作系统提供了一种在硬盘和 SSD 等辅助存储设备上存储、检索和组织数据的一致方式。它实现了文件系统,通过目录(文件夹)建立层次结构。每个文件通过名称和扩展名(如 .txt 或 .jpg)标识,操作系统会跟踪文件的属性:大小、创建日期、修改日期和访问权限。
The file management system handles operations such as creating, deleting, opening, closing, reading, writing, and renaming files. It uses structures like file allocation tables (FAT) or inode tables to record where exactly on the disk each file’s data blocks are located. Access rights (read, write, execute) allow the OS to protect files from unauthorised users in a multi-user environment.
文件管理系统处理诸如创建、删除、打开、关闭、读取、写入和重命名文件等操作。它使用文件分配表 (FAT) 或 inode 表等结构来记录每个文件的数据块在磁盘上的确切位置。访问权限(读取、写入、执行)使得操作系统能够在多用户环境中保护文件免受未经授权的用户的侵害。
6. Device Management and Drivers | 设备管理与驱动程序
Computers are connected to a wide range of I/O devices: keyboards, mice, printers, monitors, network cards, and many more. The OS manages these devices through a software component called a device driver. A driver acts as a translator between the generic commands issued by the OS and the specific instructions that a particular piece of hardware needs. This means the OS can treat different printers, for instance, in a uniform way by loading the appropriate driver.
计算机连接到各种输入/输出设备:键盘、鼠标、打印机、显示器、网卡等等。操作系统通过一种称为设备驱动程序的软件组件来管理这些设备。驱动程序充当操作系统发出的通用命令与特定硬件所需的专用指令之间的翻译器。这意味着,例如通过加载相应的驱动程序,操作系统就能以统一的方式处理不同的打印机。
When a device needs attention, it typically sends an interrupt to the CPU, causing the OS to temporarily pause the current task and deal with the device request. Device management also includes techniques like buffering (storing data temporarily to smooth out speed differences) and spooling (for printers, queuing documents so multiple users can send jobs without waiting).
当设备需要关注时,它通常会向 CPU 发送中断,导致操作系统暂时暂停当前任务并处理设备请求。设备管理还包括缓冲(临时存储数据以平滑速度差异)和后台打印(针对打印机,将文档排队,这样多个用户无需等待即可发送作业)等技术。
7. The Role of Interrupts | 中断的作用
An interrupt is a signal sent to the processor that causes the normal execution cycle to be interrupted. Interrupts can come from hardware (e.g., a key pressed on the keyboard, a mouse click, a timer chip) or from software (e.g., a system call from a program, an arithmetic error like division by zero). When the CPU receives an interrupt, it suspends the current process, saves its state, and jumps to the appropriate interrupt service routine (ISR) stored in memory.
中断是发送给处理器的信号,会导致正常的执行周期被打断。中断可以来自硬件(例如,键盘上按下一个键、鼠标点击、定时器芯片),也可以来自软件(例如,程序的系统调用、算术错误如除以零)。当 CPU 接收到中断时,它会暂停当前进程,保存其状态,并跳转到内存中存储的相应的中断服务程序 (ISR)。
Interrupts are crucial for multitasking. The OS uses a timer interrupt to force a process to yield the CPU, enabling fair scheduling. They also allow the system to respond quickly to input devices without constantly polling them, which saves processor time and energy. Different interrupts can have different priorities; a higher-priority interrupt can interrupt a lower-priority ISR that is currently being executed.
中断对于多任务处理至关重要。操作系统使用定时器中断强制进程让出 CPU,从而实现公平调度。中断还使系统能够快速响应输入设备,而无需不断轮询它们,从而节省处理器时间和能量。不同的中断可以有不同的优先级;高优先级的中断可以打断当前正在执行的低优先级的 ISR。
8. User Interfaces: CLI vs GUI | 用户界面:命令行与图形
The OS must provide a way for users to interact with the computer. The two most common types are the command-line interface (CLI) and the graphical user interface (GUI). In a CLI, the user types textual commands; the system is light on resources and can be very powerful and fast for experienced users, but it requires memorising commands and syntax. In a GUI, the user interacts through visual elements like windows, icons, menus, and pointers (WIMP). GUIs are more intuitive and user-friendly, but they consume more memory and processing power.
操作系统必须为用户提供与计算机交互的方式。最常见的两种类型是命令行界面 (CLI) 和图形用户界面 (GUI)。在 CLI 中,用户键入文本命令;该系统占用资源少,对经验丰富的用户而言可以非常强大和快速,但需要记住命令和语法。在 GUI 中,用户通过窗口、图标、菜单和指针 (WIMP) 等视觉元素进行交互。GUI 更直观、更友好,但会消耗更多的内存和处理能力。
A quick comparison summarises the trade-offs:
快速比较总结了各自的权衡:
| Aspect / 方面 | CLI / 命令行 | GUI / 图形界面 |
|---|---|---|
| Ease of learning / 学习难度 | Steeper / 较陡 | Easier / 较容易 |
| Resource usage / 资源占用 | Low / 低 | High / 高 |
| Automation / 自动化 | Excellent via scripts / 通过脚本极佳 | Limited / 有限 |
| User base / 用户群体 | IT professionals / IT 专业人员 | General public / 普通大众 |
Other interfaces include menu-driven, form-based, and natural language interfaces. Modern operating systems often layer a GUI over a command-line core, and many allow switching between both as needed.
其他界面类型包括菜单驱动、表单式和自然语言界面。现代操作系统通常会在命令行核心上层叠一个 GUI,许多系统还允许根据需要在这两者之间切换。
9. Security and Access Control | 安全与访问控制
In a multi-user environment, the OS must protect each user’s data and the system itself from unauthorised access. Access control starts with authentication—typically a username and password—to verify a user’s identity. Once logged in, the OS applies a set of access rights to determine what a user can do: which files they can read, write, or execute, and which hardware or system functions they can use.
在多用户环境中,操作系统必须保护每个用户的数据以及系统本身免受未经授权的访问。访问控制始于身份验证——通常通过用户名和密码——来验证用户的身份。登录后,操作系统会应用一组访问权限来确定用户可以做什么:他们可以读取、写入或执行哪些文件,以及可以使用哪些硬件或系统功能。
Security also involves the OS managing user accounts and groups, logging system events, and providing mechanisms to protect against malware. Although dedicated security software often handles threats, the OS lays the foundation by isolating processes, enforcing memory protection, and controlling network access through firewalls. Regular updates (patches) from the OS vendor fix vulnerabilities that could be exploited by attackers.
安全还涉及操作系统管理用户账户和组、记录系统事件以及提供防范恶意软件的机制。尽管专用安全软件通常处理威胁,但操作系统通过隔离进程、执行内存保护以及通过防火墙控制网络访问奠定了安全基础。操作系统供应商提供的定期更新(补丁)可以修复攻击者可能利用的漏洞。
10. Types of Operating Systems | 操作系统类型
Different computing environments require different kinds of OS. A desktop OS (like Windows or macOS) is designed for personal computers, balancing performance, usability, and support for a wide range of software. A network OS (e.g., Windows Server, Linux with server roles) is optimised for managing shared resources across multiple clients. Mobile operating systems such as Android and iOS are tuned for touch interfaces, power efficiency, and extended battery life.
不同的计算环境需要不同类型的操作系统。桌面操作系统(如 Windows 或 macOS)专为个人电脑设计,在性能、易用性和对广泛软件的支持之间取得平衡。网络操作系统(如 Windows Server、带服务器角色的 Linux)针对管理跨多个客户端的共享资源进行了优化。移动操作系统(如 Android 和 iOS)则为触控界面、能效和长续航进行了调优。
Embedded systems, found in devices like washing machines, traffic lights, and smartwatches, run a lightweight, real-time operating system (RTOS) that guarantees responses within strict time constraints. Distributed operating systems manage a group of independent computers and make them appear as a single coherent system. In the IGCSE syllabus, recognising the difference between desktop, mobile, and embedded operating systems is particularly important.
嵌入式系统存在于洗衣机、交通信号灯和智能手表等设备中,运行轻量级的实时操作系统 (RTOS),可保证在严格的时间限制内做出响应。分布式操作系统管理一组独立的计算机,并让它们看起来像是一个单一协调的系统。在 IGCSE 大纲中,认识到桌面、移动和嵌入式操作系统之间的区别尤其重要。
11. Summary: Functions of an Operating System | 总结:操作系统的功能
To help you revise, here is a concentrated list of the key functions performed by any operating system, which often appear as exam questions:
为了帮助你复习,以下是任何操作系统执行的关键功能列表,这些功能常作为考题出现:
| Function / 功能 | Description / 描述 |
|---|---|
| Process management / 进程管理 | Creating, scheduling, and terminating processes; context switching / 创建、调度和终止进程;上下文切换 |
| Memory management / 内存管理 | Allocating RAM to processes, protection, virtual memory / 为进程分配 RAM、内存保护、虚拟内存 |
| File management / 文件管理 | Organising, storing, retrieving, and protecting files on storage devices / 在存储设备上组织、存储、检索和保护文件 |
| Device management / 设备管理 | Controlling I/O devices through drivers; handling interrupts / 通过驱动程序控制 I/O 设备;处理中断 |
| User interface / 用户界面 | Providing CLI, GUI, or other interfaces / 提供 CLI、GUI 或其他界面 |
| Security and access control / 安全与访问控制 | Authenticating users, enforcing permissions, logging / 验证用户、强制执行权限、日志记录 |
| Networking / 联网 | Supporting network protocols and shared resources / 支持网络协议和共享资源 |
These responsibilities demonstrate that the OS is far more than a simple background program—it is the indispensable manager that makes the computer usable, efficient, and secure.
这些职责表明,操作系统远非一个简单的后台程序——它是让计算机变得可用、高效且安全所不可或缺的管理者。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply