A1.3 · Computer fundamentals
A1.3 · 计算机基础
The Role of an Operating System
操作系统的作用
When you open an app, you do not tell the computer which megabytes of RAM to use, or take turns with other programs for the processor. The operating system does all of that, sitting between every program and the hardware.
当你打开一个应用时,你不会告诉电脑该用哪几兆字节的内存,也不会为了处理器而和其他程序轮流排队。这些全由操作系统完成,它位于每个程序与硬件之间。
A1’s guiding question asks what principles underpin how a computer works. One is abstraction: the OS hides hardware complexity so software can be written against a stable set of services rather than one machine’s wiring.
A1 的引导性问题问的是支撑计算机运行的原理。其中之一是抽象:操作系统隐藏硬件的复杂性,使软件可以针对一套稳定的服务来编写,而不是针对某一台机器的具体连线。
Explainer
讲解
What the operating system is for
操作系统是干什么的
The operating system (OS) is the software layer that sits between every program and the hardware, managing the machine’s resources, the processor, memory, storage, input and output devices and the network, and hands each program the services it needs to run.
操作系统(OS)就是位于每个程序与硬件之间的那一层软件,管理机器的各种资源,包括处理器、内存、存储、输入输出设备和网络,并向每个程序提供其运行所需的服务。
Without it, every program would have to control the hardware directly and take turns with every other program by itself. The OS removes that burden: a program asks for memory or a file, and the OS decides how to satisfy the request without letting programs collide.
如果没有它,每个程序都必须直接控制硬件,并自行与其他所有程序轮流使用资源。操作系统消除了这个负担:程序只需请求内存或文件,操作系统便决定如何满足该请求,同时不让程序之间发生冲突。
It also stands as the intermediary that connects the user to the hardware, turning a click or a command into the low-level operations the hardware understands and reporting the result back.
它还充当把用户连到硬件的中介:把一次点击或一条命令转换成硬件能理解的底层操作,再把结果回报给用户。
Explainer
讲解
Abstraction: hiding the hardware
抽象:把硬件藏起来
The OS hides hardware detail behind a small set of high-level services. A program that wants to save a file calls one service; it never needs to know whether the drive is a hard disk or an SSD, which sectors are free, or how the controller is wired.
操作系统把硬件细节隐藏在一小组高层服务之后。想要保存文件的程序只需调用一个服务,它完全不需要知道硬盘是机械盘还是固态盘、哪些扇区空闲,或者控制器是如何连线的。
When Mia opens a photo editor, she does not choose which megabytes of RAM it uses or arrange for it to share the processor with her music player. The OS does all of that, so the same editor runs on many different computers without being rewritten for each one.
当 Mia 打开一款照片编辑器时,她不会去挑选它使用哪几兆字节的内存,也不会安排它与音乐播放器共用处理器。这些都由操作系统完成,因此同一款编辑器无需为每台电脑重写就能在许多不同的电脑上运行。
Abstraction is one of the principles A1 is about. Because the OS presents the same services on any machine, software can be written once against those services instead of once per hardware design.
抽象正是 A1 所讲的原理之一。由于操作系统在任何机器上都提供相同的服务,软件只需针对这些服务编写一次,而不必为每一种硬件设计各写一次。
Explore
探索
The resources it manages
它管理的资源
The OS is responsible for sharing out every scarce resource in the machine. Click each one to see what the OS does and why a program cannot be trusted to do it itself.
操作系统负责分配机器中每一项稀缺资源。点击每一项,看看操作系统做了什么,以及为什么不能让程序自行去做。
Check your understanding
检验你的理解
Which statement best describes the role of an operating system?
下面哪一句最恰当地描述了操作系统的作用?
Common mistake
常见错误
RecurringMany answers list things a user sees, “it has a desktop, it lets you open files, it shows the time”. Those are surface features, not the role. Describe here means state what the OS does for the system: it manages shared hardware resources, provides services to programs, and abstracts the hardware so software does not depend on one machine’s wiring.
反复出现许多答案罗列的是用户看得见的东西,比如“它有桌面、能打开文件、会显示时间”。这些是表面特征,不是它的作用。这里的 describe(描述) 指的是说明操作系统为系统做了什么:管理共享的硬件资源、向程序提供服务,并对硬件进行抽象,使软件不依赖于某一台机器的具体连线。
Surface features: “The operating system gives you a desktop with icons and lets you move files into folders.” True, but it never says what the OS actually manages or why it is needed.
只说表面特征: “操作系统给你一个带图标的桌面,让你把文件拖进文件夹。”没错,但它从没说操作系统究竟管理了什么、为什么需要它。
The role stated: “The operating system manages the computer’s resources, sharing the processor, memory, storage and devices between programs so they do not conflict. It provides services such as file access and memory allocation that programs call instead of controlling hardware directly, and it hides hardware detail so the same program runs on different machines.”
说清作用: “操作系统管理计算机的资源,在程序之间分配处理器、内存、存储和设备,使它们互不冲突。它提供文件访问、内存分配等服务供程序调用,程序因此无需直接控制硬件;它还隐藏硬件细节,使同一个程序能在不同机器上运行。”
Revision questions
复习题
Specimen-paper style. Write an answer, then reveal the marking points and mark yourself.
采用样卷风格。写下答案,然后展开评分要点给自己打分。
[3]Describe the role of an operating system in a computer.
[3]描述操作系统在计算机中的作用。
Marking points
评分要点
- Manages the computer's hardware resources (CPU, memory, storage, devices, network).
- Provides services that programs call instead of controlling hardware directly.
- Acts as an intermediary between the user / applications and the hardware.
- Hides (abstracts) hardware complexity.
- 管理计算机的硬件资源(CPU、内存、存储、设备、网络)。
- 提供服务供程序调用,使程序无需直接控制硬件。
- 充当用户 / 应用程序与硬件之间的中介。
- 隐藏(抽象)硬件的复杂性。
[4]Describe how an operating system acts as an intermediary between application software and hardware.
[4]描述操作系统如何充当应用软件与硬件之间的中介。
Marking points
评分要点
- The application makes a request (open a file, allocate memory) through an OS service / system call.
- The OS translates the request into the low-level operations the specific hardware needs.
- The OS carries them out and returns the result to the application.
- The application never addresses the hardware directly, so it need not know the hardware detail.
- 应用程序通过操作系统的服务 / 系统调用发出请求(打开文件、分配内存)。
- 操作系统把请求转换成特定硬件所需的底层操作。
- 操作系统执行这些操作,并把结果返回给应用程序。
- 应用程序从不直接寻址硬件,所以它不需要知道硬件细节。
[3]Explain what is meant by abstraction in the context of an operating system, and give one example.
[3]解释在操作系统的语境下“抽象”是什么意思,并举一个例子。
Marking points
评分要点
- Abstraction: hiding intricate detail behind a simpler interface / set of services.
- In an OS: programs use one service (e.g. save file) regardless of drive type, sectors or controller.
- Example: a photo editor calls the file service and does not deal with whether storage is an HDD or SSD.
- 抽象:把繁杂的细节隐藏在更简单的接口 / 一组服务之后。
- 在操作系统中:程序使用一个服务(例如保存文件),不管驱动器类型、扇区或控制器。
- 例子:照片编辑器调用文件服务,不处理存储是机械盘还是固态盘。
[4]Describe three system resources an operating system manages, and why central management is needed for each.
[4]描述操作系统管理的三种系统资源,以及为什么每一种都需要集中管理。
Marking points
评分要点
- Any three of: CPU time; memory (RAM); storage; input/output devices; the network connection; security/access.
- For each, one line on what the OS does (e.g. schedules CPU time; allocates protected memory blocks).
- Central management is needed because a program cannot see the others, so it would take more than its share or corrupt another program's data.
- 以下任选三项:CPU 时间;内存(RAM);存储;输入输出设备;网络连接;安全 / 访问。
- 每一项写一句操作系统做什么(例如调度 CPU 时间;分配受保护的内存块)。
- 需要集中管理,因为一个程序看不到其他程序,否则会占用超过自己份额的资源或破坏另一个程序的数据。
[3]Describe how an operating system makes it possible for the same application to run on different computers.
[3]描述操作系统如何让同一个应用能够在不同的计算机上运行。
Marking points
评分要点
- The OS presents the same set of services / interfaces on any machine.
- The program is written against those services, not against one machine's hardware.
- The OS maps each service call to whatever hardware is actually present, so the same program runs unchanged.
- 操作系统在任何机器上都提供同一组服务 / 接口。
- 程序是针对这些服务编写的,而不是针对某一台机器的硬件。
- 操作系统把每次服务调用映射到实际存在的硬件上,所以同一个程序不加改动就能运行。
Flashcards
记忆卡片
Active recall for this statement’s key terms.
针对本条考纲陈述关键术语的主动回忆练习。
Keep this statement’s practice with you
把这条考纲陈述的练习保存下来
Free account: save your progress and unlock every revision question for A1.3.1, and every other IB CS 2027 statement.
免费账户:解锁 A1.3.1 以及所有其他 IB CS 2027 考纲陈述的每一道复习题,并同步你的学习进度。