당신은 그것을 본 적이 없고, 앞으로도 절대 볼 수 없으나 — 그것은 항상 존재합니다. 당신이 여는 모든 앱, 저장하는 모든 파일, 화면을 터치할 때마다, 보이지 않는…
English narration · English + 中文 subtitles burned in · 영어 내레이션 · 영어 + 중국어 자막 burned-in
5.1
Operating systems · 운영체제
Syllabus
English
Candidates should be able to:
Notes and guidance
Explain why a computer system requires an Operating System (OS)
Explain the key management tasks carried out by the Operating System
Including memory management, file management, security management, hardware management (input/output/peripherals), process management
Show understanding of the need for typical utility software provided with an Operating System
Including disk formatter, virus checker, defragmentation software, disk contents analysis / disk repair software, file compression, back-up software
Show understanding of program libraries
Including: • software under development is often constructed using existing code from program libraries • the benefits to the developer of software constructed using library files, including Dynamic Link Library (DLL) files
한국어
응시자가 다음을 수행할 수 있어야 함:
참고 사항 및 가이드라인
컴퓨터 시스템이 **운영 체제(OS)**를 요구하는 이유를 설명하시오
운영체제(OS)가 수행하는 주요 관리 작업 설명
메모리 관리, 파일 관리, 보안 관리, 하드웨어 관리(입출력/주변기기), 프로세스 관리 포함
운영체제에 제공되는 일반적인 유틸리티 소프트웨어가 필요한 이유에 대한 이해 표시
디스크 포맷터, 바이러스 체크,디스크 분할 정리 소프트웨어, 디스크 내용 분석/복구 소프트웨어, 파일 압축, 백업 소프트웨어 포함
**프로그램 라이브러리(program libraries)**에 대한 이해 표시
• 개발 중인 소프트웨어는 종종 기존 라이브러리의 코드를 사용하여 구축됨 • 라이브러리 파일을 사용하여 소프트웨어를 구축하는 개발자에게 제공하는 이점(예: 동적 링크 라이브러리(DLL) 파일 포함)
Source: Cambridge International syllabus · 출처: Cambridge International syllabus
English
Why a computer needs an OS
Hardware on its own can only fetch and run instructions — it knows nothing about files, programs, networks or users. The operating system 操作系统 (OS) is the software layer that:
manages the hardware (processor 处理器, memory, I/O, storage) for the running programs.
provides services (file system, network, user accounts) through a clear interface, so programs need not talk to the hardware directly.
provides a user interface (command line, GUI, touch).
lets several programs share the hardware safely — each gets fair CPU time and is kept out of the others' memory.
Without an OS, every program would need its own drivers, and only one program could safely run at a time.
"Describe the purpose of an OS" — the five-mark list. The OS (1) provides an interface between the user and the hardware; (2) hides the complexity of the hardware from the user and from application programs; (3) manages the hardware resources — processor time, memory, storage and input/output devices — and shares them between programs; (4) loads application software into memory and runs it, giving every program the same platform to run on; (5) lets several programs run at once (multitasking 多任务处理) while keeping them, and the users' data, secure. Give five different points; "it runs the computer" or "it manages resources" alone earns nothing.
Key management tasks
The syllabus names five. Each point below is one thing the OS actually does, which is what a "describe" question wants.
memory management 内存管理 — allocates memory to each program when it is loaded, keeps every program's memory separate (memory protection 内存保护) so one cannot overwrite another, frees the memory when a program ends, and swaps pages between RAM 随机存取存储器 and secondary storage 辅助存储器 (the disk) (virtual memory 虚拟内存 / paging 分页) so more programs can be open than physical memory allows.
process management 进程管理 — a running program is a process 进程. The OS creates and ends processes, decides which process gets the CPU next (scheduling 调度) and for how long (a time slice 时间片), switches between them, resolves conflicts when two want the same resource, and can kill one that stops responding.
hardware management (input/output and peripherals) — talks to each device through its device driver 设备驱动, queues and buffers data going to slow devices such as a printer, responds to interrupts 中断 from devices, and shares one device between several programs.
file management — creates, names, copies, moves and deletes files and folders, keeps the directory 目录 structure and a record of where each file is stored on the disk, allocates disk space to files, and enforces access rights 访问权限 (read / write / execute) for each user.
security management — user accounts and passwords (authentication 身份验证), access rights, encryption of stored data, a firewall, automatic security updates, and a log of who did what.
How memory and process management support multitasking (a four-mark favourite). Memory management loads several programs into memory at the same time, each in its own protected area, and keeps track of which addresses belong to which; process management shares the processor between them — each process runs for a time slice, the OS saves its state and switches to the next, and the switching is so fast that all the programs appear to run together. Interrupts let the OS take the processor back from a process whenever a device needs attention.
Interrupts. A hardware interrupt 硬件中断 comes from a device: a key pressed, a mouse click, a printer out of paper, a disk finishing a transfer, a power failure. A software interrupt 软件中断 comes from a program: division by zero, an invalid instruction, an attempt to use memory it does not own, or a request for an OS service. The OS's interrupt handler 中断处理程序 saves the state of the running process, deals with the interrupt, then restores the process (topic 4 covers the fetch–execute detail).
Utility software
Utility programs 实用程序 are system software that maintain, repair or optimise the computer rather than doing a user's task; the examiner accepts "performs a specific maintenance task that improves performance or security". Most OSes bundle these:
disk formatter — prepares a new disk (or wipes an old one) for use: sets up its file system and partitions, deleting any existing data.
virus checker (antivirus 杀毒软件) — scans files and memory, compares code against a database of known virus signatures 签名 and watches for suspicious behaviour, then quarantines or deletes what it finds; runs on a schedule and on every download, and needs updating as new viruses appear.
defragmentation software (disk defragmenter 碎片整理) — a hard disk stores a file in whatever free blocks it finds, so after many saves and deletes a file is scattered (fragmented 碎片化) across the platter and the read/write head must jump between the pieces. The defragmenter moves the pieces of each file next to each other and gathers the free space into one region, so files load faster and new files are not fragmented. Not needed on an SSD, which has no moving head.
disk contents analysis / disk repair software — shows what is using the disk space (large, duplicate or temporary files) so they can be removed; finds and repairs bad sectors, lost clusters and file-system errors.
file compression (compression 压缩) — shrinks files so they need less storage and transfer faster; archiving bundles many files into one.
back-up software (backup 备份) — copies files to another medium (external disk, network, cloud) on a schedule so data can be restored after loss, corruption or a ransomware attack; a full copy is followed by incremental backups 增量备份 of only what changed.
a firewall 防火墙 (filters network traffic by rules) and encryption tools, for security; a system monitor and automatic updates.
Bundling these with the OS saves the user installing each one.
Which utility does what.Performance: defragmentation (faster file access), disk repair (a disk with errors is slow or fails), disk contents analysis (free space by deleting junk), compression (more fits on the disk). Security: virus checker, firewall, encryption, and backup (the only recovery from ransomware). A "draw one line" question pairs each utility with exactly one purpose — learn the pairs above and use the syllabus names.
Worked example. Explain how defragmentation can improve the performance of a computer (3 marks).
Over time a file is stored in blocks scattered across the hard disk, so reading it needs many movements of the read/write head. The defragmenter rearranges the blocks so each file is stored contiguously and the free space is together. Files are then read with fewer head movements, so they load faster, and new files can be written into one continuous space.
한국어
컴퓨터가 OS를 필요로 하는 이유
하드웨어만으로는 지시어를 가져오고 실행할 수 있을 뿐이며, 파일, 프로그램, 네트워크 또는 사용자에 대해 아무것도 알지 못합니다. 운영체제(OS) 는 다음과 같은 역할을 하는 소프트웨어 계층입니다:
하드웨어를 관리합니다(프로세서, 메모리, I/O, 저장 장치) — 실행 중인 프로그램들을 위해.
서비스 제공 (파일 시스템, 네트워크, 사용자 계정)을 명확한 인터페이스를 통해 수행하므로, 프로그램이 하드웨어에 직접 접근할 필요가 없습니다.
사용자 인터페이스 제공 (명령줄, GUI, 터치).
여러 프로그램이 하드웨어를 안전하게 공유하도록 합니다 — 각 프로그램은 공정한 CPU 시간을 확보하며 다른 프로그램의 메모리 영역에侵入되지 않습니다.
OS가 없으면 모든 프로그램이 자체 드라이버를 가져야 하며, 동시에 안전하게 실행될 수 있는 프로그램은 하나뿐입니다.
"OS의 목적 설명" — 5점 만점 목록. OS는 (1) 사용자와 하드웨어 사이에 인터페이스를 제공합니다; (2) 하드웨어의 복잡성을 사용자와 플리케이션 프로그램으로부터 숨깁니다; (3) 하드웨어 리소스 관리 — 프로세서 시간, 메모리, 저장 장치 및 입출력 장치 — 를 수행하여 프로그램 간에 공유합니다; (4) 애플리케이션 소프트웨어를 메모리에 로드하고 실행하여 모든 프로그램이 동일한 플랫폼에서 실행되도록 합니다; (5) 여러 프로그램을 동시에 실행하게 하여 (멀티태스킹) 그들과 사용자의 데이터를 안전하게 유지합니다. 다섯 가지 서로 다른 포인트를 제시하십시오. "컴퓨터를 실행한다" 또는 "리소스를 관리한다"와 같이 단일 표현만으로는 점수를 받을 수 없습니다.
데스크톱 운영체제는 사용자를 위해 화면, 파일 및 프로그램을 관리합니다휴대폰 역시 반드시 필요합니다: 이것이 모바일 운영체제인 Android입니다
핵심 관리 작업
교과 과정에서는 다섯 가지를 언급합니다. 아래 각 항목은 OS가 실제로 수행하는 하나의 기능이며, 이는 "설명" 문제에서 요구하는 내용입니다.
메모리 관리 — 프로그램이 로드될 때 메모리를 할당하고, 각 프로그램의 메모리를 분리하여(메모리 보호)其中一个가 다른 것을 덮어쓸지 못하게 하며, 프로그램이 종료되면 메모리를 반환하고, RAM과 보조 저장 장치(디스크) 사이에서 페이지를 스왑하여(가상 메모리 / 페이지링) 물리적 메모리보다 더 많은 프로그램을 열 수 있게 합니다.
프로세스 관리 — 실행 중인 프로그램은 프로세스입니다. OS는 프로세스를 생성하고 종료하며, 다음에 어떤 프로세스가 CPU를 사용할지 결정하고(스케줄링) 그 기간(타임 슬라이스)을 설정하며, 프로세스 간을 전환하고, 두 개 이상의 프로세스가 동일한 리소스를 요청했을 때 충돌을 해결하며, 응답하지 않는 프로세스를 강제 종료할 수 있습니다.
하드웨어 관리 (입출력 및 주변기기) — 각 장치를 통해 장치 드라이버로 통신하며, 프린터와 같은 느린 장치로 보내지는 데이터를 대기열에 넣고 버퍼링하며, 장치로부터 오는 중단(interrupt) 에 대응하고, 하나의 장치를 여러 프로그램이 공유하게 합니다.
파일 관리 — 파일과 폴더를 생성, 명명, 복사, 이동 및 삭제하며, 디렉토리 구조와 각 파일이 디스크의 어디에 저장되어 있는지 기록을 유지하고, 파일에 디스크 공간을 할당하며, 각 사용자에게 접근 권한(읽기 / 쓰기 / 실행)을 부과합니다.
보안 관리 — 사용자 계정 및 비밀번호(인증), 접근 권한, 저장된 데이터의 암호화, 방화벽, 자동 보안 업데이트, 그리고 누가 무엇을 했는지의 로그 기록.
운영체제가 관리하는 주요 업무메모리 보호는 각 애플리케이션을 별도의 메모리 블록에 고정시킵니다
메모리와 프로세스 관리가 멀티태스킹을 지원하는 방법 (4점 빈출 문제). 메모리 관리는 여러 프로그램을 동시에 메모리에 로드하여 각자가 보호된 영역에 배치하고, 어떤 주소가谁的에게 속하는지를 추적합니다. 프로세스 관리는 프로세서를 공유하여 각 프로세스가 타임 슬라이스만큼 실행되고, OS가 상태를 저장한 후 다음 프로세스로 전환하며, 이 전환 속도가 매우 빠르므로 모든 프로그램이 동시에 실행되는 것처럼 보입니다. 중단은 장치가 주의를 요할 때마다 OS가 프로세스로부터 프로세서를 다시 가져오게 합니다.
중단.하드웨어 중단은 장치에서 발생합니다: 키를 누름, 마우스 클릭, 프린터 용지 고갈, 디스크 전송 완료, 전원 단절 등. 소프트웨어 중단은 프로그램에서 발생합니다: 0으로 나누기, 유효하지 않은 명령어, 소유하지 않은 메모리 사용 시도, 또는 OS 서비스 요청 등. OS의 중단 핸들러는 실행 중인 프로세스의 상태를 저장하고, 중단을 처리한 후 프로세스를 복원합니다 (주제 4에서는 FETCH-EXECUTE 세부 사항을 다룹니다).
유틸리티 소프트웨어
유틸리티 프로그램은 사용자의 특정 작업을 수행하기보다 컴퓨터를 유지, 수리 또는 최적화하는 시스템 소프트웨어입니다; 시험관은 "성능이나 보안을 향상시키는 구체적인 유지 관리 작업을 수행함"이라는 표현을 인정합니다. 대부분의 OS에는 이러한 프로그램들이 함께 제공됩니다:
유틸리티 프로그램: 안티바이러스, 백업, 압축 및 디프래그멘테이션
디스크 포맷터 — 새 디스크를 사용 가능하게 준비하거나(또는 기존 디스크를 지움): 파일 시스템과 파티션을 설정하며, 기존 데이터를 삭제합니다.
바이러스 체크 (안티바이러스) — 파일을 스캔하고 메모리를 검사하며, 코드를 알려진 바이러스 서명 데이터베이스와 비교하고 의심스러운 동작을 감시한 후, 발견된 것을 격리하거나 삭제합니다; 일정에 따라 실행되며 모든 다운로드 시에도 실행되며, 새로운 바이러스가 등장함에 따라 업데이트가 필요합니다.
fragmentation 정리 소프트웨어(디스크 디프래그멘터) — 하드 디스크는 사용 가능한 빈 블록에 파일을 저장하므로, 여러 번의 저장 및 삭제 후 파일이 플레터 전체에 산재하게 되며(fragmented), 읽기/쓰기 헤드는 각 조각 사이를 이동해야 합니다. 디프래그멘터는 각 파일의 조각을 옆으로 모으고 자유 공간을 하나의 영역으로 합쳐, 파일을 더 빠르게 로드하고 새 파일이 단편화되지 않도록 합니다. 움직이는 헤드가 없는 SSD에서는 필요 없습니다.
디스크 내용 분석 / 디스크 수리 소프트웨어 — disk 공간 사용 현황(대용량, 중복 또는 임시 파일)을 표시하여 제거할 수 있게 하고, 나쁜 섹터(bad sectors), 분실된 클러스터 및 파일 시스템 오류를 찾아 수리합니다.
파일 압축(compression) — 파일을 작게 만들어 저장 공간 부족을 줄이고 전송 속도를 높이며; 아카이빙은 여러 파일을 하나로 묶습니다.
백업 소프트웨어(backup) — 일정에 따라 파일을 다른 매체(외장 디스크, 네트워크, 클라우드)로 복사하여 데이터 분실, 손상 또는 랜섬웨어 공격 후 복원할 수 있게 합니다; 완전 백업 이후에는 변경된 부분만 백업하는 증분 백업(incremental backups) 이 수행됩니다.
보안 목적의 파이어월(규칙에 따른 네트워크 트래픽 필터링) 및 암호화 도구, 시스템 모니터 및 자동 ** 업데이트**입니다.
OS와 함께 제공되면 사용자가 각 프로그램을 개별적으로 설치할 필요가 없습니다.
각 틸리티의 역할.성능: 디프래그멘터(파일 접근 속도 향상), 디스크 수리(오류가 있는 디스크는 느리거나 고장남), 디스크 내용 분석(불필요한 파일 삭제로 공간 확보), 압축(더 많은 데이터를 디스크에 담음). 보안: 바이러스 체크, 파이어월, 암호화, 백업(랜섬웨어에 대한 유일한 복구 방법). "선 그리기" 유형 문제에서는 각 유틸리티를 정확한 용도와 한 쌍으로 연결해야 하므로 위 쌍과 교육 과정 명칭을 숙지하십시오.
해설 예제. 디프래그멘테이션이 컴퓨터 성능을 개선하는 원리를 설명하시오 (3점).
시간이 지날수록 파일은 하드 디스크 전체에 흩어진 블록에 저장되어 읽기 위해 읽기/쓰기 헤드의 여러 이동이 필요합니다. 디프래그멘터는 블록을 재배치하여 각 파일이 연속적으로(contiguously) 저장되고 자유 공간도 모이도록 하며, 이로 인해 파일读取 시 헤드 이동 수가 줄어들어 더 빠르게 로드되고 새 파일은 연속된 공간에 쓸 수 있습니다.
Explore · 탐색하기
Where the operating system sits · 운영체제가 위치하는 곳
Tap each layer. The OS is the middle layer — it sits between your applications and the hardware, sharing the machine safely so programs never touch the hardware directly. · 각 계층을 터치하시오. OS는 중간 계층이다. 사용자 애플리케이션과 하드웨어 사이에 위치하여 기계 자원을 안전하게 공유하므로 프로그램은 하드웨어에 직접 접근하지 않는다.
A program library 程序库 is pre-written code (subroutines 子程序, classes, modules) that programs reuse instead of writing it themselves — e.g. a maths library, a network library, a graphics library.
Benefits: saves time (off-the-shelf code), reliable (well-tested, widely used), and standardised (consistent behaviour).
The examiner's benefit list, for the developer. The library routines 库例程 are already written and tested, so development is faster and cheaper; they are reliable and, being used by many programs, largely error-free; the developer needs no expertise in that area (graphics, compression, encryption, path-finding); the program is easier to maintain because common code lives in one place; and a whole team can use the same routines, giving consistent results. Drawbacks: a routine may not do exactly what you need and you cannot change it; your program depends on the library being available, correct and secure — a bug or a security hole in the library is a bug in your program; and you must learn how to call it.
a static library 静态库 is copied into the executable at compile time (stands alone, but larger and needs rebuilding to update).
a dynamic library 动态库 (DLL, Dynamic Link Library; .so) is loaded at run time (smaller executables, shared by many programs, updated once for all).
Dynamic Link Library (DLL) files. A DLL is a library that is loaded into memory only when a program calls it, at run time, and stays as a separate file rather than being copied into the executable. Benefits: the executable is smaller; several running programs share one copy of the DLL in memory; a DLL can be updated (bug fix, new device) without recompiling the programs that use it; and memory is used only while the routine is needed. Drawbacks: the program will not run if the DLL is missing, moved or the wrong version; an updated DLL can break a program that relied on the old behaviour; and a fake DLL put in its place runs with the program's rights.
Worked example. A team writing the software for a restaurant robot uses a program library that includes a routine to find the shortest path between tables. Explain two benefits and one drawback to the team.
Benefits: the routine is already written and tested, so the team saves time and can trust the result; the team need not understand path-finding algorithms themselves and can spend the time on the robot's own features. Drawback: the routine may not handle the restaurant's exact needs (moving chairs, one-way aisles) and the team cannot alter it, so they may have to work around its limits.
한국어
프로그램 라이브러리는 사전에 작성된 코드(서브루틴, 클래스, 모듈)로, 프로그래머가 직접 쓰지 않고 재사용하는 것 — 예: 수학 라이브러리, 네트워크 라이브러리, 그래픽 라이브러리 등.
새로운 프로그램이 라이브러리에서 완성된 루틴을 재사용하는 모습
장점: 시간 절약(완성된 코드 사용), 신뢰성(잘 검증됨, 널리 사용됨), 표준화(일관된 동작).
개발자를 위한 시험관의 장점 목록.라이브러리 루틴은 이미 작성되고 테스트되었으므로 개발 속도가 빠르고 비용이 적으며, 신뢰성이 높고 수많은 프로그램에서 사용되어 오류가 거의 없습니다. 개발자는 해당 분야(그래픽, 압축, 암호화, 경로 탐색 등)에 대한 전문 지식이 필요 없으며, 공통 코드가 한 곳에 있어 유지보수가 쉽고, 팀 전체가 동일한 루틴을 사용하여 일관된 결과를 얻을 수 있습니다. 단점: 특정 루틴이 정확히 필요한 기능을 수행하지 않을 수 있으며 수정할 수도 없습니다. 프로그램이 해당 라이브러리의 가용성, 정확성, 보안에 의존하므로 라이브러리에 버그나 보안 취약점이 있으면 그것은 곧 프로그램의 버그가 됩니다. 또한 호출 방법을 배워야 합니다.
**정적 라이브러리(static library)**는 컴파일 시 실행 파일에 복사됩니다(독립적이지만 크기가 크고 업데이트를 위해 다시 컴파일해야 함).
동적 라이브러리(DLL, Dynamic Link Library; .so)는 실행 시 로딩됩니다(실행 파일이 작고 여러 프로그램에서 공유되며, 한 번 업데이트하면 모든 프로그램에 반영됨).
정적: 라이브러리가 실행 파일에 복사됨. 동적: 공유 라이브러리 파일이 실행 시 로딩됨
동적 링크 라이브러리(DLL) 파일. DLL은 프로그램이 호출할 때만 메모리에 로딩되는 라이브러리로, 실행 시간(run time) 에 작동하며 실행 파일에 복사되지 않고 별도의 파일로 남습니다. 장점: 실행 파일이 작아지고, 여러 실행 중인 프로그램이 메모리의 단일 DLL 사본을 공유하며, DLL을 업데이트(버그 수정, 신규 장치 지원)해도使用该程序无需重新编译,且内存仅在 루틴이 필요할 때 사용됩니다. 단점: DLL이 누락되거나 이동되거나 버전이 잘못되면 프로그램이 실행되지 않으며, 업데이트된 DLL은 이전 동작에 의존하던 프로그램을 고장나게 할 수 있고, 위조 DLL이 대체로 insertion되면 해당 프로그램의 권한으로 실행됩니다.
해설 예제. 레스토랑 로봇 소프트웨어를 개발하는 팀이 테이블 간 최단 경로를 찾는 루틴이 포함된 프로그램 라이브러리를 사용합니다. 이 팀에게 적용되는 장점 두 가지와 단점 하나를 설명하시오.
장점: 루틴은 이미 작성되고 테스트되었으므로 팀은 시간을 절약하고 결과의 신뢰성을 기대할 수 있으며, 경로 탐색 알고리즘 자체를 이해할 필요 없이 로봇의 고유 기능 개발에 집중할 수 있습니다. 단점: 루틴이 레스토랑의 정확한 요구사항(의자 이동, 단방향 통로 등)을 처리하지 못할 수 있으며 팀은 이를 수정할 수 없으므로 그 한계를 우회하는 작업을 해야 할 수 있습니다.
Explore · 탐색하기
Computing concept lab · 컴퓨팅 개념 실험실
Classify concrete examples by the computing idea they demonstrate. · 구체적인 예시를 그들이 시연하는 컴퓨팅 개념에 따라 분류하십시오.
Show understanding of the need for: • assembler software for the translation of an assembly language program • a compiler for the translation of a high-level language program • an interpreter for translation and execution of a high-level language program
Explain the benefits and drawbacks of using either a compiler or interpreter and justify the use of each
Show awareness that high-level language programs may be partially compiled and partially interpreted, such as Java (console mode)
Describe features found in a typical Integrated Development Environment (IDE)
Including: • for coding, including context-sensitive prompts • for initial error detection, including dynamic syntax checks • for presentation, including prettyprint, expand and collapse code blocks • for debugging, including single stepping, breakpoints, i.e. variables, expressions, report window
한국어
응시자가 다음을 수행할 수 있어야 함:
참고 사항 및 가이드라인
다음에 대한 필요성을 이해하고 있음을 보여주시오: • 어셈블리 언어 프로그램의 번역을 위한 어셈블러 소프트웨어 • 고급 언어 프로그램의 번역을 위한 컴파일러 • 고급 언어 프로그램의 번역 및 실행을 위한 인터프리터
컴파일러 또는 인터프리터를 사용하는 장단점을 설명하고 각각의 사용을 정당화하시오
고수준 언어 프로그램은 부분적으로 컴파일되고 부분적으로 해석될 수 있음을 인지하기 (예: Java 콘솔 모드)
일반적인 **통합 개발 환경(IDE)**에서 발견되는 기능 설명
• 코딩을 위한 기능(컨텍스트 민감 프롬프트 포함) • 초기 오류 감지를 위한 기능(동적 구문 검사 포함) • 표현을 위한 기능(프리프린트(prettyprint), 코드 블록 확장 및 축소 포함) • 디버깅을 위한 기능(싱글 스텝, breakpoints, 즉 변수, 식, 보고서 창 포함)
Source: Cambridge International syllabus · 출처: Cambridge International syllabus
English
You write source code; the computer runs machine code 机器码. A translator 翻译器 converts between them.
Assembler
An assembler 汇编器 translates assembly language 汇编语言 into machine code: each mnemonic instruction (LDD, ADD, JMP) becomes exactly one machine-code instruction, and symbolic addresses and labels are replaced by real addresses. It is needed because the processor executes only machine code, and assembly is used where the programmer needs direct control of the hardware (embedded systems, device drivers).
Compiler
A compiler 编译器 translates a high-level program into machine code once, before it runs.
it reports all errors at compile time; once clean, it produces a stand-alone executable 可执行文件 that runs without the compiler installed and can be run many times.
generally faster at run time (no translation while running), but tied to one CPU/OS — recompile for each platform.
The two-mark description: a compiler translates the whole high-level program into machine code (object code 目标代码) before it is run, produces an executable file, and reports all the syntax errors together as a list at the end of translation. It does not run the program.
Interpreter
An interpreter 解释器 translates and runs a high-level program one line at a time, producing no executable.
it reports an error when it reaches that line, then stops; you can fix it and continue — good for development.
the interpreter must be installed to run the program; generally slower (each run re-translates), but easy to port across platforms.
The two-mark description: an interpreter translates one statement of the high-level program at a time and executes it immediately before moving to the next; no executable file is produced; it stops at the first error it meets and reports it. Both the source code and the interpreter must be present every time the program runs.
Choosing between them
Use a compiler when:
Use an interpreter when:
run-time speed matters
you want fast edit–run cycles
distributing to users without dev tools
writing cross-platform scripts
the program runs many times
the program is small or run once
teaching beginners
Benefits and drawbacks, as the mark scheme lists them.
compiler
interpreter
execution speed
fast — already machine code
slower — translated on every run
what the user needs
only the executable; no translator, and the source code stays private
the source code and the interpreter
finding errors
all errors listed at once, after the whole program is translated
each error reported at the line where it occurs, as you develop
changing the code
recompile the whole program after every change
edit and run again immediately
portability
machine code runs on one platform only; recompile for each
the same source runs wherever an interpreter exists
Worked example. A developer uses an interpreter while writing a program and a compiler when it is finished. Explain how each is used (4 marks).
During development the interpreter runs the partly written program at once, without waiting for a complete translation; when it meets an error it reports the line, so the developer fixes it and runs again immediately — a fast edit–run cycle that is easier for debugging. When the program is finished, the compiler translates the whole program into an executable that runs faster, needs no translator on the user's computer, and does not reveal the source code, so it can be sold to the public.
Hybrid: Java
Java is compiled into bytecode 字节码 (a platform-independent intermediate form), which a virtual machine 虚拟机 (the JVM) then interprets — or uses just-in-time compilation 即时编译 to turn hot parts into native code. So errors are caught early, the bytecode runs anywhere with a JVM ("write once, run anywhere"), and long-running programs reach near-native speed. C# and Python use similar designs.
The syllabus phrase is "partially compiled and partially interpreted": the compiler stage catches syntax errors and produces compact, portable 可移植的 bytecode; the interpreting stage lets that one bytecode file run on any machine that has a virtual machine, at the cost of some speed. Java in console mode (a text program run from the command line) is the syllabus's example.
Worked example. Java source is compiled to bytecode, which a JVM then interprets. Why use both, instead of compiling straight to machine code? A compiler produces machine code for one processor and operating system, so a program compiled on one machine will not run on another. Java's compiler instead targets a virtual machine, so the bytecode it produces is identical everywhere; each platform then supplies its own JVM to interpret that bytecode into its own native instructions. One compiled file therefore runs anywhere a JVM exists - "write once, run anywhere". The price is speed: interpreting bytecode is slower than running native code, which is why a real JVM also uses JIT compilation to turn frequently-run bytecode into native code while the program runs. Name both sides - the marks are for portability bought at the cost of speed.
한국어
출력 소스 코드를 작성하고 컴퓨터는 기계어(machine code) 를 실행합니다. 번역기(translator) 는 이 둘 사이를 변환합니다.
어셈블러
어셈블러는 어셈블리 언어를 기계어로 변환합니다: 각(elemetic) 지시문(LDD, ADD, JMP)은 정확히 하나의 기계어 지시문으로 변환되며, 기호 주소와 레이블은 실제 주소로 대체됩니다. 프로세서는 기계어만 실행하므로 어셈블리가 필요하며, 프로그래머가 하드웨어를 직접 제어해야 할 때(임베디드 시스템, 장치 드라이버) 어셈블리를 사용합니다.
컴파일러
컴파일러는 고수준 프로그램을 실행 전에 단 한 번 기계어로 변환합니다.
컴파일 시점의 모든 오류를 보고하며, 문제 없이 완료되면 컴파일러가 설치되지 않은 상태에서도 실행 가능한 단일 실행 파일을 생성하여 여러 번 실행할 수 있습니다.
실행 중에는 변환 작업이 없으므로 일반적으로 실행 속도가 빠르지만, 특정 CPU/OS에만 해당하므로 플랫폼마다 재컴파일이 필요합니다.
2점 설명: 컴파일러는 실행 전고수준 프로그램 전체를 기계어(오브젝트 코드)로 변환하여 실행 파일을 생성하며, 번역 후最後に所有的语法错误作为列表报告합니다. 이程序是执行。
인터프리터
인터프리터는 고수준 프로그램을 한 줄씩 변환하여 실행하며, 실행 파일을 생성하지 않습니다.
해당 줄에 도달했을 때 오류를 보고하고 멈춥니다; 수정 후 계속 진행할 수 있으므로 개발에 적합합니다.
프로그램을 실행하려면 인터프리터가 반드시 설치되어 있어야 하며, 일반적으로 속도가 느립니다(매 실행 시 재변환), 그러나 플랫폼 간 이식성이 용이합니다.
2점 설명: *인터프리터는 고수준 프로그램의 명령 하나를 매번 변환하여 즉시 실행한 다음 다음 단계로 넘어갑니다; 실행 파일이 생성되지 않으며, 처음 encountered 오류에서 멈추고 이를 보고합니다. 프로그램 실행 시마다 소스 코드와 인터프리터가 모두 존재해야 합니다.
컴파일러는 한 번 변환하여 독립적인 프로그램으로 만듭니다; 인터프리터는 한 줄씩 변환하며, 매 실행 시에도 적용됩니다
선택 기준
컴파일러 사용 시:
인터프리터 사용 시:
실행 속도 중요
빠른 편집-실행 사이클 필요
개발 도구 없는 사용자에게 배포
크로스 플랫폼 스크립트 작성
프로그램이 여러 번 실행됨
프로그램이 작거나 한 번만 실행됨
초급자 교육
장단점: 채점 기준서에 나열된 내용.
컴파일러
인터프리터
행 속도
빠름 — 이미 기계어 상태임
느림 — 매 실행 시 번역됨
사용자에게 필요한 것
실행 파일만 필요; 번역기 불필요, 소스 코드는 비공개 유지
소스 코드와 인터프리터
오류 발견
전체 프로그램이 번역된 후 모든 오류를 한 번에 표시
개발 중 오류 발생 줄을 즉시 보고함
코드 변경
변경 후 매번 전체 재컴파일
수정 후 즉시 다시 실행 가능
이식성
기계어는 특정 플랫폼에서만 실행되며, 플랫폼마다 재컴파일 필요
인터프리터가 있는 곳이라면 동일한 소스 코드가 어디서나 실행 가능
해설 예제. 개발자가 프로그램을 작성할 때는 인터프리터를 사용하고, 완성된 후에는 컴파일러를 사용합니다. 각 도구를 어떻게 사용하는지 설명하십시오(4 점).
개발 단계에서 인터프리터는 완전한 번역을 기다리지 않고 작성 중인程序的을 즉시 실행합니다. 오류가 발생하면 해당 줄을 보고하므로, 개발자는 즉시 수정하고 다시 실행하여 빠른 수정-실행 사이클을 형성하며 디버깅이 용이합니다. 프로그램이 완성되면 컴파일러는 전체 프로그램을 더 빠르게 실행 가능한 실행 파일로 번역하며, 사용자의 컴퓨터에는 번역기가 필요 없고 소스 코드도 공개되지 않아 대중에게 판매할 수 있습니다.
하이브리드: 자바(Java)
자바는 바이트코드(플랫폼 독립적 중간 형식)로 컴파일되며, 이를 가상 머신(JVM)이 해석하거나 Just-in-Time(JIT) 컴파일을 통해hot parts를 네이티브 코드로 변환합니다. 따라서 초기에 오류를 검출할 수 있으며, JVM이 있는 곳이라면 바이트코드를 어디서나 실행할 수 있어(
교수요구사항의 표현은 '부분적으로 컴파일되고 부분적으로 해석된다'입니다: 컴파일 단계에서는 문법 오류를 검출하고 작고 이식성을 갖춘 바이트코드를 생성하며, 해석 단계에서는 하나의 바이트코드 파일을 가상 머신이 있는 모든 기기에서 실행할 수 있게 합니다(단, 속도는 다소 떨어집니다). 콘솔 모드(명령줄에서 실행되는 텍스트 프로그램)의 자바가教授的요구사항의 대표 사례입니다.
자바는 이식성 있는 바이트-code으로 컴파일되며 모든 JVM에서 실행됩니다 — 한 번 작성하면 어디서나 실행 가능
해설 예제. 자바 소스 코드는 바이트코드로 컴파일되고, 이를 JVM이 해석합니다. 왜 기계어로 직접 컴파일하지 않고 두 가지 방식을 모두 사용하는가? 컴파일러는 특정 하나의 프로세서와 운영체제를 위해 기계어를 생성하므로, 한 기기에서 컴파일된 프로그램은 다른 기기에서 실행되지 않습니다. 반면 자바 컴파일러는 가상 머신을 타겟으로 하므로, 생성된 바이트코드는 어디나 동일합니다. 각 플랫폼은 자체 JVM을 제공하여 해당 바이트코드를 자신의 네이티브 명령어로 해석합니다. 따라서 컴파일된 파일 하나면 JVM이 있는 곳이라면 어디서나 실행 가능합니다 —
Explore · 탐색하기
The compiler route: source to running program · 컴파일러 경로: 소스 코드부터 실행 가능한 프로그램까지
Step through how a compiler works — translating the whole program once, before it runs. Contrast it with an interpreter, which translates and runs one line at a time. · 컴파일러가 어떻게 작동하는지를 단계별로 살펴보십시오 — 실행 전에 전체 프로그램을 한 번에 번역합니다. interpreter는 줄 단위로 번역하고 실행하므로 이와 대비하여 설명하십시오.
Integrated Development Environment (IDE) · 통합 개발 환경 (IDE)
English
An integrated development environment 集成开发环境 (IDE) brings the tools to write, test and debug code into one application:
The syllabus groups the features into four kinds. Learn which feature belongs to which, because questions ask you to sort them and to describe one from each group.
For coding:context-sensitive prompts 上下文相关提示 — as you type, the IDE pops up the identifiers, keywords or parameters that fit at that point in the code; auto-complete 自动补全 finishes the name for you; automatic indentation and bracket matching keep the layout right as you type.
For initial error detection:dynamic syntax checks 动态语法检查 — the editor checks the syntax as you type and underlines or highlights a mistake immediately, before the program is translated; after translation, error messages with line numbers.
For presentation:prettyprint 代码美化 — keywords, identifiers, strings and comments shown in different colours or fonts (syntax highlighting 语法高亮) with consistent indentation, so the structure is visible at a glance; expand and collapse code blocks — hide the body of a loop, an IF or a subroutine so you see the outline.
For debugging:breakpoints 断点 — the program pauses when it reaches a marked line; single stepping 单步执行 — from the pause, run one line at a time; a window that shows the current values of variables and expressions as they change; and a report window 报告窗口 that lists errors, warnings and output.
Other features: translator integration (compile or run with one key, errors shown inline), a debugger 调试器 that drives the debugging features above, version control 版本控制 integration (git), project management, a help system, refactoring 重构 tools (safe renaming) and unit test 单元测试 integration.
An IDE speeds development by putting writing → running → debugging → fixing behind one interface. Common IDEs: Visual Studio, PyCharm, Eclipse, VS Code.
Worked example. A function Calculate() returns an unexpected value when the program runs. Describe how the debugging features of a typical IDE help find the cause (4 marks).
Set a breakpoint on the first line of Calculate(), so the program pauses there instead of running through. Then single-step through the function one line at a time. After each step read the values of the variables and of any expression you have asked the IDE to watch, and compare them with the values you expected; the first line after which a value is wrong is where the logic error is. The report window shows any run-time error message and the output produced so far.
Worked example. Put each feature in its syllabus group: prettyprint, context-sensitive prompt, dynamic syntax check, breakpoint, expand/collapse code blocks, report window.
통합 개발 환경(IDE)은 코드를 작성, 테스트 및 디버깅하는 도구를 하나의 애플리케이션으로 통합합니다:
*IDE는 에디터, 실행 버튼, 디버거를 묶음으로 제공합니다
교수요서는 기능을 네 가지 유형으로 분류합니다. 각 기능이 어떤 유형에 속하는지 학습해야 합니다. 문제에서 이를 분류하라는 지시와 각 그룹에서 하나씩 설명하라는 지시가 있기 때문입니다.
코딩을 위한 기능:문맥 기반 프롬프트 — 입력 시 IDE가 해당 지점에 적합한 식별자, 키워드 또는 매개변수를 팝업합니다; 자동 완성이 이름을 자동으로 완성해 줍니다; 자동 줄바꿈 및 괄호 매칭은 입력 중 레이아웃이 올바르게 유지되게 합니다.
초기 오류 탐지를 위한 기능:동적 구문 검사 — 에디터가 입력 중 구문을 확인하여 프로그램이 번역되기 전에 즉시 오류를 하선 처리하거나 강조 표시하며, 번역 후에는 줄 번호가 포함된 오류 메시지를 제공합니다.
표출을 위한 기능:구문 강조 표시(prettyprint) — 키워드, 식별자, 문자열, 주석이 서로 다른 색상이나 서체로 표시되며(구문 강조), 일관된 줄바꿈을 통해 구조를 한눈에 볼 수 있습니다; 코드 블록 확장 및 축소 — 루프, IF 문, 서브루틴의 본체를 숨겨 개요만 보도록 합니다.
디버깅을 위한 기능: ** breakpoints(중단점)** — 프로그램이 표시된 줄에 도달하면 일시 정지합니다; 단일 스텝(single stepping) — 일시 정지 상태에서 줄 단위로 실행합니다; 변수와 표현식의 현재 값이 변화함에 따라 보여주는 패널; 그리고 오류, 경고, 출력을 나열하는 보고서 창(report window).
기타 기능: 번역기 통합(한 번의 키 입력으로 컴파일 또는 실행, 인라인 오류 표시), 위 디버깅 기능을 제어하는 디버거, 버전 관리 통합(git), 프로젝트 관리, 도움말 시스템, 리팩토링 도구(안전한 이름 변경) 및 유닛 테스트 통합.
*IDE에는 교수요서에 명시된 명칭들이 화면에서 볼 수 있는 위치에 표시됨
IDE는 작성 → 실행 → 디버깅 → 수정 과정을 단일 인터페이스 뒤에서 수행함으로써 개발 속도를 높입니다. 일반적인 IDE: Visual Studio, PyCharm, Eclipse, VS Code.
*디버거: 중단점을 설정하고 실행한 후 변수를 조사하기 위해 일시 정지하며 코드를 줄 단위로 탐색함
작업 예제. 함수 Calculate()가 프로그램 실행 시 예상치 못한 값을 반환합니다. 일반 IDE의 디버깅 기능이 원인을 찾는 데 어떻게 도움이 되는지 설명하십시오 (4점).
Calculate()의 첫 줄에 중단점을 설정하여 프로그램이 전체를 실행하지 않고 해당 지점에서 일시 정지하게 합니다. 그런 다음 단일 스텝으로 함수를 줄 단위로 탐색합니다. 각 스텝 후 IDE가 모니터하도록 요청한 변수 및 표현식의 값을 읽고,预期的인 값과 비교합니다. 값이 틀려지는 첫 번째 줄 바로 뒤에 논리 오류가 존재합니다. 보고서 창은 실행 중 오류 메시지 및 지금까지 생성된 출력을 보여줍니다.
작업 예제. 각 기능을 교수요서 그룹에 배치하십시오: prettyprint, 문맥 기반 프롬프트, 동적 구문 검사, breakpoint, 코드 블록 확장/축소, 보고서 창.
코딩: 문맥 기반 프롬프트. 초기 오류 탐지: 동적 구문 검사. 표출: prettyprint, 코드 블록 확장/축소. 디버깅: breakpoint, 보고서 창.
A definition question is marked against fixed wording. Learn these exactly, and give one answer only.
Term
Definition
operating system
software that manages the computer's hardware and resources and provides an interface between the user, the application programs and the hardware
utility software
system software that performs a specific task to maintain, optimise or protect the computer, such as a virus checker or a defragmenter
program library
a collection of pre-written, tested routines (subroutines, classes, modules) that a program can use instead of writing its own
Dynamic Link Library (DLL)
a program library whose routines are loaded into memory only when the program calls them, at run time, and are shared between programs
assembler
a translator that converts an assembly language program into machine code, one instruction for each instruction
compiler
a translator that converts the whole of a high-level language program into machine code before it is run, producing an executable file
interpreter
a translator that translates and executes a high-level language program one statement at a time
integrated development environment
a single application that provides the tools for writing, translating, running and debugging a program
context-sensitive prompt
a pop-up that suggests identifiers, keywords or parameters that fit at the current point in the code
dynamic syntax check
checking the syntax of the code as it is typed and flagging an error before the program is translated
prettyprint
displaying code with keywords, identifiers and comments in different colours or fonts and with consistent indentation
breakpoint
a marked line at which the running program pauses so that variables can be inspected
single stepping
running a paused program one statement at a time under the programmer's control
한국어
정의 문제는 고정된 문구로 채점합니다. 이 내용들을 정확히 외우고, 답은 하나만 제시하십시오.
용어
정의
운영 체제
컴퓨터의 하드웨어와 자원을 관리하고 사용자, 응용 프로그램, 하드웨어 사이 인터페이스를 제공하는 소프트웨어
유틸리티 소프트웨어
컴퓨터를 유지, 최적화 또는 보호하기 위해 특정 작업을 수행하는 시스템 소프트웨어(예: 바이러스 체크기, 디프래그멘터)
프로그램 라이브러리
사전에 작성되고 검증된_argv(서브루틴, 클래스, 모듈)의 모음으로, 프로그램이 자체적으로 작성하지 않고 사용할 수 있음
동적 링크 라이브러리(DLL)
_argv가 프로그램에 의해 호출될 때만 실행 시간에 메모리에 로드되어 프로그램 간에 공유되는 프로그램 라이브러리
어셈블러
어셈블리 언어 프로그램을 기계어로 변환하는 번역기(각指令당 one instruction)
컴파일러
고수준 언어 프로그램을 실행 전에 전체를 기계어로 변환하여 실행 가능한 파일을 생성하는 번역기
인터프리터
고수준 언어 프로그램을 문장 단위로 번역하고 실행하는 번역기
통합 개발 환경
프로그램 작성, 번역, 실행, 디버깅을 위한 도구를 제공하는 단일 애플리케이션
문맥 기반 프롬프트
코드의 현재 지점에 적합한 식별자, 키워드 또는 매개변수를 제안하는 팝업
동적 구문 검사
코드가 입력되는 동안 구문을 확인하고 프로그램이 번역되기 전에 오류를 알림
prettyprint
키워드, 식별자, 주석을 서로 다른 색상이나 서체로 표시하고 일관된 줄바꿈을 적용하여 코드 표시
breakpoint
변수를 조사할 수 있도록 실행 중인 프로그램이 일시 정지하는 표시된 줄
단일 스텝
프로그래머의 통제 아래 일시 정지된 프로그램을 문장 단위로 실행
5.2
Exam tips · 시험 팁
English
List the OS's jobs by their syllabus names (memory, process, hardware, file and security management) and say what each does — "manages resources" alone is too vague.
Compare compiler vs interpreter vs assembler: what each translates, when it translates it, and how errors are reported.
Explain what an IDE provides using the syllabus groups: coding, initial error detection, presentation, debugging.
A "benefit to the developer" answer names the developer's saving: time, cost, expertise, reliability or maintenance. A "drawback" names a dependence: availability, version, fit, security.
For "describe the operation of" a translator, give three things: what is translated (whole program or one statement), when (before running or while running), and how errors are reported (all at once or at the first error).
Common mistakes
Writing "the OS controls the computer" or "manages resources" with no example task. Each mark is one named task with what it does.
Saying an interpreter "compiles line by line". An interpreter translates and executes each statement; it never produces an executable.
Saying a compiler runs the program. It only translates; the executable runs later, without the compiler.
Putting a DLL "inside" the executable. That is a static library; a DLL stays a separate file loaded at run time.
Saying defragmentation "deletes" or "compresses" files, or is needed on an SSD. It only moves blocks so each file is stored contiguously.
Filing prettyprint or collapsing blocks under "debugging". They are presentation features; debugging is breakpoints, single stepping, watching variables and the report window.
한국어
syllabus 명칭(메모리, 프로세스, 하드웨어, 파일 및 보안 관리)으로 OS의 역할을 나열하고 각 역할이 구체적으로 무엇을 하는지 설명하십시오. 단순히 "리소스를 관리한다"는 설명만으로는 너무 모호합니다.
컴파일러 vs 인터프리터 vs 어셈블러를 비교하십시오: 각각 무엇을 번역하며, 언제 번역하는지, 그리고 오류가 어떻게 보고되는지를 설명하십시오.
IDE가 제공하는 기능을 syllabus 그룹(코딩, 초기 오류 감지, 표시, 디버깅)을 사용하여 설명하십시오.
'개발자에게 이점이 있다'는 답은 개발자의 절감 요소를 언급해야 합니다: 시간, 비용, 전문 지식, 신뢰성 또는 유지보수. '단점'은 의존성을 언급해야 합니다: 가용성, 버전, 호환성, 보안.
'번역기의 작동 방식 설명' 문제에서는 세 가지 사항을 제시해야 합니다: 무엇을 번역하는지(전체 프로그램 또는 한 문장), 언제 하는지(실행 전 또는 실행 중), 오류가 어떻게 보고되는지(한 번에 모두 또는 첫 번째 오류 시).
흔한 실수
'OS가 컴퓨터를 제어한다'거나 '리소스를 관리한다'고만 적고 구체적인 작업 예시가 없는 경우. 각 점수는 명칭된 작업 하나와 그 기능이 포함되어야 합니다.
인터프리터가 '줄为单位로 컴파일한다'고 말하는 것은 틀렸습니다. 인터프리터는 각 문장을 번역하고 동시에 실행하며, 실행 파일을 생성하지 않습니다.
컴파일러가 프로그램을 실행한다고 말하는 것은 틀렸습니다. 컴파일러는 단순히 번역할 뿐이며, 생성된 실행 파일은 나중에 컴파일러 없이 개별적으로 실행됩니다.
DLL을 실행 파일 "내부"에 넣는 것. 즉, 이는 정적 라이브러리입니다. DLL은 실행 시 로딩되는 별도의 파일로 남아야 합니다.
디프래그멘테이션이 파일을 "삭제"하거나 "압축"하며, SSD에서도 필요하다고 설명하는 것은 틀렸습니다. 디프래그멘테이션은 각 파일이 연속적으로 저장되도록 블록만 이동할 뿐입니다.
"디버깅" 아래에서prettyprint(포맷팅)이나 블록을 압축하는 것을 기록하는 것은 틀렸습니다. 이들은 표시 방식의 기능이며, 디버깅은 브레이크 포인트, 스텝 스ینگ(단일 실행), 변수 감시 및 리포트 창을 의미합니다.
Interactive lessons on this topic · 이 주제에 대한 인터랙티브 수업
Work through it step by step, with instant-check exercises. · 즉시 체크 기능 exercises를 통해 단계별로 진행하세요.