System Software e.g. Operating System, Utility programs/Software, and device drivers [2024]
Application Software e.g. spreadsheet, word processor, web browser, etc.
System Software
An operating system (OS) is a program that, after being initially loaded into the computer by a boot program, manages all of the other application programs in a computer.
Users can interact directly with the operating system through a user interface such as a command line Interface (CUI) or a graphical user interface (GUI).
Ex- Windows, Mac, UNIX, LINUX, etc.
Processor Management: This deals with management of the Central Processing Unit (CPU). The operating system takes care of the allotment of CPU time to different processes
Device Management: The Operating System communicates with hardware and the attached devices and maintains a balance between them and the CPU.
Spooling: This is a device management technique used for processing of different tasks on the same input/output device. Ex. Printer
Memory management: Allocation and reallocation of memory, prevents two processes accessing the same memory
peripherals management: allocates data to buffers, transmits data to hardware and receives data from hardware
File Management: The operating System manages the files, folders and directory systems on a computer. Any data on a computer is stored in the form of files and the operating system keeps information about all of them using File Allocation Table (FAT).
Other uses include
provides a user interface
input/output control/handling
security
Utilities (e.g. copy, save, delete, rename, etc.)
load/run software
error reporting/handling
indicates that something requires the attention of the processor/OS/CPU
Signal sent to a processor which may cause a break in the execution of the current routine, according to priorities
Can be Software or Hardware based
The software in the computer that will receive and manage all interrupt signals: Operating System, Interrupt handler or Interrupt service routine [2020, 2023]
Software Interrupts
Division by 0
Null value
Two processes attempting to access the same memory location
Program request for input
Output required
Data required from Memory
Hardware Interrupts
Data Input, E.g. Key pressed on a keyboard, mouse click
Error from Hardware, e.g. Printer out of paper, Paper jam in printer
Hardware Failure
New hardware device connected (Plugging in a device)
Descriptive examples:
An interrupt signal is sent from the printer to the computer in the following cases: [2020]
Paper jam Out of paper Out of toner/ink Buffer full Awaiting input Print complete Printer ready
how interrupts are used when a key is pressed on a keyboard. [2023]
Key press generates the interrupt
Interrupt given a priority
Interrupt is sent to CPU
Interrupt is placed in a queue
CPU stops current task to check the queue/service the interrupt ...
... using an interrupt service routine
If key press is highest priority the interrupt is processed
They are closer to the native language of a computer (binary), making them harder for programmers to understand.
They are very close to the hardware and help to write a program at the hardware level (For writing programs, hardware knowledge is a must)-Machine-dependent
Machine language and Assembly language are Low-Level Languages.
Translated program requires less memory
Write codes that can be executed faster
Few programmers write programs in low level assembly language, but it is still used for developing code for specialist hardware, such as device drivers.
Challenging to learn and understand.
Closer to human language
No prior knowledge of Hardware/computer architecture is required (Hardware Independent)
Easier to READ/WRITE/INTERPRET
Easier to debug errors
Portable (can be used in many different platforms)
Code reusability
Built-in functions/libraries (saves time to write programs)
One line of code can carry out multiple commands
Less errors
Examples include: C++, Java, Python, Visual Basic, etc.
HIGH-LEVEL LANGUAGES
High-Level Languages are easy to learn and understand.
They are executed slower than lower level languages because they require a translator program.
They do not provide many facilities at the hardware level.
For writing programs, hardware knowledge is not required.
The programs are easy to modify.
Portable
BASIC, Perl, Pascal, COBOL, Ruby etc are examples of High-Level Languages.
LOW-LEVEL LANGUAGES
Low-Level Languages are challenging to learn and understand.
They execute with high speed.
They are very close to the hardware and help to write a program at the hardware level.
For writing programs, hardware knowledge is a must.
Modifying programs is difficult.
Not portable
Machine language and Assembly language are Low-Level Languages.
A translator is a programming language processor that converts a computer program from one language to another.
It takes a program written in source code and converts it into machine code. It discovers and identifies the error during translation.
Translating the high-level language program input into an equivalent machine language program.
Providing diagnostic messages wherever the programmer violates specification of the high-level language program.
There are 3 different types of translators as follows:
Compiler
Interpreter
Assembler
An assembler is a translator used to translate assembly language to machine language (An assembly language use mnemonics codes).
An assembler translates a low-level language, an assembly language to an even lower-level language, which is the machine code.
It is machine dependent, cannot be used in other architecture.
A small change in design can invalidate the whole program.
It is difficult to maintain.
Examples
Fortran Assembly Program (FAP)
Macro Assembly Program (MAP)
Symbolic Optimal Assembly Program (SOAP)
(Used while developing and testing the application)
Interpreter programs are able to read, translate and execute one statement at a time from a high-level language program.
Used during the development of a program. They make debugging easier as each line of code is analyzed and checked before execution.
No executable file is produced. The program is interpreted again from scratch every time you launch it.
It directly executes the operations specified in the source program when the input is given by the user.
It gives better error diagnostics than a compiler.
Compiler is a translator which is used to convert programs in high-level language to low-level language (or high-level language into machine code (object code))
It translates the entire program at once
Reports the errors in source program encountered during the translation
Once compiled (all in one go), the translated program file can then be directly used by the computer and is independently executable
Compiling may take some time but the translated program can be used again and again without the need for recompilation
Explain why a programmer would make use of both an interpreter and a compiler? [2020]
− To translate the high-level language into low-level language
− Interpreter used whilst writing the program
− Interpreter used to debug code line by line
− Compiler used when program completed
− Compiler used to create separate executable file (so compiler no longer needed)
− If it runs first time in a compiler there are no syntax errors
Translates high-level languages into machine code
An executable file of machine code is produced (object code)
Compiled programs no longer need the compiler
Error report produced once entire program is compiled. These errors may cause your program to crash
Compiling may be slow, but the resulting program code will run quick (directly on the processor)
One high-level language statement may be several lines of machine code when compiled
Temporarily executes high-level languages, one statement at a time
No executable file of machine code is produced (no object code)
Interpreted programs cannot be used without the interpreter
Error message produced immediately (and program stops at that point)
Interpreted code is run through the interpreter (IDE), so it may be slow, e.g. to execute program loops
Translates low-level assembly code into machine code
An executable file of machine code is produced (object code)
Assembled programs no longer need the assembler
One low-level language statement is usually translated into one machine code instruction
An integrated development environment (IDE) is a software suite that consolidates basic tools required to write, test, and run programs.
Most HLLs offer the use of an IDE
This contains:
code editors
run-time environment
translators
error diagnostics
auto-completion
auto-correction
prettyprint