IGCSE Computer Science: Types of Software and Interrupt Handling | IGCSE计算机:软件类型与中断处理

📚 IGCSE Computer Science: Types of Software and Interrupt Handling | IGCSE计算机:软件类型与中断处理

This article explains two core topics in the IGCSE Computer Science syllabus: types of software and interrupt handling. Understanding these ideas is essential for Paper 1 Theory, where you will be asked to describe the role of system software, compare application software, and explain how the CPU responds to interrupts.

本文讲解 IGCSE 计算机科学考纲中的两个核心专题:软件类型与中断处理。理解这些概念对 Paper 1 理论考试非常重要,因为试题会要求你描述系统软件的作用、比较应用软件,并解释 CPU 如何响应中断。


1. System Software vs Application Software | 系统软件与应用软件

Software is divided into two main categories: system software and application software. System software is designed to manage and control the hardware of the computer, as well as provide a platform for running other programs. Application software is designed to perform a specific task for the user, such as word processing, spreadsheet calculations, or photo editing.

软件主要分为两大类:系统软件和应用软件。系统软件用于管理和控制计算机硬件,并且为运行其他程序提供平台。应用软件则是为用户完成某项具体任务而设计的,例如文字处理、电子表格计算或图片编辑。

The table below shows the key differences you need to remember.

下表列出了你需要记住的关键区别。

Feature System Software Application Software
Purpose Manage the computer system itself Complete user tasks
Examples Operating system, utility programs, device drivers Word processor, web browser, game
Runs without user action? Often runs in the background Usually started by the user

In a CIE exam, you may be given a list of programs and asked to identify which are system software and which are application software. Always classify the operating system, compilers, and utilities as system software.

在 CIE 考试中,你可能会拿到一个程序列表,并要求判断哪些是系统软件、哪些是应用软件。请始终将操作系统、编译器和实用程序归类为系统软件。


2. Operating Systems and Their Functions | 操作系统及其功能

The operating system (OS) is the most important type of system software. It manages hardware resources and provides a user interface. Common functions include process management, memory management, file management, and security.

操作系统是最重要的系统软件类型。它管理硬件资源并提供用户界面。常见功能包括进程管理、内存管理、文件管理和安全管理。

  • Process management: The OS decides which program gets the CPU and when. It switches between running programs so they can share the processor.

  • Memory management: The OS keeps track of which parts of memory are used by which programs, and allocates memory when needed.

  • File management: The OS organises, stores, retrieves, and deletes files using a folder structure.

  • Security: The OS controls access to the system using passwords, permissions, and file encryption.

中文解释:操作系统负责决定哪个程序使用 CPU,并管理内存分配。它还通过文件夹结构来组织文件,并通过密码和权限来保证系统安全。


3. Utility Software and Device Drivers | 实用软件与设备驱动程序

Utility software is a type of system software that performs maintenance tasks. It helps keep the computer running efficiently. Examples include disk defragmentation tools, backup software, antivirus programs, and compression tools.

实用软件是一种系统软件,用于执行维护任务,帮助计算机高效运行。例如磁盘碎片整理工具、备份软件、防病毒程序和压缩工具。

A device driver is another type of system software. It acts as a translator between the operating system and a hardware device such as a printer or graphics card. When an application sends a print command, the operating system tells the printer driver, which converts that command into a format the printer can understand.

设备驱动程序是另一种系统软件。它充当操作系统与硬件设备(如打印机或显卡)之间的翻译器。当应用程序发出打印命令时,操作系统通知打印机驱动程序,驱动程序将该命令转换为打印机能够理解的格式。

For IGCSE, remember that antivirus software is often classified as utility software, not application software, even though it appears to “do a task”. Its purpose is to maintain the system, which is a maintenance function.

对于 IGCSE 考试,请记住防病毒软件通常归为实用软件,而不是应用软件,即使它看起来是在“执行任务”。其目的是维护系统本身,属于维护功能。


4. Translators: Compiler, Interpreter, Assembler | 翻译程序:编译器、解释器、汇编器

System software also includes translators. These convert source code written by a programmer into machine code that the CPU can execute. There are three main types: compiler, interpreter, and assembler.

系统软件还包括翻译程序。它们将程序员编写的源代码转换为 CPU 可以执行的机器码。主要有三种类型:编译器、解释器和汇编器。

  • Compiler: translates the whole program in one go, producing an executable file. It reports errors after scanning the entire source code. Machine code is saved for future runs.

  • Interpreter: translates and runs the program line by line. It stops when it finds an error, so execution is slower. No executable file is produced.

  • Assembler: translates low-level assembly language into machine code. Assembly language uses mnemonics such as LDA, ADD, and STO.

中文解释:编译器一次性翻译整个程序并生成可执行文件;解释器逐行翻译并立即运行,遇到错误就停止;汇编器将低级汇编语言转换成机器码。


5. What Is an Interrupt? | 什么是中断?

An interrupt is a signal that tells the processor to stop its current task so that it can deal with a more urgent event. Once the urgent event has been handled, the processor resumes the interrupted task.

中断是一个信号,告诉处理器停止当前任务,以便处理更紧急的事件。紧急事件处理完毕后,处理器会恢复被中断的任务。

Interrupts are an important concept in CIE IGCSE Computer Science. You should be able to give an example of an interrupt and describe how the processor handles it.

中断是 CIE IGCSE 计算机科学中的重要概念。你应该能够举出中断的例子,并描述处理器如何处理它。

CPU receives interrupt → stops task → executes interrupt service routine → resumes previous task

关键流程:CPU 收到中断信号 → 暂停当前任务 → 执行中断服务程序 → 恢复之前的任务。


6. Causes of Interrupts | 中断的起因

Interrupts can come from hardware or software. The table below lists common causes that you may need to identify in an exam.

中断可以来自硬件或软件。下表列出了考试中可能需要识别的常见原因。

Cause Example Type
Power failure Power supply signals the processor to save data before shutdown Hardware
Input/output request A keyboard key is pressed, generating an interrupt Hardware
Division by zero A program attempts an invalid arithmetic operation Software
Timer signal The operating system uses a timer to switch between tasks Hardware/Software
Print request A printer signals that it is ready for data Hardware

Remember: a division by zero error generates an interrupt called a trap, which is caused by software, not hardware.

请记住:除以零错误会产生一个称为陷阱的中断,它由软件引起,而不是硬件。


7. How the Processor Handles an Interrupt | 处理器如何处理中断

When an interrupt occurs, the processor must deal with it quickly. The steps below describe the interrupt handling process as required by the CIE syllabus.

当中断发生时,处理器必须快速处理。以下步骤描述了 CIE 考纲要求的中断处理过程。

  1. The processor finishes the current instruction. It does not stop halfway through a machine code instruction.

  2. The processor checks for interrupts. After each instruction, the control unit checks the interrupt signal. If an interrupt is present, it continues.

  3. The current contents of registers are saved. The processor stores the program counter and other registers so that it can return to the original task later.

  4. The interrupt is identified. The processor determines the source of the interrupt by reading the interrupt vector or checking the device that sent the signal.

  5. The interrupt service routine (ISR) is executed. This is a special program that handles the particular interrupt.

  6. Saved register values are restored. The processor loads the saved program counter and registers.

  7. The original task resumes. The processor continues from where it stopped.

中文解释:处理器完成当前指令后检查中断;若存在中断,则保存寄存器内容、识别中断源、执行中断服务程序,然后恢复寄存器并返回原任务。


8. Interrupt Priorities | 中断优先级

Sometimes more than one interrupt can arrive at the same time. The processor must decide which one to handle first. Each interrupt has a priority, and the one with the highest priority is dealt with first.

有时候多个中断会同时到达。处理器必须决定先处理哪一个。每个中断都有优先级,优先级最高的中断会被首先处理。

For example, a power failure would have a very high priority because the computer may be about to shut down. A keyboard input would have a lower priority.

例如,电源故障具有非常高的优先级,因为计算机可能即将关机。键盘输入则具有较低的优先级。

You might be asked to place interrupts in order of priority. A common order from highest to lowest is:

你可能会被要求按照优先级排列中断。从高到低的一种常见顺序是:

Power failure → Internal computer error → Input/output request → Program error

中文意思:电源故障 → 计算机内部错误 → 输入/输出请求 → 程序错误。


9. Example Exam Question | 考试例题

Here is a typical CIE-style question with a suggested answer.

下面是一道典型的 CIE 风格题目,附有参考答案。

Question: A computer is running a word processor. The user presses a key on the keyboard. Describe how the processor handles the interrupt generated by this key press.

问题: 一台计算机正在运行文字处理器。用户按下了键盘上的一个键。请描述处理器如何处理该按键产生的中断。

Answer: The processor finishes the current instruction. Then it checks for interrupts and detects the keyboard interrupt. It saves the current registers and the program counter. The processor identifies the device that generated the interrupt, which is the keyboard. It loads and executes the interrupt service routine for the keyboard. After the ISR finishes, the processor restores the saved registers and continues running the word processor.

参考答案: 处理器完成当前指令,然后检查中断并检测到键盘中断。它保存当前寄存器和程序计数器。处理器识别出产生中断的设备是键盘,并加载执行键盘的中断服务程序。ISR 执行完毕后,处理器恢复已保存的寄存器,并继续运行文字处理器。


10. Common Misconceptions and Exam Tips | 常见误区与考试提示

Many students confuse the three translators or mix up system and application software. The following tips will help you avoid common mistakes.

许多学生容易混淆三种翻译程序,或将系统软件和应用软件混为一谈。以下提示可以帮助你避免常见错误。

  • Compiler vs interpreter: A compiler translates the whole program before running; an interpreter translates and runs one line at a time. A compiler produces an executable file; an interpreter does not.

  • Don’t forget the assembler: The assembler is used for assembly language, not for high-level languages.

  • Key interrupt steps: Always mention saving registers, identifying the interrupt, and restoring registers. These are the steps that examiners look for.

  • Priority comes before handling: If two interrupts occur together, the CPU performs the highest-priority interrupt first, then the other one.

中文提示:编译器先整段翻译再运行,解释器逐行翻译运行;汇编器专用于汇编语言。答题时务必提到保存寄存器、识别中断、恢复寄存器。同时出现多个中断时,先处理优先级最高的。


11. Summary | 总结

Software can be classified as system software or application software. System software includes the operating system, utility software, device drivers, and translators. Application software performs tasks for the user.

软件可分为系统软件和应用软件。系统软件包括操作系统、实用软件、设备驱动程序和翻译程序。应用软件为用户执行任务。

An interrupt is a signal that causes the processor to pause its current work and run an interrupt service routine. The processor saves registers, identifies the interrupt, handles it, restores the registers, and then resumes the original task. If multiple interrupts occur, the processor handles the highest-priority one first.

中断是一种信号,使处理器暂停当前工作并运行中断服务程序。处理器保存寄存器、识别中断、处理中断、恢复寄存器,然后恢复原任务。如果多个中断同时发生,处理器先处理优先级最高的中断。

Mastering these definitions and processes will help you answer both short-answer and extended-response questions with confidence.

掌握这些定义和过程,你将能够自信地回答简答题和扩展作答题目。


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