Paper 1 · Unit 5. Operating systems, utilities, libraries, translators and IDEs.

1. Why computers need an operating system

An operating system (OS) manages the hardware and provides a platform and user interface so applications can run without controlling hardware directly.

Key management taskWhat it does
Memory managementAllocates memory to programs, keeps processes separate, uses paging and virtual memory
File managementOrganises files in directories, handles naming, access rights and storage
Security managementUser accounts, passwords, access rights, firewalls, updates
Hardware (peripheral) managementCommunicates with devices using drivers; handles buffers and interrupts
Process managementSchedules processes on the CPU, allocates resources, handles multitasking

2. Utility software

UtilityPurpose
Disk formatterPrepares a disk for use by creating a file system; erases existing data
Virus checkerScans files for malware, quarantines or deletes infected files
DefragmentationRearranges fragmented files on a magnetic hard disk into contiguous blocks, so they load faster
Disk contents analysis / repairChecks the disk for errors and bad sectors and repairs or marks them
File compressionReduces file size to save storage and transmission time
Back-up softwareCopies files to another location on a schedule so they can be restored

Defragmentation is not needed for SSDs: access time does not depend on where data is stored, and extra writes shorten their life.

3. Program libraries

A library is a collection of pre-written, tested routines that programs can use. Benefits: saves time, routines are already tested and reliable, and complex code (e.g. maths or graphics) can be used without writing it.

A Dynamic Link Library (DLL) is loaded at run time rather than built into the executable. Benefits: smaller executables, one copy in memory shared by many programs, and updating the DLL updates every program that uses it. Drawbacks: the program fails if the DLL is missing, and an incompatible update can break programs.

4. Language translators

CompilerInterpreter
TranslationThe whole program at once, into an executableOne statement at a time, executing each
ErrorsReported after the whole program has been checkedTranslation stops at the first error
RunningFast; source code and compiler not neededSlower; the interpreter is needed each time
Best forDistributing finished software; protects source codeDevelopment and debugging

An assembler translates assembly language into machine code. Some languages (e.g. Java) are partially compiled into intermediate code (bytecode), which is then interpreted by a virtual machine, giving portability across platforms.

Try it: compiler or interpreter?

5. IDE features

FeatureExamples
CodingContext-sensitive prompts / auto-complete, syntax highlighting, auto-indent
Initial error detectionDynamic syntax checks that underline errors as you type
PresentationPrettyprint, expanding and collapsing code blocks
DebuggingSingle stepping, breakpoints, variable watch windows, report window

6. Examiner tips

  1. Name the OS task and explain it, e.g. “memory management: allocates memory to processes”.
  2. Defragmentation applies to magnetic hard disks.
  3. DLL benefits are smaller programs and shared, updatable code.
  4. Compiler vs interpreter: compare in pairs (translation, errors, speed, distribution).
  5. IDE debugging tools: breakpoints, stepping, watch windows.

7. Practice questions

Practice: answer and check instantly

Type a short answer, then press Check or Enter.

Show answer

Defragmentation.

Show answer

Dynamic Link Library.

Show answer

An assembler.

Show answer

An interpreter.

Show answer

A breakpoint.

Show answer

A disk formatter.

Show answer

Memory management.

Show answer

A virtual machine.

Exam-style questions

9. Explain two benefits of using a DLL. [4]

Show mark guide

The executable is smaller because the routine is not included [1] · it is loaded only when needed [1] · one copy in memory can be shared by several programs [1] · saves memory [1] · updating the DLL updates all programs that use it [1] · no need to recompile [1]. Max 4.

10. Describe two features of an IDE that help a programmer find errors. [4]

Show mark guide

Breakpoint: stops the program at a chosen line [1] so values can be inspected [1] · single stepping: runs one line at a time [1] to see the flow [1] · watch window: shows variable values as they change [1] · dynamic syntax checking underlines errors as code is typed [1]. Max 4.

8. Topic test: predict your grade

Topic test: predict your grade

15 questions, about 10 minutes. Answer them all, then press Mark my test.

1. Which is a key OS task?
2. A device driver…
3. Defragmentation is mainly for…
4. Formatting a disk…
5. A library routine is…
6. A DLL is linked…
7. A compiler…
8. An advantage of an interpreter is…
9. Bytecode is…
10. Syntax highlighting is an IDE feature for…
11. A watch window shows…
12. Which utility reduces file size?
13. Back-up software…
14. Prettyprint…
15. Which translator gives one-to-one translation of mnemonics?

Frequently asked questions

What are the main tasks of an operating system?

The main tasks are memory management, file management, security management, hardware management and process management.

What is a DLL?

A dynamic link library is a library loaded at run time. It keeps executables smaller and lets several programs share one copy of the code in memory.

What IDE features help with debugging?

Breakpoints, single stepping, variable watch windows and report windows help programmers find and fix errors.