Skip to content
Cambridge IGCSE0478

Types of software and interrupts

Computer Science 0478 Chapter Notes

What this chapter covers

Types of software and interruptsTypes of programming language, translators and integrated development environments (IDEs)
ShareWhatsAppPost
Types of software and interrupts notes

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Types of software and interrupts notes as text: skim, search, and jump between subtopics.

~14 min read

1. System software and application software

System software provides the services that the computer requires. It includes the operating system and utility software.

Application software provides the services that the user requires.

To explain the difference, say what each one does. System software manages and maintains the hardware and software. Application software allows the user to perform tasks.

Examiner insight

“Some candidates described system software as performing tasks for the computer which required additional detail as to what the system software provides for the computer because all software instructs the computer to perform actions.” “Some candidates confused the two types of software and provided a mixed response or a completely incorrect response.”

Worked example 12 marks

A computer has system software and application software.

(a) Explain how system software is different to application software.

  1. 1

    system software manages / maintains the hardware / software [1]

  2. 2

    application software allows the user to perform tasks [1]

2. What an operating system does

An operating system is one type of system software. Its basic functions are managing files, handling interrupts, providing an interface, managing peripherals and drivers, managing memory, managing multitasking, providing a platform for running applications, providing system security and managing user accounts.

A role says what a function does. Managing peripherals means handling or installing device drivers, and receiving data from and transferring data to the devices. Providing an interface allows a user to communicate with the computer. Managing memory makes sure that two processes do not access the same memory location at the same time. Managing user accounts allows the user to set a username and password.

Examiner insight

“Many candidates gave a vague response, such as input/output. This needs further clarification, such as manages inputs and outputs devices.” “Many candidates listed, or described, other operating system tasks. For example, that it provides file management and memory management, instead of focusing only on the task of managing peripherals.”

Worked example 14 marks

(d) One function performed by the operating system is managing peripherals. A role of this function is to install the drivers needed for the optical mouse.

Complete the table with the missing functions and roles of an operating system.

functionrole
providing an interface……
……It makes sure that two processes do not access the same memory location at the same time.
managing interrupts……
……It allows the user to set a username and password.
  1. 1

    providing an interface: to allow a user to communicate / interact with the computer [1]

  2. 2

    managing memory [1]

  3. 3

    managing interrupts: checks the source of the interrupt, or any other point from block 5 [1]

  4. 4

    managing (user) accounts, or providing / managing (system) security [1]

3. Hardware, firmware and the operating system

Hardware, firmware and an operating system are all required to run application software. Applications are run on the operating system. The operating system is run on the firmware. The bootloader (firmware) is run on the hardware.

Firmware is instructions written into non-volatile / read only memory (ROM). It is used to configure, set up, control or run the hardware. It provides the operating system with a platform to run.

The operating system manages the hardware and provides a platform for application software to run.

Examiner insight

“Some candidates identified firmware as being hardware or gave an example of what could be stored as part of the firmware for example that firmware is the BIOS.” “Some candidates gave a list of management functions for the operating system or repeated the earlier question that it manages peripherals.”

Worked example 12 marks

(d) Define the terms firmware and operating system.

  1. 1

    firmware, any one from: instructions / software used to configure / set up / control / run hardware; written into non-volatile / read only memory / ROM; provides the OS with a platform to run [1]

  2. 2

    operating system, any one from: instructions / software that manages hardware; provides an interface between the user and the hardware; provides a platform for application software to run [1]

4. What an interrupt is and what causes one

An interrupt is a signal sent to the CPU. It is generated by hardware or by software.

Hardware interrupts include pressing a key on the keyboard and moving the mouse. Software interrupts include division by zero and two processes trying to access the same memory location. Say what happens to cause the interrupt. The name of a device is not an example.

Interrupts are needed for multitasking, for stopping the current process and for prioritising actions. An interrupt is not only an error message: pressing a key generates one.

Examiner insight

“Some candidates gave response such as ‘keyboard’ or ‘mouse’. These are just devices and not examples of interrupt.” “However, some candidates demonstrated only a vague understanding, providing statement such as it stops processes.”

Worked example 12 marks

Give one example of a hardware interrupt and one example of a software interrupt.

  1. 1

    hardware, any one from: pressing a key on the keyboard; moving the mouse [1]

  2. 2

    software, any one from: division by zero; two processes trying to access the same memory location [1]

5. How an interrupt is handled

Handling interrupts is a function of the operating system. It checks the source of the interrupt. It assigns or checks the priority of the interrupt, finds the highest priority interrupt and decides which interrupts to action.

It controls or checks the interrupt queue. It calls the interrupt service routine (ISR), which is used to handle the interrupt.

Examiner insight

“Few candidates were able to describe how the operating system handles interrupts. The most common correct answer given was that it gives an interrupt a priority.” “Most candidates gave a vague statement about a key being pressed and analogue data being converted to digital data.”

Worked example 14 marks

Describe how an operating system manages interrupts.

  1. 1

    checks the source of the interrupt [1]

  2. 2

    assigns / checks the priority, to find the highest priority interrupt [1]

  3. 3

    controls / checks the interrupt queue [1]

  4. 4

    calls the interrupt service routine (ISR) [1]

Recap

  • System software provides the services the computer requires: the operating system and utility software.
  • Application software provides the services the user requires.
  • The operating system manages files, interrupts, the interface, peripherals and drivers, memory, multitasking, security and user accounts. It is the platform for running applications.
  • Applications run on the operating system. The operating system runs on the firmware. The bootloader (firmware) runs on the hardware.
  • An interrupt is a signal sent to the CPU. Hardware examples: pressing a key, moving the mouse. Software examples: division by zero, two processes trying to access the same memory location.
  • The operating system handles an interrupt by checking its source, checking its priority, checking the interrupt queue and calling the interrupt service routine.

6. High-level and low-level languages

A high-level language is written in English-like statements. It needs translating before it can be run. It is machine independent: the same program can be used on any computer.

A low-level language is closer to binary or machine code. It has little abstraction from the language a computer processes. Examples are assembly language and machine code.

Examiner insight

“The question asked what is meant by the high-level language, but many candidates instead gave benefits instead, for example that it is easier to read, without giving the feature that makes it easier to read.” “Candidates needed to demonstrate an understanding of the computer executing, processing, or running, the code because a computer cannot ‘understand’ code.”

Worked example 12 marks

The programmer is using a high-level language to write the program. Describe what is meant by a high-level language.

  1. 1

    It is written in human / English-like statements. [1]

  2. 2

    It needs translating to be run / executed. (Or: it is portable, so it can be used on any computer.) [1]

7. Choosing between them

A low-level language can directly manipulate the hardware. Its programs run faster and use memory more efficiently. They are harder for humans to read, write and debug, and they are not portable. A low-level language normally has one instruction per line.

A high-level language is easier to read, write, understand and debug. It is machine independent. It may run more slowly, because it has to be translated, and it uses memory less efficiently. One high-level statement can hold several instructions.

Examiner insight

“Some candidates made a vague reference to the program taking up less space, but this was not detailed enough for a mark; reference to memory needed to be present.” “Many gave answer based upon it making the program more secure from hackers.”

Worked example 14 marks

A student develops a program for their computer science project using a high-level language. Explain two differences between a high-level language and a low-level language.

  1. 1

    A high-level language cannot directly manipulate the hardware … [1]

  2. 2

    … but a low-level language can directly manipulate the hardware. [1]

  3. 3

    A high-level language program is portable / machine independent … [1]

  4. 4

    … but a low-level language program is not portable / machine independent. [1]

8. Assembly language and the assembler

Assembly language is a form of low-level language. It uses mnemonics.

An assembler is needed to translate an assembly language program into machine code.

Worked example 13 marks

A programmer uses a low-level language to write a program for a vending machine.

Identify two examples of a low-level language. Give an example of a translator that can be used for a low-level language.

  1. 1

    Assembly (language). [1]

  2. 2

    Machine code (or binary, or object code). [1]

  3. 3

    Assembler. [1]

9. Compiler and interpreter

A compiler and an interpreter both translate a high-level language into machine code.

A compiler translates the whole code at once before it is executed. It produces an executable file. It gives an error report for the whole code if errors are detected.

An interpreter translates and executes the code line by line. It stops when it finds an error.

Examiner insight

“It would also be beneficial for candidates to understand that an error report is produced at the end of translation with a compiler, but errors are reported, during runtime, as they are encountered with an interpreter.”

Worked example 14 marks

The table contains statements about compilers and interpreters. Two of the statements in the table are not correct.

Give the letter of each incorrect statement. Suggest a corrected statement for each.

letterstatement
AAn interpreter translates and executes the code one variable at a time.
BA compiler displays an error report when it is unable to run the code due to syntax errors.
CAn interpreter stops translating as soon as it finds an error in the code.
DA compiler translates the whole code at once and then it is executed.
EA compiler produces a non-executable file.
  1. 1

    Incorrect statement: A. [1]

  2. 2

    An interpreter translates and executes the code one line / statement at a time. [1]

  3. 3

    Incorrect statement: E. [1]

  4. 4

    A compiler produces an executable file. [1]

10. Choosing a translator

An interpreter is mostly used when developing a program. It can run sections of the code before the whole program is complete. It stops at an error and displays it, so the programmer can debug as the program runs.

A compiler is used to translate the final program. Its error report lists errors so they can be fixed together. It produces an executable file that can be tested many times without retranslating. The final program executes faster, because the compiler optimises the code.

Examiner insight

“The stronger responses identified the ability to perform real time debugging and to only run sections of the code without the need for it to all be complete and accurate.” “Some candidates described the error report as making it easier for the user to correct the errors, the compiler does not help the user to correct the error, the user is still required to debug the program.”

Worked example 13 marks

The programmer uses a compiler during the development of the program. Describe the benefits of using a compiler when developing the program.

  1. 1

    It produces an error report … [1]

  2. 2

    … so all errors can be fixed together. [1]

  3. 3

    It produces an executable file, so the program can be tested multiple times without retranslating. [1]

11. The role of an IDE

An integrated development environment (IDE) is used to write program code. Its common functions are:

Code editor: write and change the program. Run-time environment: run the code and see the output. Translators: translate the code.

Error diagnostics: find errors in the code. Auto-completion: gives options to complete a command word or identifier. Auto-correction: corrects spelling errors in the code. Prettyprint: changes the colour of command words and identifiers so they are easier to identify.

Examiner insight

“Some candidates incorrectly gave functions of an operating system instead of an IDE.” “Candidates need to describe the role of the function beyond rewording the function.”

Worked example 14 marks

A translator is one function of an IDE. Identify two other functions of an IDE. State the purpose of each function.

  1. 1

    Code editor. [1]

  2. 2

    It allows the programmer to write or change the program. [1]

  3. 3

    Run-time environment. [1]

  4. 4

    It allows the user to run the code and see the output, or to test the code. [1]

Recap

  • High-level: English-like statements, needs translating, machine independent.
  • Low-level: closer to machine code, can directly manipulate hardware, uses memory efficiently, harder to read and debug.
  • Assembly language is low-level and uses mnemonics. An assembler translates it to machine code.
  • Compiler: translates the whole code at once, gives an executable file and an error report.
  • Interpreter: translates and executes line by line, stops at an error.
  • Interpreter while developing. Compiler for the final program.
  • IDE: code editor, run-time environment, translators, error diagnostics, auto-completion, auto-correction, prettyprint.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State whether an operating system is system software or application software.1 mark
  2. A school installs a spreadsheet program so that students can do their coursework. State which type of software it is and give a reason.2 marks
  3. Give two functions of an operating system.2 marks
  4. State what is meant by firmware.2 marks
  5. A student is asked for one example of a hardware interrupt and one example of a software interrupt. The student writes “keyboard” and “mouse”. Neither earns a mark. Write two answers that would earn the marks.2 marks
  6. Name the operating system function that does each job. A: it allows a user to set a username and password. B: it makes sure two processes do not access the same memory location at the same time. C: it installs the drivers needed for a printer.3 marks
  7. A user is typing in a word processor while a file downloads. Explain why the computer needs interrupts.3 marks
  8. A printer runs out of paper while printing a document and generates an interrupt. Describe what happens next, up to the point where the interrupt is dealt with.4 marks
  9. A games console has a controller, a bootloader stored in ROM, an operating system and a racing game. (a) A student labels the bootloader as hardware and the racing game as system software. Give the correct label for each. (b) The bootloader is damaged and will not run. Explain why the racing game cannot run.5 marks
  10. A weather station computer runs a logging program. Three events happen in the same second. Event 1: the logging program divides a total by a count of 0. Event 2: the logging program and another process try to access the same memory location. Event 3: a technician presses a key on the keyboard. (a) State the type of interrupt each event generates. (b) One operating system function has the role of making sure that Event 2 does not happen. Name this function. (c) Describe how the operating system decides which of the three interrupts to action first, and what it does to handle them.7 marks
  11. Name the translator needed to translate an assembly language program into machine code.1 mark
  12. State what is meant by a high-level language.2 marks
  13. A student says: ‘Assembly language needs no translation because it is already machine code.’ Give two reasons why the student is wrong.2 marks
  14. A programmer writes the control program for a washing machine in a low-level language. Give two reasons for this choice.2 marks
  15. Describe how an interpreter translates a program and what it does when it finds an error.3 marks
  16. A company has finished a program and will give a copy to its customers. Explain why the programmer should use a compiler to translate the final program.3 marks
  17. A student is writing a long program and has finished only the first section. Explain why an interpreter is useful during development.3 marks
  18. A programmer types the first letters of an identifier and the IDE offers a list of identifiers to finish it. The IDE also changes the colour of command words. Name each IDE function and state its purpose.4 marks
  19. A programmer tests this program. Lines 3 and 5 each contain a syntax error. ``` OUTPUT "Enter mass" INPUT Mass Weight ← Mass * OUTPUT "Weight is" OUTPUT Weight + OUTPUT "Done" ``` (a) The programmer runs the program using an interpreter and is ready to type 12. Describe what happens. (b) The programmer changes line 3 to `Weight ← Mass * 9.8` and makes no other change. Describe what happens when the program is run using the interpreter again. (c) The programmer translates the original program using a compiler instead. Describe how the errors are reported and give one benefit of this to the programmer.6 marks
  20. A company makes a doorbell camera. Its program is written in assembly language using an IDE. A trainee writes four notes about the project. Each note would earn no mark in an exam. Note 1: ‘Assembly language was chosen because it makes the program more secure from hackers.’ Note 2: ‘The assembler translates the program so that the camera can understand it.’ Note 3: ‘The assembly language program takes up less space.’ Note 4: ‘Auto-completion auto-completes the code.’ (a) Rewrite each note so that it would earn the mark. (b) The company rewrites the program in a high-level language so that it can be used in cameras with different hardware. State the feature of a high-level language that allows this. Give two disadvantages of the change for the program.7 marks

Go deeper

Practise and revise with member-only material for this chapter.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters