Cambridge O Level2210

Types of software and interrupts

Computer Science 2210 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

Unable to load PDF

The notes viewer could not load. Please refresh the page.

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.

~9 min read

1. System vs. Application Software

All programs on a computer can be categorised into two main types: system software and application software. System software works in the background to manage the computer's hardware and provide a stable environment for other programs. It's software for the computer itself. The most important piece of system software is the Operating System (OS). Application software, on the other hand, is software designed for the end-user to perform specific tasks. Think of it as software for you. For example, you use a word processor to write an essay or a web browser to access the internet. Application software cannot run without system software being in place first.

Key term

System Software: Software that manages a computer's hardware and software resources, providing a platform for application programs to run.

Examiner insight

Examiners award marks for clearly distinguishing the purpose of each software type, not just listing examples. Focus on who the software is for: system software is for the computer, application software is for the user.

Common pitfall

Stating that an operating system is the only type of system software. Utility programs (like disk defragmenters or antivirus software) are also a key part of system software.

Fun fact

The hierarchy is simple: The hardware can't do anything without the Operating System (system software), and the Operating System is useless to a user without any application software.

Worked example 13 marks

Describe the difference between system software and application software, giving a clear example of each. [3]

  1. 1

    System software is designed to manage the computer's hardware and run the computer system. Its purpose is to provide a platform for other software. [1 mark]

  2. 2

    Application software is designed for the end-user to perform specific tasks, such as writing a document or playing a game. [1 mark]

  3. 3

    An example of system software is an Operating System like Windows or Android. An example of application software is a spreadsheet program like Microsoft Excel. [1 mark]

Recap

  • Software is a set of instructions that tells a computer what to do.
  • System software manages the computer's hardware and resources.
  • The Operating System (OS) is the main type of system software.
  • Application software allows the user to perform specific tasks.
  • Application software runs 'on top of' system software.

Quick check

  1. Is a video game an example of system software or application software?1 mark
  2. Name the most important type of system software.1 mark

2. The Role of the Operating System

The Operating System (OS) is the most fundamental piece of system software. It acts as an intermediary between the user and the computer hardware. Every computer, tablet, and smartphone has an OS. Its main job is to manage the computer's resources and allow other programs to run. Key functions include: Memory Management (allocating RAM to programs), Peripheral Management (controlling input/output devices like keyboards and printers), File Management (organising files and folders on storage drives), and providing a User Interface (UI) so you can interact with the machine.

Key term

Operating System (OS): Core system software that manages all computer hardware and software resources and provides common services for computer programs.

Examiner insight

When asked for OS functions, a good answer will briefly describe what each function does, not just list them. For example, 'Memory management ensures processes don't interfere with each other's memory space'.

Common pitfall

Confusing the user interface (the part you see and click on) with the entire operating system. The UI is just one of the many jobs the OS does.

Worked example 13 marks

An operating system performs memory management. Describe memory management. [3]

  1. 1

    Memory management is the process of the OS controlling and coordinating the computer's main memory (RAM). [1 mark]

  2. 2

    The OS allocates specific memory blocks to each program and process that is running, ensuring they have the space they need to function. [1 mark]

  3. 3

    It also ensures that different processes do not interfere with each other's allocated memory and deallocates (frees up) memory when a process is closed to make it available for others. [1 mark]

Worked example 22 marks

Give two other functions of an operating system, apart from memory management. [2]

  1. 1

    Providing a user interface (e.g., a Graphical User Interface with icons and windows). [1 mark]

  2. 2

    File management (e.g., creating, deleting, and organising files and folders on a hard drive). [1 mark]

Recap

  • The OS is the core software that manages the computer.
  • A key OS function is memory management, which involves allocating RAM to running programs.
  • The OS manages all peripherals, such as mice, keyboards, and printers.
  • File management allows for the creation, deletion, and organisation of files in storage.
  • The OS provides a user interface (UI) for the user to interact with the computer.

Quick check

  1. When you save a document, which OS function are you using?1 mark
  2. What is the name for the function that controls the printer?1 mark

3. Introduction to Interrupts

An interrupt is a signal sent to the processor that indicates an event needs its immediate attention. It's like a tap on the shoulder for the CPU. This signal causes the processor to pause what it is currently doing so it can handle the event. Interrupts are not necessarily errors; they are a normal part of how a computer works. They can be generated by hardware (e.g., a mouse click, a key press, or a printer running out of paper) or by software (e.g., a program trying to divide by zero, or an application requesting data from the hard drive). Each interrupt has a priority level, which determines how urgently it needs to be dealt with compared to other tasks.

Key term

Interrupt: A signal sent from a device or from software to the processor, causing it to temporarily stop its current operations to handle a specific event.

Common pitfall

Thinking that an interrupt always means an error has occurred. Many interrupts, like a mouse click or a network packet arriving, are normal and essential parts of computer operation.

Fun fact

Before interrupts, CPUs used a method called 'polling'. This involved the CPU constantly asking every device 'Do you need anything?'. It was incredibly inefficient, like a waiter asking every single customer in a restaurant if they're ready to order every 10 seconds.

Worked example 12 marks

State what is meant by an interrupt and give one example of a hardware interrupt. [2]

  1. 1

    An interrupt is a signal sent to the processor to request its attention, causing a temporary pause in the currently executing program. [1 mark]

  2. 2

    An example of a hardware interrupt is the user pressing a key on the keyboard, or a printer signalling it is out of paper. [1 mark]

Worked example 22 marks

Give two examples of software interrupts. [2]

  1. 1

    A program attempting to divide by zero. [1 mark]

  2. 2

    A program requesting data to be read from a storage drive. [1 mark]

Recap

  • An interrupt is a signal to the CPU that an event requires its attention.
  • Interrupts can be generated by hardware (e.g., mouse click) or software (e.g., program error).
  • Interrupts cause the CPU to pause its current task to handle the event.
  • Not all interrupts are errors; many are for routine operations like I/O requests.
  • Interrupts are assigned a priority level to determine the order they are handled in.

Quick check

  1. Is a 'printer out of paper' signal a hardware or software interrupt?1 mark
  2. What is the purpose of assigning a priority to an interrupt?1 mark

4. The Interrupt Handling Process

When an interrupt occurs, the processor follows a precise sequence of steps to handle it without losing the work it was doing. This process ensures that once the interrupt is dealt with, the original task can resume seamlessly. The key is the Interrupt Service Routine (ISR), a small piece of code specifically designed to handle a particular interrupt. The OS manages a table of these ISRs.

The process is:

  1. The processor completes the current Fetch-Decode-Execute cycle.
  2. It checks for any pending interrupts. If an interrupt has a higher priority than the current task, it proceeds.
  3. The contents of the processor's registers (which hold the state of the current task) are saved to a special area in memory called the stack.
  4. The processor identifies the interrupt and loads the memory address of the corresponding Interrupt Service Routine (ISR).
  5. The processor executes the ISR to service the device or handle the event.
  6. Once the ISR is complete, the saved state of the original task is restored from the stack back into the registers.
  7. The original task resumes execution from the exact point it was interrupted.

Key term

Interrupt Service Routine (ISR): A specific block of code or program that is executed by the processor in response to a particular type of interrupt.

Examiner insight

For full marks on an interrupt process question, you must describe a logical sequence. Key phrases are 'completes FDE cycle', 'saves registers to stack', 'loads ISR', 'executes ISR', and 'restores registers from stack'.

Common pitfall

Forgetting to mention that the CPU's current state (the contents of its registers) must be saved before handling the interrupt and restored afterwards. This is a critical step that allows the original program to resume correctly.

Worked example 15 marks

A printer sends an interrupt to the computer to signal it is out of paper. Describe the stages involved in the processor handling this interrupt. [5]

  1. 1

    The processor finishes its current Fetch-Decode-Execute cycle. [1 mark]

  2. 2

    It checks for interrupts and detects the 'out of paper' signal from the printer. It determines this has a high priority. [1 mark]

  3. 3

    The contents of the current registers (the state of the current program) are copied and saved onto the stack in RAM. [1 mark]

  4. 4

    The processor loads the specific Interrupt Service Routine (ISR) for the 'printer out of paper' event. The ISR is executed, which will likely cause an error message to be displayed to the user. [1 mark]

  5. 5

    After the ISR finishes, the saved register values are restored from the stack, and the original program resumes execution from where it was interrupted. [1 mark]

Recap

  • The CPU checks for interrupts at the end of each FDE cycle.
  • Before handling an interrupt, the CPU saves the state of the current process to the stack.
  • The state is the contents of all the processor's registers.
  • An Interrupt Service Routine (ISR) is a dedicated program that handles a specific interrupt.
  • After the ISR finishes, the saved state is restored, and the original process continues.
  • This whole process happens incredibly quickly and is fundamental to modern multitasking.

Quick check

  1. What does ISR stand for?1 mark
  2. Where does the CPU store the contents of its registers when an interrupt occurs?1 mark

End-of-chapter exercise

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

  1. Give two examples of application software and one example of system software.3 marks
  2. State what is meant by an interrupt.2 marks
  3. Describe the relationship between application software, the operating system, and the computer hardware.3 marks
  4. Explain the difference between a hardware interrupt and a software interrupt, providing one specific example of each.4 marks
  5. An operating system provides file management. Describe three tasks that this function would perform.3 marks
  6. Explain the role of an Interrupt Service Routine (ISR) in the handling of an interrupt.3 marks
  7. A user is playing a video game while downloading a file. The network card signals that the download is complete. Describe in detail the steps the processor takes to handle this 'download complete' interrupt and then resume the game.6 marks
  8. Explain why memory management is a crucial function of an operating system in a modern computer that can run multiple programs at once.4 marks
  9. An interrupt's priority is important. Explain why, using an example of a high-priority and a low-priority interrupt.3 marks
  10. A program crashes due to an 'invalid memory access' error. Is this a hardware or software interrupt? Justify your answer.2 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