Chapter (4)
SOFTWARE
Computer Science Department
1
System Software and Application
Software
• System software provides the services that the computer
requires, including operating system and utility software
• Application software provides the services that the user
requires. MS office, Adobe, Browser
2
Describe the difference between system software and
application software and provide examples of each
3
Software on a Computer
Application Software
Runs on
Operating System
Runs on
Firmware
Is loaded by the
Bootstrap
4
General Features of System
Software
• Set of programs to control and manage the operation of
computer hardware
• Provides a platform on which other software can run
• Required to allow hardware and software to run without
problems
• Provides a human computer interface (HCI)
• Controls the allocation and usage of hardware resources.
5
Utility software (utilities)
• Utility programs offered by most computer system software
include:
✔ virus checkers [Anti virus software]
✔ defragmentation software
✔ disk contents analysis and repair
✔ file compression and file management
✔ back-up software [File history]
✔ security
✔ screensavers.
6
Screensavers
• Screensavers are programs that supply moving and still
images on the monitor screen after a period of inactivity by
the computer.
• They were originally developed to protect older CRT,
modern LCD and OLED screens, this problem no longer
exists.
• However, many screensavers are also used as part of the
computer’s security system. If a computer is unused for five
minutes, for example, and hasn’t been logged out, this will
trigger the screensaver to be loaded.
7
General Features of Application Software
• Used to perform various applications (apps) on a computer
• Allows a user to perform specific tasks using the computer’s
resources
• May be a single program (for example, notepad) or a suite
of programs (for example, Microsoft office)
• User can execute the software as and when they require.
8
Operating Systems
• Every computer or device needs an operating system (OS) to run
other programs.
• Therefore an operating system is an important piece of software
for a computer.
• An OS is the framework that allows us to communicate with
computer hardware in an interactive way.
• Without this, we would not be able to tell the computer to do
anything and it would not have any instructions to follow.
9
Operating Systems
• Operating systems perform basic tasks .
• Microsoft Windows is an OS that is available for personal computers and is
now also available on some tablet and mobile technologies.
• Two other examples of OS are MAC OS X and Linux.
• A modern OS uses a graphical user interface (GUI) to allow the user to
interact with the computer.
• It provides the GUI for the user to interact with the computer.
• The layout of these features can be differ from company to company with
each aiming to create the perfect user layout.
10
Several main functions of an OS
• It manages the hardware and peripherals that are connected to
the computer.
• It manages the transfer of programs into and out of memory and
manage how the programs will be placed into the available
memory.
• It divides the processing time between the different applications
that are running.
11
Several main functions of an OS
• This allows a user to have multiple applications running at a
time.
• It manages security for the computer and manages access
rights.
• It manages file handling, allowing users to store, delete and
move files on a computer.
• It keeps track of all actions carried out on a plan.
• It manages utility software on the computer such as disk
12 defragmentation and disk formatting software.
13
Basic Functions Of An Operating System
• managing files
• handling interrupts
• providing an interface
• managing peripherals and drivers
• managing memory
• managing multitasking
• providing a platform for running applications
• providing system security
• managing user accounts
14
Graphical User Interface (GUI)
• The human computer interface (HCI) is in the form of a Command Line
Interface (CLI) or a Graphical User Interface (GUI).
• A GUI allows the user to interact with a computer (or MP3 player, gaming
device, mobile phone, etc.) using pictures or symbols (icons).
• This kind of interface is made up of icons, buttons and menus that can be
clicked to carry out tasks.
• The most common is WIMP (windows icons menu and pointing device),
which was developed for use on personal computers (PC).
• More recently, devices such as mobile phones and tablets increasingly
use touch screens and use post-WIMP interactions. With this system,
fingers are in contact with the screen allowing actions such as pinching
and rotating, which would be difficult to do using a single pointer and a
device such as a mouse.
15
Graphical User Interface
(GUI)
Interface Advantages Disadvantages
Graphical User • The user doesn’t need to • This type of interface uses up
Interface (GUI) learn any commands considerably more computer
• It is more user-friendly; icons memory than CLI interface
are used to represent • The user is limited to the
applications icons provided on the screen
• A pointing device is used to • Needs an operating system,
click on an icon to launch the such as Window to operate
application- this is simpler which uses up considerable
than typing in commands or a memory
touch screen can be used
where applications are
chosen by simply touching
the icon on the screen
16
Command Line Interface (CLI)
•Before operating systems developed to have a GUI, they had
a command line interface(CLI).
•In this type of interface a user would need to type in the
different commands they would like to carry out on the
operating systems.
•Some users still use a CLI operating systems; an example of
this is Linux.
•The advantage of CLI is that the user is in direct
communication with the computer and is not restricted to a
number of pre-determined options.
17
Command Line Interface
(CLI)
Interface Advantages Disadvantages
Command Line • The user is in direct • The user needs to learn a
Interface (CLI) communication with the number of commands to
computer carry out basic operations
• The user is not restricted • All commands need to be
to a number of typed in which takes time
pre-determined options and can be error-prone
• It is possible to alter • Each command must be
computer configuration typed in using the correct
settings format, spelling and so on
• Uses a small amount of
computer memory
18
Who would use
• CLI: a programmer, analyst or technician; basically
somebody who needs to have a direct communication with
a computer to develop new software, locate errors and
remove them, initiate memory dumps (contents of the
computer memory at some moment in time)
• GUI: the end-user who doesn’t have or doesn’t need to
have any great knowledge of how the computer works; a
person who uses the computer to run software or play
games or stores/ manipulates photographs
19
Embedded systems
• An embedded system is a combination of hardware and
software
• Designed to carry out a specific set of functions
• Hardware is electronic, electrical or electro-mechanical
20
Embedded systems
microcontrollers Has a CPU in addition to some RAM and ROM and
other peripherals all embedded onto one single chip
(together they carry out a specific task)
microprocessor integrated circuit which only has a CPU on the chip
(there is no RAM, ROM or peripherals – these need
to be added)
system on chips (SoC) this may contain a microcontroller as one of its
components (they almost always will include CPU,
memory, input/output (I/O) ports and secondary
storage on a single microchip)
21
Examples of the use of embedded
systems
• Motor vehicles
• Set-top box
• Security systems
• Lighting systems
• Vending systems
• Washing machines
22
23
Interrupts
• An interrupt is a signal.
• When this signal is received it will inform software that
something has happened.
• An interrupt could happen by many sources.
• It could happen when a user press keys on the keyboard.
• It could be form a printer connected to the computer.
• The signal will come from deceive attached to the
computer or from a programming within the computer.
24
Interrupts
• An interrupt will cause the operating system to stop and
then the operating system will need to work out what to
do next.
• After an interrupt is detected, the operating system will
either continue running the program it was currently
running or it will begin running a new program.
• A computer can only run one program at a time, but
because the program it is currently running can be
interrupted to run another program, it can perform
multiple tasks.
• It will take turns to run the program so that it appears to be
running them at the same time which is called
“multitasking”.
25
Interrupts
• An OS will contain a program called an interrupt handler.
• An interrupt handler will priorities the interrupt signal as it
received them and places them in a queue to be handled.
• There are two main categories of interrupts, hardware
interrupts and software interrupts.
• An example of a hardware interrupt is one that is
generated when a peripheral such as a keyboard or a
printer produces the signal.
• An example of a software interrupt is when an application
is opened or closed.
26
27
Interrupts
• Once the interrupt signal is received, the microprocessor either
carries on with what it was doing or stops to service the device
or program that caused the interrupt.
• The computer needs to identify the interrupt type and establish
the level of interrupt priority.
• Interrupts allow computers to carry out many tasks or to have
several windows open at the same time.
• An example would be downloading a file from the internet at
the same time as listening to some music from a library.
• In reality, data is being passed in and out of memory very rapidly
allowing both functions to be serviced.
• This can all be achieved by using an area in memory known as a
buffer.
• A buffer is a memory area that stores data temporarily
28
Interrupts
Software Hardware
Division by 0 Data input e.g, key pressed on a
keyboard, mouse click.
Two processes attempting to access the Error from hardware, e.g: printer out of
same memory location. paper
Program request for input Hardware failure.
Output required. Hard drive signal that it has read data.
Data required from memory New hardware device connected
29
High-level and low level languages
• High-level languages are much closer to what humans
recognize in terms of language.
• This language is much easier to read and write programs in
than low-level languages or machine code.
High-level languages
The first high-level languages were developed in the 1950s.
One of the very first was FORTRAN (short for ‘formula
translation’).
30
High-level languages
• This was invented in 1954 by John Backus for IBM to be
used as a practical alternative to assembly language in
programming scientific and engineering projects.
• The development of further high level languages followed;
the most common include BASIC, C, C++, C#, Pascal, Java
and Python.
• High-level languages are much easier for humans to read.
• The features of a high-level language are that it deals with
structures such as variables, arrays, loops, conditions,
functions and procedures, whereas machine code deals
with memory addresses, registers and operation codes.
31
High-level languages
• High-level languages are mostly independent of any
hardware they run on, unlike assembly language which is
specific to the hardware it runs on.
• Therefore a computer programmer can write programs in
a high-level languages, they can be run on any kind of
computer.
32
High-level languages
name = input (“What is your name?”)
print (“Hello” + name)
• In the first line of code above, the program is creating a
variable called ‘name’.
• It is creating a place for the user to input some data and
outputs a question ‘What is your name?’ for the user.
• In the variable ‘name’, it will store the data that user inputs.
• So in one line of it is doing at least four things.
• In the second line, it is creating an output that will display
the text ‘Hello’.
33
High-level languages
• It is then recalling the data that is stored in the variable
‘name’ and displaying that also.
• Therefore in two lines of code this small program is doing
at least seven things.
• In order to be read by a computer, high-level languages
need to be translated into machine code.
• This translation is done by a compiler or an interpreter.
34
Compiler
• A compiler is a computer program that takes code written in a high-level
language and translates it into machine code.
• The code produced by a programmer is called source code.
• This source code is generally written in a high-level language and needs to
be translated into machine code to be read by the computer.
• The source through the compiler is called compiling the code.
• Each high-level language had its own compiler.
• As compiler translates the whole of the source code in one go, if there are
errors in the code it will not compile.
• The machine code from the compiler is output as an executable file (.exe).
• The file can then be stored for future use whenever the program is needed.
35
An interpreter
• An interpreter translates the source code into machine code one
line at a time.
• If there are many errors in the program they will be detected
when that line of source code is reached.
• This is a great advantage of an interpreter.
• It takes up less memory than a compiler.
• An interpreter has to analyses and translate each line of code to
run the program each time.
• They are mostly slower than compilers, but will then run it much
quicker once compiled.
36
Compiler VS Interpreter
Compiler Interpreter
A compiler translate the whole of the An interpreter translate the source
source code in one go program line by line
The compiler will run through the Can make debugging a program easier
program and produce a report of all because they can track errors line by
the errors it detects line
It is faster It is slower
It is more efficient It is less efficient
It consumes less time It consumes more time them
compiler
Compilers are larger in size Interpreters are smaller than compiler
The compiler is output as an Interpreter can't produce exe file
executable file
37
Low Level Languages
• The raw code that a computer processes is called machine
code. It is a series of binary numbers.
• Machine code can also be referred to as “object code”.
• Machine code is very difficult to understand but it can be
represented in a slightly simpler fashion as assembly
language.
38
Low Level Languages
• Assembly language assigns mnemonic codes.
• ADD - use addition in a calculation
• SUB – use subtraction in a calculation
• INP – input data
• OUT – Output data
39
Low Level Languages
• Low level languages are basically a computer’s native
language.
• Machine code is directly executable by a computer and
assembly language uses software called an assembler to be
converted into machine code.
40
Low Level Languages
• Low level languages are basically a computer’s native language.
• Machine code is directly executable by a computer and assembly
language uses software called an assembler to be converted into
machine code.
• An assembly is a computer program that will take the basic instructions
(mnemonics) used in assembly language and convert them into machine
code.
41
Low Level Languages
• In low level languages each line of code will perform only one task.
• Example:
• INP Input first number
• STA ONE Input in an address named ONE
• INP Input second number
• ADD ONE Input to the number stored in ONE
• OUT Output the result
• HLT stops the program
• ONE DAT Assigns the name ONE to the next data location
42
Low Level Languages
• Low level languages are still used in software applications
such as device drivers for hardware, for example a graphics
card and printer drivers
• Low level languages are mostly still used where very close
control of the processing in the CPU is needed.
43
Low level language High Level Language
Example include machine code and Examples include C, Java and Python
assembly language
Difficult for humans to understand Much easier for humans to
but can be easily executed by a understand and much closer to
computer; a computers’ native natural language
language
Needs an assembler to be processed Needs to be translated by a complier
or an interpreter
One line of code does one thing One line of code can do several
things
44
Integrated Development Environment (IDE)
• A suite of programs used to write and test a computer
program written in a high-level language.
• There are many different IDEs available; some just support
one programming language, others can be used for several
different programming languages.
• PyCharm (for Python), Visual Studio (for Visual Basic) as
your IDE
45
Roles or features of IDE
• IDEs usually have these features:
✔ code editors
✔ a translator
✔ a runtime environment with a debugger
✔ error diagnostics
✔ auto-completion
✔ auto-correction
✔ an auto-documenter and prettyprinting.
46
Code Editors
• Allows a program to be written and edited without the
need to use a separate text editor.
• Speeds up the program development process
47
Translator
• Most IDEs usually provide a translator, this can be a compiler
and/or an interpreter, to enable the program to be
executed.
• The interpreter is often used for developing the program
and the compiler to produce the final version of the
program to be used.
48
A runtime environment with a debugger
• A debugger is a program that runs the program under
development and allows the programmer to step through
the program a line at a time (single stepping) or to set a
breakpoint to stop the execution of the program at a
certain point in the source code.
49
Error diagnostics and
auto-correction
• Dynamic error checking finds possible errors as the
program code is being typed, alerts the programmer at the
time and provides a suggested correction.
• Many errors can therefore be found and corrected during
program writing and editing before the program is run.
50
Auto-completion
• Code editors can offer context-sensitive prompts with
text completion for variable names and reserved words.
51
Auto-documenter and
Prettyprinting
• IDEs can provide an auto-documenter to explain the function and
purpose of programming code.
• Most code editors colour code the words in the program and lay
out the program in a meaningful way – this is called
prettyprinting.
52
Explain the role of an IDE in writing
program code and the common
functions IDEs provide
• Including:
✔ code editors
✔ run-time environment
✔ translators
✔ error diagnostics
✔ auto-completion
✔ auto-correction
✔ Prettyprint (displaying source code using differentcolours and
formatting, which make the code easier to read and understand)
53
Provide Debugging
Features
• Break point: The user sets these points, and the code stops
running on that line. This lets you check the values and
output from the code to that point.
• Variable watch window: The values of the variables of the
variables are displayed while the code is running, so they
can be checked whether they are correct.
• Stepping: The program will run one line at a time, and the
user has to tell the program to move on to the next line, so
it can be checked line by line.
54
End of Lesson
55