Operating Systems: Functions and Utility Software | 操作系统:功能与实用程序软件

📚 Operating Systems: Functions and Utility Software | 操作系统:功能与实用程序软件

An operating system (OS) is the most fundamental piece of system software that manages a computer’s hardware and software resources, providing common services for application programs. Understanding how an OS controls memory, processes, files, and devices, and knowing the role of essential utility software, is critical for A-Level Computer Science students. This article covers both the core functions of an operating system and the key utility programs that maintain system performance and security, aligning with the Edexcel specification for system software.

操作系统是最为基础的系统软件,它管理着计算机的硬件与软件资源,并为应用程序提供通用服务。了解操作系统如何控制内存、进程、文件和设备,同时掌握关键实用程序的作用,是 A-Level 计算机科学学生必须掌握的内容。本文涵盖了操作系统的核心功能以及维持系统性能与安全的关键实用程序软件,符合爱德思考试局对系统软件部分的教学要求。


1. The Role and Purpose of an Operating System | 操作系统的角色与目的

An operating system acts as an intermediary between the computer user and the hardware. Its primary purpose is to provide an environment in which a user can execute programs conveniently and efficiently. It hides the complexity of the hardware, manages the sharing of resources between multiple applications, and ensures that the system runs in a fair and secure manner.

操作系统充当计算机用户与硬件之间的中介。其主要目的是为用户提供一个既方便又高效的程序执行环境。它隐藏了硬件的复杂性,管理多个应用程序之间的资源共享,并确保系统以公平且安全的方式运行。

Without an OS, every application would need to include its own code to handle disk reads, memory allocation, and peripheral communication, making software development virtually impossible. The OS provides a standardised platform through application programming interfaces (APIs) so that programmers can focus on the logic of their programs rather than low-level hardware details.

如果没有操作系统,每个应用程序都需要自带处理磁盘读取、内存分配和外设通信的代码,这几乎使软件开发变得不可能。操作系统通过应用程序编程接口提供了一个标准化平台,使程序员能够专注于程序的逻辑,而不是低层硬件细节。


2. Memory Management | 内存管理

Memory management is one of the most crucial functions of an operating system. The OS must keep track of which parts of memory are in use, allocate memory to processes when they need it, and free it when they are done. On modern systems, this is achieved using virtual memory, which allows the execution of processes that are not completely in physical RAM by swapping data between RAM and secondary storage in units called pages.

内存管理是操作系统最关键的功能之一。操作系统必须跟踪哪些内存区域正被使用,在进程需要时分配内存,并在进程结束时释放内存。在现代系统中,这是通过虚拟内存实现的,虚拟内存允许执行并不完全载入物理内存的进程,方法是以称为页的单位在内存和二级存储之间交换数据。

Paging divides physical memory into fixed-size blocks called frames, and logical memory into blocks of the same size called pages. A page table maps each process’s pages to frames. When a process references a page not currently in memory, a page fault occurs, and the OS fetches the required page from disk, potentially swapping out another page. Segmentation, on the other hand, divides memory into variable-sized logical segments such as code, data, and stack. Both techniques can be combined into a segmented paging system for better flexibility and protection.

分页技术将物理内存划分为固定大小的块(称为帧),将逻辑内存划分为同样大小的块(称为页)。页表将每个进程的页映射到帧。当进程引用的页面不在内存中时,就会发生缺页中断,操作系统从磁盘调入所需页面,并可能换出另一个页面。而分段技术则将内存划分为大小可变的逻辑段,如代码段、数据段和栈段。这两项技术可以结合为段页式系统,以获得更好的灵活性与保护能力。


3. Processor Scheduling | 处理器调度

The OS uses scheduling algorithms to decide which process gets the CPU at any given time. The goal is to maximise CPU utilisation, ensure fairness, and provide an acceptable response time for interactive users. In a multitasking environment, the scheduler rapidly switches between processes, giving the illusion that several programs are running simultaneously.

操作系统使用调度算法来决定哪个进程在任意时刻获得 CPU。其目标在于最大化 CPU 利用率、确保公平性,并为交互式用户提供可接受的响应时间。在多任务环境中,调度器在进程之间快速切换,给人一种多个程序同时运行的错觉。

Common scheduling algorithms include First Come First Served (FCFS), which is simple but can cause long average wait times; Shortest Job First (SJF), which gives priority to processes with the smallest burst time; Round Robin (RR), where each process gets a small time quantum in a cyclic order; and priority-based scheduling. Pre-emptive scheduling allows the OS to interrupt a currently running process to start a higher-priority one, while non-pre-emptive scheduling requires a process to voluntarily release the CPU.

常见的调度算法包括先到先服务(FCFS),它简单但可能导致较长的平均等待时间;最短作业优先(SJF),优先分配 CPU 给突发时间最短的进程;轮转调度(Round Robin),每个进程按循环顺序获得一个较短的时间片;以及基于优先级的调度。抢占式调度允许操作系统中断当前正在运行的进程以启动优先级更高的进程,而非抢占式调度则要求进程主动释放 CPU。


4. File Management | 文件管理

The operating system organises data into files and directories, providing a logical view of the physical storage. It handles file naming, creation, deletion, access permissions, and the mapping of files onto storage devices. A typical OS uses a hierarchical directory structure, allowing users to group related files and navigate the file system intuitively.

操作系统将数据组织为文件和目录,提供物理存储的逻辑视图。它负责文件命名、创建、删除、访问权限管理以及文件到存储设备的映射。典型的操作系统采用分层目录结构,使用户能够直观地对相关文件进行分组并浏览文件系统。

The OS maintains metadata about each file, such as its size, creation date, modification date, and location on the disk, often kept in a file allocation table (FAT) or an inode structure. File allocation methods include contiguous allocation, linked allocation, and indexed allocation, each with different trade-offs in terms of access speed, fragmentation, and wasted space.

操作系统维护每个文件的元数据,如文件大小、创建日期、修改日期以及所在磁盘的位置,这些信息通常保存在文件分配表或索引节点结构中。文件分配方式包括连续分配、链接分配和索引分配,每种方式在访问速度、碎片化与空间浪费方面都有不同的权衡。


5. User Interface and I/O Management | 用户界面与输入输出管理

Operating systems provide a user interface to allow interaction with the machine. This can be a command-line interface (CLI), where users type text commands, or a graphical user interface (GUI), which uses windows, icons, menus, and pointers. The OS also abstracts the complexity of input and output (I/O) devices by providing a uniform interface to device drivers.

操作系统提供用户界面以便与机器交互。这可以是命令行界面(CLI),用户输入文本命令;也可以是图形用户界面(GUI),使用窗口、图标、菜单和指针。操作系统还通过为设备驱动程序提供统一接口,抽象了输入输出(I/O)设备的复杂性。

When an application wants to read from a disk or send data to a printer, it does not need to know the specific hardware details. Instead, it makes a system call, and the OS translates that into commands for the relevant device driver. Buffering, caching, and spooling are techniques used by the OS to handle speed mismatches between the CPU and I/O devices and to improve overall performance.

当应用程序想要从磁盘读取数据或向打印机发送数据时,无需了解具体的硬件细节。它只需发出系统调用,操作系统会将其转换为对应设备驱动程序的命令。缓冲、高速缓存和假脱机是操作系统用来处理 CPU 与 I/O 设备之间速度不匹配并提高整体性能的技术。


6. Security and Protection | 安全与保护

The operating system must protect users’ processes from one another and safeguard the system itself from malicious software. It enforces authentication through login credentials and authorises access to resources based on permissions. Memory protection prevents a process from accessing memory allocated to another process or to the OS kernel.

操作系统必须保护用户进程免受彼此干扰,并保护系统本身免受恶意软件的侵害。它通过登录凭据强制身份验证,并根据权限授权对资源的访问。内存保护可防止进程访问分配给其他进程或操作系统内核的内存区域。

Modern operating systems implement privilege levels, such as user mode and kernel mode. Critical instructions can only be executed in kernel mode, so any attempt by a user program to perform a privileged operation triggers an interrupt that hands control back to the OS. Access control lists (ACLs) and file permissions (read, write, execute) are used to restrict unauthorised access to files and directories.

现代操作系统实现了特权级别,如用户模式和内核模式。关键指令只能在内核模式下执行,因此任何用户程序试图执行特权操作的行为都会触发中断,将控制权交还给操作系统。访问控制列表和文件权限(读、写、执行)被用来限制对文件和目录的未经授权访问。


7. Overview of Utility Software | 实用程序软件概述

Utility software is a type of system software designed to help analyse, configure, optimise, or maintain a computer. Unlike application software, utilities are not directly used by end-users to perform a specific productive task; instead, they work behind the scenes to keep the system running smoothly and securely. Most operating systems come bundled with a set of essential utilities, while third-party alternatives are also widely available.

实用程序软件是一类旨在帮助分析、配置、优化或维护计算机的系统软件。与应用软件不同,实用程序并非由终端用户直接用于执行特定的生产性任务;相反,它们在幕后工作,以确保系统平稳高效地运行。大多数操作系统都附带一套基本的实用程序,同时也广泛存在第三方替代程序。

Key categories of utility software include disk defragmentation tools, backup utilities, compression software, encryption tools, antivirus scanners, and disk cleanup utilities. Understanding how these tools function and why they are necessary is part of the Edexcel A-Level Computer Science syllabus under system software.

实用程序软件的主要类别包括磁盘碎片整理工具、备份实用程序、压缩软件、加密工具、防病毒扫描程序和磁盘清理实用程序。了解这些工具的功能及其必要性,是爱德思 A-Level 计算机科学教学大纲中系统软件部分的要求。


8. Disk Defragmentation | 磁盘碎片整理

As files are created, modified, and deleted, the free space on a magnetic hard disk becomes scattered into small, non-contiguous blocks. Over time, a single file may end up being stored in fragments spread across the disk, which increases the seek time and rotational latency required to read the file. Disk defragmentation utilities reorganise file fragments so that each file occupies a continuous block of storage, thus improving read and write performance.

随着文件的创建、修改和删除,磁性硬盘上的空闲空间会分散成小块、不连续的块。久而久之,单个文件可能以碎片形式散布在磁盘各处,从而增加了读取该文件所需的寻道时间和旋转延迟。磁盘碎片整理程序会重新组织文件碎片,使每个文件占据连续的存储区域,从而提高读写性能。

It is important to note that defragmentation is only beneficial on traditional hard disk drives (HDDs). On solid-state drives (SSDs), data access does not rely on moving a read/write head, so defragmentation offers no performance gain and can actually reduce the lifespan of the drive by causing unnecessary write cycles. SSDs use a different mechanism called TRIM to manage space efficiently.

需要注意的是,碎片整理仅对传统机械硬盘有益。在固态硬盘上,数据访问并不依赖移动读写头,因此碎片整理不会带来性能提升,反而可能因不必要的写入操作而缩短硬盘寿命。固态硬盘使用一种称为 TRIM 的不同机制来高效管理空间。


9. Backup Utilities | 备份实用程序

Backup utilities create copies of data so that it can be restored in the event of data loss, corruption, or disaster. A full backup copies all selected files, while an incremental backup only copies files that have changed since the last backup of any type. A differential backup copies all files changed since the last full backup. Each strategy has implications for backup speed and restore time.

备份实用程序会创建数据副本,以便在数据丢失、损坏或发生灾难时进行恢复。完全备份会复制所有选定的文件,而增量备份仅复制自上次任何类型备份以来发生了变化的文件。差异备份则复制自上次完全备份以来所有发生变化的文件。每种策略都会对备份速度和恢复时间产生不同的影响。

Modern backup utilities often support scheduling, compression, and encryption. Cloud-based backup solutions automate the process and store copies on remote servers, providing an additional layer of protection against physical theft or fire. For an A-Level student, it is essential to understand the trade-offs between backup frequency, storage space, and recovery objectives.

现代备份实用程序通常支持计划任务、压缩和加密。基于云的备份解决方案可自动执行该过程,并将副本存储在远程服务器上,为防范实体盗窃或火灾提供了额外的保护层。对于 A-Level 学生而言,理解备份频率、存储空间和恢复目标之间的权衡至关重要。


10. Compression Utilities | 压缩实用程序

Compression software reduces the size of files and folders to save storage space and to speed up transmission over networks. There are two main types: lossless compression, where no data is lost and the original file can be perfectly reconstructed, and lossy compression, which permanently removes some information to achieve higher compression ratios, typically used for images, audio, and video.

压缩软件可减小文件和文件夹的大小,以节省存储空间并加快网络传输速度。主要有两种类型:无损压缩,不丢失任何数据,能够完美重建原始文件;有损压缩,会永久性地移除部分信息以实现更高的压缩比,通常用于图像、音频和视频。

Common lossless algorithms include run-length encoding (RLE) and Huffman coding. RLE replaces consecutive identical data values with a count and the value, while Huffman coding assigns shorter bit codes to more frequent symbols. Utilities such as WinZip, 7-Zip, and the built-in compression tools in operating systems use a combination of these techniques to create archives with extensions like .zip, .rar, or .tar.gz.

常见的无损压缩算法包括游程编码和哈夫曼编码。游程编码将连续的相同数据值替换为一个计数值和该值,而哈夫曼编码则为出现频率较高的符号分配较短的位码。诸如 WinZip、7-Zip 以及操作系统中内置的压缩工具均使用这些技术的组合来创建扩展名为 .zip、.rar 或 .tar.gz 的归档文件。


11. Encryption Utilities | 加密实用程序

Encryption utilities transform plaintext data into ciphertext using an algorithm and a key, making it unreadable to anyone without the correct decryption key. This protects sensitive information from unauthorised access, whether the data is stored on a disk or transmitted over a network. Symmetric encryption uses the same key for both encryption and decryption, whereas asymmetric encryption uses a public/private key pair.

加密实用程序使用算法和密钥将明文数据转换为密文,使得任何没有正确解密密钥的人无法读取。这保护了敏感信息免遭未经授权的访问,无论数据是存储在磁盘上还是通过网络传输。对称加密使用同一密钥进行加密和解密,而非对称加密则使用公钥/私钥对。

Full-disk encryption, such as BitLocker or FileVault, encrypts an entire volume, protecting all data in case the device is lost or stolen. File-level encryption allows individual files to be encrypted separately. A-Level candidates should understand that encryption does not prevent data loss, but it ensures confidentiality; the strength of encryption depends on the key length and the algorithm’s resistance to cryptanalysis.

全盘加密(如 BitLocker 或 FileVault)会对整个卷进行加密,在设备丢失或被盗时保护所有数据。文件级加密允许对单个文件分别进行加密。A-Level 考生应理解,加密并不能防止数据丢失,但可以确保数据的机密性;加密的强度取决于密钥的长度以及算法抵抗密码分析的能力。


12. Antivirus and Malware Protection | 防病毒与恶意软件防护

Antivirus utilities are designed to detect, quarantine, and remove malicious software, including viruses, worms, trojans, ransomware, and spyware. They typically work by scanning files and comparing them against a database of known malware signatures. Heuristic analysis can also detect new, unknown threats by examining suspicious behaviour or code patterns.

防病毒实用程序旨在检测、隔离并移除恶意软件,包括病毒、蠕虫、木马、勒索软件和间谍软件。它们通常通过扫描文件并将其与已知恶意软件特征库进行比对来工作。启发式分析还可以通过检查可疑行为或代码模式来发现未知的新型威胁。

Regular signature updates are critical because malware authors constantly evolve their code. Real-time protection monitors the system continuously, blocking malicious actions as they occur. While antivirus software is an essential layer of defence, it must be complemented by safe browsing habits, a firewall, and regular software updates to be fully effective.

定期更新特征库至关重要,因为恶意软件作者会不断演变其代码。实时防护会持续监控系统,在恶意行为发生时进行阻止。尽管反病毒软件是不可或缺的防护层,但要完全发挥效用,还必须辅以安全的浏览习惯、防火墙以及定期的软件更新。

Published by TutorHao | Computer Science Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading