Professional Documents
Culture Documents
P1_Unit 4 Software
P1_Unit 4 Software
Software
System Application
software software
Operating Utility
systems software
System software
• System software provides the
services that the computer requires
• This software enables the computer or
device to work, or helps to maintain the
good working order of the computer
• Operating systems
• An operating system is responsible for important functions
such as how a file is written to a hard drive or a program is
loaded into RAM
• Utility software
• Utility software helps in configuring and maintaining
the computer or device
Application software
• Application software
provides services that
the user requires
• Apps on smartphones
and tablets get their name
from application software
• Application software includes:
• Traditional computer software such
as word-processors and spreadsheets
• More modern apps such as social media
apps or video players
• Business software such as accountancy programs
System Software: Utility software
• The following are examples of utility software:
• Compression tools
• Backup software
• Disk clean-up
• Disk defragmentation
• Antivirus
System Software: Disk
defragmenter
• When files are saved to a magnetic hard disk they
are stored in the next available space
• This can lead to files being split into fragments which take
longer to access as the drive head has to move more
• Defragmentation software puts each file back into one
contiguous location
File A
File B
File C
File D
System Software: Disk clean-up
• Disk drives do not need actual cleaning as they
are sealed
• However disk clean-up tools help to improve free
space and system performance by:
• Deleting temporary files
• Clearing cached files for a web browser
• Removing unnecessary
program files
System software: Backup and
antivirus utility software
• Hard drives sometimes fail and may also be stolen
• Regular backups are made to external drives or
cloud backup services
• Antivirus software scans computers to
make sure that they don’t
contain viruses
System Software: Operating system
• An operating system is responsible for managing the
hardware and software in a computer including:
• Managing files
• Providing an interface
• Managing peripherals and drivers
• Managing memory
• Managing multitasking
• Providing a platform for running applications
• Providing system security
• Managing user accounts
OS provides User interface
• Without a user interface we would have
no way of communicating with a computer
• The user interface allows
the user to tell the
computer what to do.
OS Provide a platform for running applications
• When you open a program the operating system
loads the program into RAM
• The operating system provides a platform for each program
that is running on the computer
• The operating system deals with where the program and data
goes in memory (memory management), the saving of files
and how much time each program has to use the CPU
(task management)
• This is why software is released for a particular operating
system as well as a particular computer architecture
OS does Memory management
• To run a program, the Main memory (RAM)
computer must copy each File A
program from storage into Program D
main memory
Program A File C
• Data used by the program is also
copied into main memory
Program A
• The operating system keeps a Program B
Hardware
Get attention/ Interrupt
When you need to get the
attention of someone who is busy
you need to interrupt them
• In the same way, peripheral devices /
software
also need to get the attention of the CPU
• An interrupt is a signal to the processor to
stop its current processing and service the
interrupt first and then go back to the
original task.
How Interrupt is serviced
Once the CPU has been interrupted, it needs to process the interrupt. The
current process will need to pause, but it will need to be restarted later.
• Processor runs the interrupts program code known as an Interrupt
Service Routine (ISR). This is also known as an interrupt handler.
• Saves the status of the current process to return later to this.
• The ISR needs to execute the interrupt as quickly as possible as it
has interrupted the CPU from the task it was working on
• For instance, if a key is pressed, the ISR may save the key that was
pressed. Later, a word-processor task can process it further
Interrupt service
Interrupt routine (ISR) Processor returns to
generated previous task
To identify that the processor's attention is
required // to stop the current process/task
0010110001101011
• This makes it very difficult for people
to understand as a full program
would appear as follows:
0010011001000111
1100100010010110
1100101101000010
1011001001011011
1110100010000011
1110111011101110
0010111111000011
1011001000110010
Machine code / instruction set
• Each different type of processor has its own set of
machine code instructions
• A typical machine code instruction in a simple
processor might occupy two bytes:
Opcode Register Operand
001000 10 0001 0000
• The opcode is the instruction/ Mnemonic to be
processed, e.g. ADD, SUB, LOAD, STORE
• The operand is either a value to be operated on or the
address of the value to be operated on
Machine code/ low level language
• Machine code is sometimes called a ‘first
generation language’
• In the early days of computers, the binary itself was entered
through a set of switches on the computer
• The ‘second generation’ of programming
languages was assembly code, which used
mnemonics to represent each opcode, and a denary
number or identifier for the operand
Opcode Register Operand Mnemonic Register Operand
Slower execution as every line is translated Fast execution as the whole program is
before it is executed already ready to execute
A user has to have the interpreter on their The program runs on the computer without
computer in order to run the program the need for an interpreter or compiler as if it
is already compiled to an executable file
Interpreter does not produce an object After the machine code is produced and
/machine code for the whole program original source code is not available then
changes can’t be made to the program if
required.
For any future changes, original code is to
be changed and compiled again
Why use assembly language
• Device drivers need to control specific parts of hardware so
are usually written in assembly
• Other common uses for assembly are the bootstrap stored in
ROM, control programs in embedded systems such as a
dishwasher, washing machine or car
• As the programmer has complete control of the hardware
when they use assembly, they are able to make key parts of
programs more efficient in processing speed and the use
of memory
• Assembly code allows the direct manipulation
of hardware
Comparison of Assembler,
Compiler
Assembler Compiler Interpreter
Advantages Direct manipulation Easier for Easier for
of hardware such as programmers to programmers to
needed in device understand as it’s a understand as it’s a
drivers; high-level language; high-level language;
Used to make Code only needs to
efficient code be compiled once;
The user doesn’t
need a compiler
Disadvantages Difficult for people to Slow translation to Slower than compiled
understand, learn, machine code. If code as the
read and write program source code translation occurs
needs to be changed line by line every
then program should time the program is
be complied again run
High- and Low-Level Programming
languages
High Level Language- Python, Java, Low Level Language- Assembly , Binary
C#, PHP ( machine code)
• Machine dependent instructions , this makes
• Easy to learn , read and understand by the it not portable , can be run on a specific
programmers because it is closer the human machine
language ( similar key words, math operators).
• Code takes less time and space in memory to
• Can be written and constructed in shorter time due
to structures in the language ( loops, selections) execute. Perform tasks quickly.
• Instructions are not specific to any hardware that • It can be used to directly access and
makes it portable. manipulate the hardware in the computer,
• Less chances of errors, due to similar language that is why they are used to construct device
keywords and operators ( if, for, + , -) driver, system program ( OS)
• Debugging and troubleshooting is easy because of
similar keywords , structure and operators the we
use in English and Math.
• Easy to maintain and extend ( libraries )
IDEs Syntax highlighting
• The following screenshot
shows some of the
features of an IDE
Line numbers
Breakpoints
Code folding
Variable watching
Code editors
• The editor provided in an IDE contains additional
facilities to a basic text editor, such as:
• Line numbers
• Syntax highlighting
• Prettyprint
• Auto-completion
• Auto-correction
Line numbers
• Line numbers allow a programmer to clearly see
each new line of code
• When errors are found, the line number that they occur on will
also be stated
• In some IDEs, parts of the program that the programmer
doesn’t need to see can be folded