4.1 Types of Software and Interrupts

Question Bank · 18 Questions

Objectives: Students should be able to —

  • 1 Give difference between System software and Application software.
  • 2 Describe Utility software and Device drivers.
  • 3 Describe Operating System and its basic functions.
  • 4 Explain the need of hardware, firmware and operating systems when running application software.
  • 5 Describe the role and operation of interrupts.
  • 6 Explain how buffer memory and interrupts are used when printing or storing a file in secondary memory.

Types of Software: System, Application, Utility & Firmware

(a) Difference between System software and Application software:

System software Application software
Designed to control computer hardware and provide a platform for other application software to run on the computer.Designed to perform specific tasks as per user's request.
Allows application software to interact with computer hardware.Runs on the platform provided by the system software (cannot run independently).
Provides a Human Computer Interface (HCI).Provides its own user interface to interact with the computer.
Controls the allocation and usage of hardware resources.The user can execute the software as and when they require.
An independent software installed with the Operating System.May be a single program (e.g. NotePad) or a suite of programs (e.g. Microsoft Office).
Example: Operating System, Device driver, Utility software, Assembler, Compiler.Example: Word processor, Spreadsheet, Database, Web browsers.

(b) Operating System (OS) — with examples:

  • Operating system is a set of system software that controls the hardware and helps other application software to run on the computer.
  • A computer system cannot work without operating system because all other software (system and application) depends on it.
  • It runs in the background, providing security to the system and files.
  • It provides a User Interface to interact with the computer.

Example: Windows, Android, Linux, Unix, MAC, iOS, etc.

(c) Utility software — with types:

  • Utility software is a system software designed to analyze, configure, optimize and maintain computer resources like hardware, software and data storage.
  • They are small programs generally included with Operating System or installed separately.

Example: File manager, File Compressor, Disk Scanner, Disk Defragmenter, Diagnostic Utility, Antivirus, Backup Utility, Data Recovery Utility, etc.

(a) Device driver — description and purpose:

  • A device driver is a system software that allows the operating system to communicate with a specific hardware device.
  • Drivers are hardware dependent and operating-system-specific.
  • It operates and controls a particular hardware attached to the computer, like Sound card, Graphic card, Network card, Printer, etc.

(b) Function of a device driver:

Device driver provides a software interface for the operating system to interact with computer hardware; allows to operate and control a specific hardware; translates data into a format understood by the hardware.

(c) Descriptor in a Device driver:

  • All Device drivers contain a collection of basic information about the devices called a Descriptor.
  • Descriptor includes unique manufacturer-ID, product-ID and serial numbers to identify the connected device.
  • The operating system uses this information to determine which device driver must be loaded to use that device.

(d) Role of descriptor when a new memory stick is plugged into a USB port for the first time:

  • The USB port provides power supply to the device, to activate and communicate with the computer.
  • The OS sends a request to the USB port to identify the device.
  • The unique manufacturer-ID, serial number and type of the device stored in the device descriptor is sent to the OS.
  • The operating system uses these numbers to determine which device driver must be loaded to use that device.
  • The serial number is used to recognize the device, no matter which USB port it is plugged into.
  • Serial numbers are optional — if a device has no serial number, the OS will treat the device as new every time it is plugged into a USB port.
  • Serial numbers must be unique — if two different devices with the same serial number were plugged into a computer at the same time, the device could not be identified and will not work.

(a) Firmware:

  • Firmware is a piece of software stored in the read-only memory chip of a device at the time of manufacturing, in order to make the device run properly.
  • It provides low-level control for devices.
  • It provides necessary instructions to the device for communicating with other computer hardware.
  • Firmware is read only and does not need to be changed.

(b) Two examples of firmware used in computer devices:

  1. Basic Input/Output System (BIOS) — a firmware which initializes and controls the input and output operations.
  2. Startup program called Bootstrap — a firmware which performs basic functions, identifies and loads OS.
  3. Computer's factory settings — a firmware that stores its default settings.

(c) Difference between firmware and device driver:

  • Firmware is the software that runs on the device.
  • A device driver is the software that tells your operating system how to communicate, control and operate the device.

(d) Replacing or upgrading Firmware:

Most devices allow firmware updates from time to time — upgrading firmware simply replaces the current version with the latest new version. But while running an update, if something goes wrong, you can't just uninstall or replace it. The ROM, PROM and EPROM need the firmware to function.

The process of switching ON the computer and loading the Operating System into the primary memory RAM is called Booting.

Operating System & Its Functions

(a) Operating System:

  • Operating system is an essential software that must be installed on a computer to make use of it.
  • It is a set of programs that controls the hardware and helps other application software to run on the computer.
  • It runs in the background of a computer system.
  • It provides a User Interface to interact with the computer.
  • It provides security to the system and files.

Example: Microsoft Windows, Apple Mac OS, Google Android, Apple iOS, Linux, Unix, MS-DOS, etc.

(b) Six basic functions of operating system:

  1. It provides a User-interface to interact with the computer.
  2. It allocates the CPU timing to do a task for each software.
  3. Manages the memory used by software in RAM and saves files in secondary storage.
  4. Controls the peripheral devices like keyboard, mouse, monitor, etc.
  5. Allows applications to save, delete, rename, edit files using File Manager.
  6. Provides security to the system and files (access rights, user accounts, firewalls, etc.).
  7. Provides Network Communication.

(a) OS necessary for Computers but not for some microprocessor-controlled devices:

  • Computer's fundamental goal is to run user's programs, so an Operating System is essential to provide a platform for application programs to run and make use of its hardware resources.
  • Microprocessor controlled devices are made to do only a few specific tasks, which can be done by storing a firmware permanently in the device during manufacturing.

(b) Examples of microprocessor controlled devices that do not need an operating system:

  1. Microprocessor controlled Alarm system.
  2. Automatic Washing Machine.
  3. Microwave oven.
  4. Electronic Calculator.
  5. Digital Watch.
  • It is easy and cheap to update Operating System if it is loaded in hard disk rather than a ROM chip.
  • It can allow a user to choose any one from a number of Operating Systems loaded in the hard disk.

(a) 4 ways Operating system controls Hardware:

  1. It allocates the CPU time to do a task.
  2. Controls the amount of memory used.
  3. Controls the disk space used.
  4. Controls the peripherals such as keyboard, mouse, printer, etc.

(b) 4 ways Operating system controls Software:

  1. Allows other application software to save, copy, delete and rename files using the File management utility.
  2. Allows more than one program to run at the same time, called Multi-tasking.
  3. Allows more than one user on a network to access the same files, called Multi-user.
  4. Provides security to the system and files (access rights, user accounts, firewalls, etc.).

(a) User Interface / HCI:

Human Computer Interface (HCI) is a communication system with hardware and software which allows the user to interact with the computer using cursor, prompts, icons, menus, etc. to get something done by the computer.

(b) Two types of User Interface:

Command-line Interface (CLI):

The interface which provides a way to type-in the commands or instructions on the screen to get something done by the computer.

Graphical User Interface (GUI):

The interface which provides commands or instructions in graphical form to the user — like icons, pull-down menus, windows and pointer — to select and interact with the computer.

(c) Three advantages for using GUI:

  1. It is user-friendly / easy to select.
  2. It avoids typing errors / no need to type commands.
  3. No need to remember commands.
  4. Selecting items using mouse is faster than entering commands.
  5. Allows multitasking (several programs can be opened at the same time).

(d) WIMP stands for:

WIMP is an acronym for Windows, Icons, Menus and Pointers, which denotes the style of interaction using these elements of the user interface.

WIMP best describes Graphical User Interface — like Microsoft Windows for PCs, MacOS for Apple Macintosh, UNIX, etc.

(a) Memory management:

  1. Keep track of the status of each memory location — free and allocated.
  2. Checks that each process has enough memory allocated to it.
  3. Manages the transfer of pages between Virtual memory and RAM.
  4. Makes sure that two processes don't try to access the same memory location.

(b) Security management:

  1. Its main function is to ensure the integrity, confidentiality and availability of data.
  2. Prevents illegal intrusion and maintains access rights by providing user privileges through User-ID and password to ensure privacy of data.
  3. Ensures that anti-virus software is always up to date.
  4. Uses a firewall to check all incoming and outgoing traffic of the computer.
  5. Updates operating system whenever updates become available.
  6. Offers the ability to restore the system and recover data when it has been lost or corrupted.

(c) Management of user accounts:

  1. Allows more than one user to log onto the computer system.
  2. Each person is given a user account protected by a user name and password.
  3. Each user's data is stored in separate parts of the memory to ensure data privacy.
  4. It allows each user to customize their screen layout and other settings.
  5. The user with administrator privilege can only create, delete and restrict user accounts.

(d) Hardware management:

  1. Communicates with all Input and Output devices using device drivers.
  2. Uses a device driver to take data from a file and translates it into a format that the input/output device can understand.
  3. Ensures each hardware resource has a priority so that they can be used and released as required.
  4. Manages input/output devices by controlling queues and buffers.

(e) File management:

  1. Allows application software to create, open, close, delete, rename, copy and move files.
  2. Ensures the name of the file is appropriate according to the rules of naming files (e.g. filename ≤ 255 characters and extension name ≤ 4).
  3. Maintains the directory structures to read and write files in HDD/SSD.
  4. Provides file access control mechanisms — like access rights to files for editing and locking them using password protection.

(f) Multi-tasking:

  1. Multitasking allows more than one program or process to run at a time.
  2. Operating System allocates CPU timing for each process to do its task.
  3. Each process shares the hardware resources, with effective use of CPU time, controlled by OS.
  4. Each process is given a priority level, so it can have resources according to its priority.
  5. Automatically interrupts the running program, saving its state and loading the saved state of another program and transferring control to it.

Virtual Memory, Buffer & Spooling

(a) Virtual memory:

  • Virtual memory is a volatile physical memory created temporarily on the secondary storage drive HDD/SSD (mimicking RAM).
  • It is created when a computer is running many processes at once and RAM is running low or out of space.
  • It is used to compensate the storage space of RAM, by transferring pages of data from RAM to secondary storage HDD/SSD.
  • It is a memory management technique of Operating System that creates an illusion of having a large physical memory RAM.

(b) Disk thrashing — and why it occurs:

  • Disk thrashing is a problem that may occur when virtual memory is being used.
  • The swapping of data between RAM and Hard disk causes a very high rate of hard disk read/write head movement.
  • If more time is spent on moving data in and out of memory, then the speed of processing data will be considerably reduced.
  • It can also lead to premature failure of a hard disk drive.

(a) Buffer — with example:

  • Buffer is a temporary memory usually in RAM that holds data right before it is used.
  • It is used to compensate the difference in processing speed of CPU and peripheral devices.
  • It allows the processor to perform other tasks while waiting to receive or send data to input/output devices.

Example:

  1. Buffer is used when streaming an audio or video file from the Internet. First, around 20% of the file is downloaded and stored in the Buffer memory before it begins to play. This ensures that the video playback doesn't stop and wait for data from the internet. While the clip plays back, the computer continually downloads the rest of the clip and stores it in the buffer.
  2. Print Buffer is used to hold data before it is sent to the Printer. It allows the processor to perform other tasks while data is being printed.
  3. Data Buffer is used to hold data before it is stored in a secondary storage device. It helps to compensate the difference in transmitting speed of processed data and read/write speed of secondary storage.

(b) Spooling:

  • Spooling is the process of putting multiple jobs in a buffer — a special area in memory or on a disk where a device can access them when it is ready.
  • Spooling is a combination of buffering and queueing, useful because devices access data at different rates.

Example: Print Spooling enables you to send large document files or a series of different files into temporary memory before they are printed.

Interrupts, IRQL & Polling

(a) Interrupt — with example:

  • An Interrupt is a signal sent from a device or from software to the processor.
  • It causes the processor to temporarily stop its current task and serve the interrupt.
  • The purpose of an interrupt is to get the attention of the CPU.
  • When an Interrupt is generated, it is put in a queue called IRQ (Interrupt Request Queue) according to its priority.

Example — Interrupts can occur when:

  1. The user has pressed a key to interrupt the current process.
  2. An error has occurred, such as a paper jam in a printer.
  3. A software generates an error message or if it crashes.

(b) Two ways hardware can cause an interrupt:

  1. Printer can cause an interrupt and produce an error when there is a paper jam.
  2. Keyboard can cause an interrupt to halt the current process of CPU and execute a command driven by keypress, like <Break>, <Pause>, <Esc>, etc.
  3. Moving the mouse triggers hardware interrupts that cause the processor to read the mouse position.

(c) Two ways software can cause an interrupt:

  1. Software interrupts are generated and stop the program with an error message when something goes wrong or it crashes.
  2. Software interrupts are generated by programs when they want to request a system call to be performed by the operating system. A software interrupt only communicates with the Operating System (kernel) and indirectly interrupts the CPU.

(d) Stages involved in the processor handling the printer-out-of-paper interrupt:

  • When the Interrupt signal is sent to CPU, the microprocessor checks its priority index in the Interrupt Request Queue (IRQ).
  • If the priority index of the interrupt received is higher than the current task, then the CPU stops and stores the current process.
  • Checks the source of the Interrupt and calls the relevant Interrupt Service Routine (ISR) to serve the Interrupt request.
  • After finishing the Interrupt request, the CPU restores and continues with the stored process.
  • Interrupt Request Line is the Priority Index of an interrupt request from a device or software.
  • IRQ lines are pre-assigned for particular devices when they are installed on the computer.
  • All interrupts are not treated equally — CPU has to give attention first to the device with priority index-1, usually the keyboard.
  • It serves the interrupts of a device or software according to its priority index that is pre-assigned in the Interrupt Request Line (IRQ) for all peripheral devices.
  • Polling refers to the continuous checking of the status of an external device by the CPU or a client program.
  • If the device is ready, the computer will serve its request or send the data; if not, the computer will return to a different task.
Example: When a printer is connected via a parallel port, the computer continually interrogates the printer whether it is ready to receive the data or not.
  1. A portion of data from the document to be printed is sent to the printer buffer from the computer memory.
  2. The processor continues with other jobs.
  3. The printer buffer is emptied by sending the contents to the printer.
  4. When the print buffer is empty, an Interrupt signal is sent to the processor requesting further data to be sent to the buffer.
  5. The processor stops its present job to refill the buffer.
  6. The process continues until the whole file is printed.

Flowchart — Buffers & Interrupts when printing:

Any data to send to printer?
No → Processor continues with its tasks (loops back)
Yes → Data from document is sent to the printer buffer from computer memory
→ Contents of printer buffer are emptied to the printer; data is printed
All data sent to printer?
No → Processor carries out other tasks while buffer is being emptied (loops back)
Yes → Printer buffer becomes empty
→ An interrupt signal is sent to the processor
→ This interrupt requests more data to be sent to the printer
→ Current task is suspended whilst the interrupt is serviced
  1. Microprocessor fills the buffer with data.
  2. Processor continues with other jobs.
  3. Buffer is emptied by sending the data to the storage device.
  4. When the buffer is empty, an Interrupt signal is sent to the processor requesting further data to be sent to the buffer.
  5. Processor stops its present job to refill the buffer.
  6. The process continues until the whole file is written to the Hard disk, DVD or SSD.

BIOS & Startup

(a) BIOS — description and function:

  • BIOS stands for Basic Input-Output System.
  • BIOS program is stored in a special type of ROM chip called EEPROM, whereas BIOS settings are stored on a CMOS Chip (Complementary Metal Oxide Semiconductor).
  • The microprocessor needs the BIOS program to start up the computer system after it is powered ON.
  • BIOS acts as a mediator between the microprocessor and Input-Output devices.
  • It allows the CPU to locate all necessary Input-Output devices and check if they are all properly functional.
  • It locates the Operating System and loads the key parts of OS into RAM memory from the Hard disk or SSD.
  • Operating system is required to provide a platform on which the application programs can run successfully.

(b) Task of BIOS when a computer is first powered up:

  1. BIOS first determines whether all the necessary hardware and peripheral devices are in place and operational — called Power-on Self-Test (POST).
  2. It locates the Operating System and loads the key parts of OS into RAM memory from the Hard disk or SSD.
  3. It locates and loads the hardware device drivers that interface with the Operating System.
  4. It allows the BIOS settings like system date/time and hardware settings to be stored in the CMOS chip, powered by a battery on the motherboard.

(c) Different types of memory needed for BIOS software and BIOS settings:

  • BIOS is firmware stored in EEPROM, and BIOS settings are stored on a CMOS chip.
  • EEPROM (Electrically Erasable Programmable ROM) is a special type of ROM — a flash memory chip which retains data even when the computer is powered OFF. It means technically BIOS can be rewritten, updated or even deleted by the user.
  • CMOS (Complementary Metal Oxide Semiconductor) is a chip that needs power all the time to retain data — the power is provided by a battery on the motherboard. If the battery is removed, then CMOS will lose all hardware settings and system configuration and will reset to default settings of BIOS.
  • BIOS program accesses BIOS settings to start up the computer system when it is powered ON. BIOS settings store and maintain the system date/time, customized hardware settings and system configuration.

Revision: Statements and Key Computing Terms

Key Term Statement
Operating systemSystem software that controls hardware and allows other software to run on the computer. It manages many basic functions of the computer by running in the background.
UtilitiesSoftware designed to carry out specific tasks on a computer — like manage, maintain and control computer resources.
Device driversSoftware that enables one or more hardware devices to communicate with the operating system. All hardware devices connected to a computer have associated drivers.
Anti-virus software / Virus checkersSoftware that runs in the background to safeguard the computer against being infected by computer virus or malware. It checks the behaviour of programs and files that could indicate a possible virus and compares it against a database of known viruses. If a virus is found, then it either quarantines or removes the infected files.
Defragmentation softwareSoftware that re-arranges the blocks of data to store files in contiguous sectors (next to each other) wherever possible to allow faster data access by reducing the HDD head movements.
Back-up utilitySoftware that is built into or bundled with an OS, used to create supplementary exact copies of files called backup. It may later be used to restore the original contents in the event of data loss.
Security softwareSoftware that manages access control and user accounts (User-IDs and passwords). Protects network interface through the use of firewalls. Uses encryption and decryption to ensure any intercepted data is meaningless without a decryption key.
ScreensaversSoftware that supplies moving and still images on the monitor screen after a period of inactivity by the computer to protect monitors.