42
2 HARDWARE AND SOFTWARE
2 Hardware and software
2.1 Mainframe computers and
supercomputers
Mainframe computers are often referred to simply as mainframes. They are
used mainly by large organisations for bulk data-processing applications such as
censuses, industry and consumer statistics, and
transaction processing. Most
individuals tend to use personal computers, laptops or tablets, but mainframes are
much larger and have more processing power than these and cost considerably
more to buy. In 2020, the cheapest mainframe would cost at least $75 000. In
the early days of computers, the central processing unit was very large compared
to modern-day computers and used to be housed in a steel cabinet. This was often
referred to as the ‘main frame’ and sometimes as the ‘big iron. Although many
people thought that with the advent of PCs, mainframes would die out, they
have continued to evolve and are still in major use today, mainly because of their
features such as
RAS, which we will go into in more detail later in this section.
Most PCs and laptops used to have a single processor, but today they tend to
have a CPU with many cores which gives the effect of having many processors.
This allows these computers to carry out
parallel processing rather than the
serial processing of their predecessors. Serial processing is when the PC performs
tasks one at a time, whereas parallel processing allows several tasks to be carried
out simultaneously. Currently, the best performing PCs have a processor with
18 cores, which allows the computer to carry out 18 tasks at the same time,
resulting in much faster performance.
A mainframe computer can have hundreds of processor cores and can process
a large number of small tasks at the same time very quickly. A mainframe is a
multitasking, multi-user computer, meaning it is designed so that many different
people can work on many different problems, all at the same time. Mainframe
In this chapter you will learn:
+ thecharacteristicsandusesofmainframe
computers and supercomputers
+ thetypesandusesofsystemsoftware
+ theneedfor,typesandusesofutility
software
+ the use of custom-written software and off-
the-shelf software
+ thetypesandusesofuserinterfaces.
Before starting this chapter you should:
+ be familiar with the terms application software’, ‘CPU’, ‘command
line interface’, ‘device, graphical user interface, ‘medium,
operating system, processor’ and ‘utilities.
43
2.1 Mainframe computers and supercomputers
2
computers are now the size of a large cupboard, but between 1950 and 1990 a
mainframe was big enough to fill a large room, so you can see how much the
average mainframe has decreased in size while also improving its performance.
Mainframes are not the only computers within large companies as many
organisations own hundreds of personal computers (PCs) and laptops. Despite
their popularity amongst commercial organisations, most other people are
completely unaware of their existence. Mainframe computers have almost total
reliability, being very resistant to
viruses and Trojan horses.
Even more powerful are modern
supercomputers, which can have in excess
of 100 000 processing cores. In Chapter 1, batch processing of payroll was
described. A supercomputer can multiply different hourly wage rates from a
master file by a list of hours in a transaction file
for hundreds of workers in roughly the same
time that it would take a personal computer to
calculate the wages of just one employee. The Oak
Ridge National Laboratory in the USA launched
its
Summit supercomputer in 2018. It claimed, ‘if
every person on Earth completed one calculation
per second, it would take the world population
305 days to do what Summit can do in 1 second.
The Summit supercomputer, however, fills a room
the size of two tennis courts.
2.1.1 Mainframe computers
The most advanced mainframe computer at the
time of publication was the IBM z15, shown in
Figure 2.1. The cabinet itself is taller than the
average person.
The IBM z15 with up to 190 cores and its
predecessor, the Z14 with 170 cores, are used
by large banking organisations, government
departments and large insurance organisations.
2.1.2 Supercomputers
V Figure 2.2 The Cray XC40 supercomputer
V Figure 2.1 The IBM z15
mainframe computer
(© IBM Corporation)
44
2 HARDWARE AND SOFTWARE
2
This is a picture of the Cray XC40 supercomputer, which can have up to
172000 processor cores. Several countries have one of these and they use them
in the fields of weather forecasting and scientific research, such as the study of
astrophysics and mathematical and computational
modelling.
2.1.3 Characteristics of mainframe computers and
supercomputers
Longevity
Mainframe computers have great longevity, or lifespans. This is because they
can run continuously for very long periods of time and provide businesses with
security in the shape of extensive encryption in all aspects of their operation.
Governments, banking organisations and telecommunications companies still
base their business dealings on mainframes. Many of these computer systems
have existed for decades and are still working well. To shut them down then
dispose of the hardware is very expensive, as is the hiring of companies to
securely remove their data.
Although they tend not to cause problems, there are several factors threatening
their continued existence. One is the lack of experienced IT professionals who
can maintain or program mainframes. Many of the older computer systems still
work on the COBOL programming language, which is being taught at fewer and
fewer universities in recent times. It has been gradually replaced by courses in
Java, C and Python. Yet as recently as 2017, the news agency Reuters stated that
95 per cent of ATM transactions were carried out by computers using COBOL
code. Another threat to mainframes comes from new technological developments,
specifically Cloud computing, which is accessible from anywhere, thereby
reducing the need to maintain expensive hardware within an organisation. The
solution may well be to combine the use of mainframes with Cloud computing,
thus giving organisations the flexibility and accessibility of the Cloud, while at the
same time providing the processing power and security of the mainframe.
Despite these threats, the mainframe has remained popular for a long time,
largely as a result of its efficiency and dependability. The mainframe is still
able to process more transactions and calculations in a set period of time when
compared with alternatives and it continues to operate with a minimum of
downtime, which means that companies can operate 24 hours a day, every day.
In contrast, supercomputers have a lifespan of about five years. Research
institutions and meteorology organisations are always looking for faster ways to
process their data and so, unlike companies using mainframes, will tend to look
at replacing their existing systems whenever much faster supercomputers come
on to the market. Companies using mainframes are more inclined to modernise
them using different software tools.
RAS
The term ‘RAS’ is frequently used when referring to mainframe computers and
stands for reliability, availability and serviceability. RAS is not a term that is
used, on the whole, with supercomputers.
Reliability
Mainframes are the most reliable computers because their processors are able
to check themselves for errors and are able to recover without any undue effects
on the mainframe’s operation. The systems software is also very reliable, as it is
thoroughly tested and updates are made quickly to overcome any errors.
45
2.1 Mainframe computers and supercomputers
2
Availability
This refers to the fact that a mainframe is available at all times and for extended
periods.
Mean time between failures (MTBF) is a common measure of
systems, not just those involving computers. It is the average period of time that
exists between failures (or downtimes) of a system during its normal operation.
Mainframes give months or even years of system availability between system
downtimes. In addition to that, even if the mainframe becomes unavailable
due to failure, the length of time it is unavailable is very short. It is possible
for a mainframe to recover quickly, even if one of its components fails, by
automatically replacing failed components with spares. Spare CPUs are often
included in mainframes so that when errors are found with one, the mainframe
is programmed to switch to the other automatically. The operator is then alerted
and the faulty CPU is replaced, but all the time the system continues to work.
Serviceability
This is the ability of a mainframe to discover why a failure occurred and means
that hardware and software components can be replaced without having too
great an effect on the mainframe’s operations.
Security
In addition to their other characteristics, mainframes have greater security
than other types of computer systems. Data security is considered to be the
protection of data from intentional or accidental destruction, modification or
disclosure. As has already been mentioned, mainframes are used to handle large
volumes of data. Most of this is personal data and, especially in the banking
sector, it has to be shared by the banks with customers. This means that the
data has to be extremely secure so that only those users entitled to see the data
can do so; in other words, customers must be able to see their own data but not
each other’s. This applies to other uses of mainframes. Many companies store
the personal information of their employees, customers, and so on. Fortunately,
the mainframe computer has wide-ranging security that enables it to share a
company’s data among several users but still be in a position to protect it. A
mainframe has many layers of security including:
» user identification and authentication, although more and more systems are
using multi-factor authentication, which is a combination of two or more of
the following: a password, a physical token, a biometric identifier or a time-
restricted randomised PIN
» levels of access, which means that it depends on a user’s level of security as
to which sets of data they can access
» encryption of transmitted data and data within the system
» secure operating systems
» continual monitoring by the system for unauthorised access attempts.
In addition to the use of supercomputers to perform massive calculations, they
may also be used to store sensitive data such as DNA profiles. This obviously
requires a very high level of security. Most supercomputers use end-to-end
encryption, which means that only the sender or recipient is able to decrypt and
understand the data.
Performance metrics
The performance metrics of a computer are basically the measures used to
determine how well, or how fast, the processor deals with data. The speed of a
mainframes CPU is measured in millions of instructions per second (
MIPS).
46
2 HARDWARE AND SOFTWARE
2
However, it is not always the best measure, because not all instructions are the
same. Mainframes use a very large number of different instructions, with some
being straightforward and easy to carry out, while others can be more complex
and slower to process. An application using five million simple instructions will
take a lot less time than one using five million complex ones. In addition, the
number of available instructions is increasing as time goes by and mainframes
improve. It is important that the comparison between the performance of one
mainframe and another is made by measuring how fast the CPUs are when
carrying out the same task. This is referred to as a benchmark test. This measure
is usually obtained when processing application software. MIPS are often linked
to cost by calculating how much a mainframe costs per one million instructions
per second.
Supercomputers use a different set of metrics. As they are used mainly with
scientific calculations, their performance is measured by how many FLoating
point Operations can be carried out Per Second (
FLOPS). Since the original
supercomputers were developed, speeds have increased incredibly and are
now measured in petaflops. One petaflop is 1 000000000 000 floating point
operations per second. Experts are already using the term exaflops, which are
1000 times faster than petaflops, and are expecting the first supercomputer
to attain this speed sometime in the current decade. The speed of the current
fastest supercomputer, at the time of publication, is 148 petaflops and even the
tenth fastest operates at 18 petaflops.
Volume of input, output and throughput
The volume of input, output and throughput has to be considered when
describing computers.
Mainframes have specialised hardware, called peripheral processors, that deal
specifically with all input and output operations, leaving the CPU to concentrate
on the processing of data. This enables mainframes to deal with very large
amounts of data being input (terabytes or more), records being accessed, and
subsequently very large volumes of output being produced. Modern mainframes
can carry out many billions of transactions every day. This large number of
simultaneous transactions and extremely large volumes of input and output in a
given period of time is referred to as ‘throughput’.
A supercomputer is designed for maximum processing power and speed, whereas
throughput is a distinct mainframe characteristic.
Fault tolerance
A computer with fault tolerance means that it can continue to operate even if
one or more of its components has failed. It may have to operate at a reduced
level, but does not fail completely. Mainframe computers have the characteristic
of being fault-tolerant in terms of their hardware. While in operation, if a
processor fails to function, the system is able to switch to another processor
without disrupting the processing of data. The system is also able to deal with
software problems by having two different versions of the software. If the first
version produces errors, the other version is automatically run.
Supercomputers have far more components than a mainframe, with up to a
thousand times more processors alone. This means that statistically, a failure
is more likely to occur and consequently interrupt the operation of the system.
The approaches to fault tolerance are much the same as those for mainframe
computers, but with millions of components, the system can go down at any
time, even though it tends to be up and running again quite quickly.
47
2.1 Mainframe computers and supercomputers
2
Operating system
Most mainframes run more than one operating system (OS) at any given time
and the use of z/OS, z/VM
®
, and Linux
®
(which are all different operating
systems) at the same time often occurs. The OS on a mainframe divides a
task into various sub-tasks, assigning each one to a different processor core.
When each sub-task has been processed, the results are recombined to provide
meaningful output. This is called parallel processing and it is what makes a
mainframe far more efficient than a PC, which, despite having more than one
core these days, has a very limited capability regarding parallel processing.
Supercomputers tend to have just one OS, Linux, but most supercomputers
utilise
massively parallel processing in that they have many processor cores,
each one with its own OS. Linux is the most popular, mainly because it is open-
source software, that is, it is free to use.
Type of processor
Early mainframes had just one processor (the CPU), but as they evolved
more and more processors were included in the mainframe system and the
distinction between the terms ‘CPU’ and ‘processor’ became confused. One
major mainframe manufacturer called them ‘CPU complexes’, which contained
many processors. The number of processor cores found in a mainframe is now
measured in the hundreds.
By contrast, supercomputers have hundreds of thousands of processor cores.
Unlike mainframes, modern supercomputers use more than one
GPU or
graphics processing unit.
Heat maintenance
Because of the large number of processors in both mainframes and
supercomputers, overheating becomes a major problem and heat maintenance
or heat management, as it is often called, has to be implemented. In the early
days of mainframe computing, the heat produced by the computer could not
be controlled using cooling by fans. Liquid-cooling systems had to be used.
When integrated circuits were developed in the 1970s and became universal in
the 1980s, mainframes were developed which produced less heat and so fans
were able to dissipate the heat. However, recent developments in mainframe
technology involving more powerful hardware mean the overheating issue has
resurfaced. More powerful systems produce more heat. What were considered to
be a relatively cheap option – air cooling systems – are becoming more complex
and more expensive to use in more powerful systems. At the same time, water-
cooling solutions have become more cost-effective. We now appear to have come
full circle and mainframe manufacturers are once again recommending water-
cooled systems for larger machines.
The overheating problem has always been present with the use of
supercomputers. The large amount of heat produced by a system also has
an effect on the lifetime of components other than the processors. Some
supercomputers draw four or more megawatts of power to keep them operating
at high efficiency. That is enough to power several thousand homes! This,
together with having so many processors very close together, results in a great
deal of heat being produced and requires the use of direct liquid cooling to
remove any excessheat.
48
2 HARDWARE AND SOFTWARE
2
Activity 2a
Explain what is meant by these terms:
1 MIPS
2 FLOPS
3 Fault tolerance
2.1.4 Mainframe computer uses
Mainframe computers play a vital role in the daily operations of many
organisations. Finance companies, health care providers, insurance companies,
energy providers, travel agencies, and airlines all make use of mainframes.
By far and away, however, the greatest use of mainframes is in the banking
sector, with banks throughout the world using mainframes to process billions
of transactions. The key benefit of mainframes is their ability to process many
terabytes of data, which is very useful when carrying out batch processing.
Batches of transactions are processed by the mainframe without user
interaction. Large volumes of data are read and processed, then customers
bank statements, for example, are output. During batch processing, which
usually takes place overnight, other jobs can be carried out such as back-ups.
Mainframes are also used in other areas suchas censuses, industry statistics,
consumer statistics, and transaction processing.
Census
Census is a term that, when used alone, normally refers to a population census. A
population census is an official survey of the people and households in a country
that is carried out in order to find out how many people live there. It is used
to obtain details of such things as peoples ages and types of employment. The
amount of data that has to be processed is enormous. The processing of census
data has long been associated with computers. The
UNIVAC 1, which was the
first computer on general sale to organisations or businesses, was purchased
by the United States Bureau of the Census in 1951. After that, technological
innovations have seen the production of different generations of mainframes and
other developments have enabled census agencies to become more knowledgeable
in the way they process and manipulate data. A census usually takes place every
ten years. Not surprisingly, as populations increased, each census produced more
data and so the use of mainframes to process the data was crucial. However, by
the year 2000, the increase in processing power and storage capacities of PCs
provided many countries with the opportunity to take a new approach and many
are deciding against buying expensive mainframe computers.
Industry statistics
Industry statistics are statistics that are recorded regarding trends in different
industries, such as those that process raw materials, make goods in factories,
or provide services. They can include the number and names of businesses,
the number of employees and wages paid. Some businesses in certain sectors
of industry need mainframes to process the vast amount of data which helps
to identify their major competitors. It shows their competitors’ share of the
market and the trends in their sales. This helps to identify those products
which could compete profitably with other businesses. Where companies do
not feel the need to process their own data, they can obtain reports from
organisations that collect the data for them and those companies could use
mainframes for this purpose.
49
2.1 Mainframe computers and supercomputers
2
Consumer statistics
Consumer statistics allow businesses to assess the demand for their product, that
is how many people need or want that type of product. They can inform them
about the range of household incomes and employment status of those consumers
who might be interested in the product so that a price can be set. This data will
also inform businesses of where the consumers live for local sales or how inclined
they are to use the internet for shopping. It may also allow businesses to know
how many similar products are already available to consumers and what price
they pay for them. These statistics produce an incredible amount of data and the
organisations that produce these statistics are likely to use mainframes.
Transaction processing
Transaction processing can consist of more than one computer-processing
operations, but these operations must combine to make a single transaction. Each
of the operations that constitute the transaction must be carried out without errors
occurring, otherwise the transaction will be deemed to have failed. A transaction-
processing system, in the event of an error, will remove all traces of the operations
and the system will continue as though the transaction never happened. However,
if there are no errors, the transaction is completed and the relevant database is
updated before the system continues on to the next transaction. All this, of course,
has to happen in milliseconds, as it must seem to the user that their transaction has
been carried out immediately. Transaction processing involves the use of online
processing, which was looked at in Chapter1.
One example of transaction processing is the transfer of a sum of money
from one bank account to another, for example when you pay for goods at a
supermarket checkout. The bill might be $100. The customer needs to transfer
$100 from their bank account to the supermarket’s bank account. To make it
simpler, consider that the customer and the supermarket use the same bank.
There are two operations involved, one is that $100 must be subtracted from
the customer’s account balance and the other is that $100 must be added to
the supermarket’s account balance. If either of these operations fails then the
transaction will be cancelled by the mainframe, or the bank would not be able
to balance the books at the end of the day.
Why is the mainframe computer so well suited to transaction processing? First, the
effectiveness of a transaction-processing system is often measured by the number
of transactions it can process in a given period of time. We know a mainframe can
perform hundreds of MIPS. The system must be continuously available during
the times when users are entering transactions and the system must be able to deal
with hardware or software problems without affecting the integrity of the data. It
must also be possible to add, replace, or update hardware and software components
without shutting down the system. With its ability to transfer processing from one
core to another, the mainframe is more than suitable for thetask.
Activity 2b
Give two reasons why the use of mainframes for carrying out censuses is reducing.
2.1.5 Supercomputer uses
The first use of supercomputers was in national defence, for example, designing
nuclear weapons and data encryption. Supercomputers have become important
in the field of scientific research, particularly quantum mechanics. They have
also become essential for weather forecasting. There are now many other uses of
50
2 HARDWARE AND SOFTWARE
2
supercomputers, one of which is drug research. Before a drug is tested, it needs
to be developed, but it does not start with a blank sheet of paper. Quite often the
results of previous research are stored and then compared with the results of the
new drug that is being developed. The computer is used to monitor the amount
of ingredients that are being used. It is important that the researchers can change
these amounts by the smallest fractions. Modern drug research involves the use of
complex computer
models to see how changing the structure of the drug affects
the way the body reacts. Computer models can also help to predict any side effects.
As the changes to the model are so tiny and the number of times the model must
run is so high, a computer with great computational power is required. This makes
the use of supercomputers indispensable to drug manufacturers.
Another field where supercomputers are used is genetic analysis. Finding the
genes that make humans susceptible to disease has always been very difficult.
There are so many genes, and variations of them, that humans were unable to
carry out the calculations required to identify those genes responsible. With
the advent of supercomputers, however, this task has become more manageable,
reducing the time taken to perform the calculations from months to minutes.
Here, we will focus on three uses of supercomputers: quantum mechanics,
weather forecasting and climate research.
Quantum mechanics
Quantum mechanics is the study of the behaviour of matter and light on the
atomic and subatomic scale. It attempts to describe the properties of the constituent
parts of an atom, such as electrons, protons and neutrons, and how they interact
with each other. They do not behave in the same way as larger bodies, which
obey the laws of physics. You do not need to understand quantum mechanics,
but it is important to realise that there are a very large number of calculations
which require great accuracy and thus require the use of a supercomputer. The
Juqueen supercomputer in Germany, now decommissioned, was used by a team
of physicists to calculate the difference in mass between a neutron and a proton
as well as predicting the make-up of dark matter. The Juqueen had a maximum
performance of 5 petaflops with 459 000 cores. It hasbeen replaced by the Juwels
supercomputer with a performance of 12 petaflops (although the developers are
currently working to increase that to 70 petaflops!).
Weather forecasting
Weather forecasting is based on the use of very complex computer models.
Data from the sensors at weather stations around the world is input to the
model and then many calculations are performed. Records of previous weather
conditions have also been collected over a very long period. Using the past
weather readings, the computer examines similar patterns of weather to those
being experienced at the moment and is able to predict the resulting weather.
Variables such as atmospheric pressure, humidity, rainfall, temperature, wind
speed and wind direction are recorded using computerised weather stations
around the world. These readings, together with observations from radar,
satellites, soundings from space, and information from ships and aircraft, help
the supercomputer to produce a 3-D model of the Earth’s atmosphere. Because
of the complexity of the calculations, and the very large number of them that
need to be carried out, they can only run effectively on supercomputers.
In 2017, the UK Meteorological Office commissioned three Cray XC40
supercomputers to help with formulating its weather forecasts. Together they
are capable of running at 14 petaflops and have a total of 460 000 cores, each of
which is slightly faster than those found in a quad (4) core laptop!
51
2.1 Mainframe computers and supercomputers
2
Climate research
This is an extension of the use of IT in weather monitoring. Climate is
measured over a much longer timescale. The data collected over several decades
can be used to show the trends of different variables over time. For example,
the levels of nitrogen dioxide, sulphur dioxide and ozone are monitored to
determine air quality. Rivers are monitored, measuring different variables such
as temperature, pH, dissolved oxygen, turbidity (the cloudiness of the water
caused by minute particles being present), and water level.
Climate is now being looked at from a global point of view. The planet Earth
can be regarded as a complex system which has many different constituent
parts, such as heat from the Sun, ocean currents, vegetation, land ice as found
in Greenland and the Antarctic, sea ice as found in the Arctic, weather and
climate, volcanoes and, of course, humans. The interactions of each of these
components within the Earth system can be described in mathematical terms.
However, just as with weather forecasting, there are very many variables which
have to be collected and complex calculations which need to be carried out. We
have to rely on computer models to help us understand how the system works.
Climate is one component of this planet’s system and only supercomputers are
able to run the models that represent the interactions between the components
of this system. CESM
®
, the Community Earth System Model, is the most
widely used climate model in the world today. It includes modules which allow
for atmosphere, land, ocean, sea ice and land ice, and uses various equations to
mimic the process of climate change using a virtual environment created on the
supercomputer.
Many people and organisations are becoming involved in developing supercomputer
climate models as climate change is developing into a potentially catastrophic
situation. In 2019, a team of students from the Sun Yat-sen University in Guangzhou,
China, won the e-Prize at the 2019 ASC Student Supercomputer Challenge (ASC19)
finals. They reduced the full-mode operation time of CESM to 1.83 hours.
Activity 2c
Give two reasons why supercomputers are used in weather forecasting.
2.1.6 Advantages and disadvantages of mainframes and
supercomputers
Advantages of mainframe computers
Mainframes are very reliable and rarely have any system downtime. This is one
reason why organisations such as banks use them. Most other systems do fail
at some point and then have to be rebooted or restarted, as most people who
use laptops or PCs will know. In addition, hardware and software upgrades can
occur while the mainframe system is still up and running.
Mainframes are getting faster and more powerful every year and are completely
outperforming PCs, laptops and other devices.
Mainframes can deal with the huge amounts of data that some organisations
need to store and process. Most organisations that use mainframes would
find it exceptionally difficult to transfer all the data they have stored on their
current mainframe to an alternative system. Because of a mainframe’s ability
to run different operating systems, it can cope with data coming in a variety of
database formats which other platforms would find problematic.
52
2 HARDWARE AND SOFTWARE
2
Mainframes have stronger security than other systems with have complex
encryption systems and authorisation procedures in place.
Disadvantages of mainframe computers
Mainframes are very expensive to buy and can only be afforded by large
organisations such as multinational banks. There is also a high cost for the
personnel required to run and maintain them. Large rooms are required to house
the system, which is not needed with other systems. As mainframes become more
advanced, the cooling systems needed become more expensive to install and run.
Many organisations are migrating to Cloud-based services so they do not have
to buy their own system or hire the expertise required. The software required to
run mainframe systems is more expensive to buy than using the Cloud.
Advantages and disadvantages of supercomputers
Supercomputers are the fastest data processing computers but are also the
most expensive to buy and install. The Summit supercomputer, which at the
beginning of 2020 was the worlds fastest supercomputer, cost $200 million to
build compared with IBM’s latest mainframe which costs between $250 000
and $4 million depending on the organisations requirements.
Most supercomputers have one operating system, whereas mainframes can have more
than one. Supercomputers are less fault tolerant than mainframes meaning they are
less likely to recover as quickly in the event of the failure of one component, and are
down more often than mainframes, although not as often as some other systems.
Supercomputers use massively parallel processing, which makes them more powerful
compared to the parallel processing of mainframes, and much more powerful than
PCs which have far fewer processor cores than mainframes or supercomputers.
2.2 System software
System software refers to the programs that run and control a computer’s
hardware and application software. Examples of system software are compilers,
interpreters, linkers, device drivers, operating systems and utilities.
2.2.1 Compilers
Most software that runs on computers is in machine code, which is stored in
binary form within the computer. Machine code consists of the instructions
that computers understand and each instruction is actually a number written in
binary. Unfortunately, programmers who write the software for computer users
find it difficult to use machine code for programming purposes. In the early
days of computing it was felt necessary to develop languages which programmers
could understand and was close to their use of everyday language.
Some of the early high-level languages developed included:
» FORTRAN (Formula Translation) was the first high-level language to be
developed. It was very technical and mathematical in nature. FORTR AN is
rarely used these days, but still remains popular for simulating large physical
systems, such as the modelling of stars and galaxies. The fact that it is still
widely used by physicists today often mystifies computer scientists, who
regard it as being out of date.
» COBOL (Common Business-Oriented Language) was developed not
long after FORTRAN to help businesses. Unlike FORTR AN, which relied
53
2.2 System software
2
on mathematical equations, COBOL tended to use simple expressions, such
as SUBTRACT money FROM account GIVING balance, rather than an
equation like bal=acc-mon.
» LISP (List Processor) was also an early high-level language. In LISP, simple
statements often start with the mathematical operator, such as (+ 2 4) which
would calculate 2+4. LISP was used extensively in the early years of AI but,
apart from its use in association with CAD, it is rarely used today.
Most high-level language programming for modern-day systems is done using
languages such as C++, C#, Visual Basics or Pascal, among others. These
have largely replaced the other languages mentioned above. However, the
development of all these high-level languages led to the need for software which
could translate a program written in high-level language into the machine code
that computers could understand.
A compiler is software (a program) that processes statements written in a high-
level programming language and converts them into machine language or code
that a computer’s processor understands and can execute. In other words, it
translates a high-level language program called source code into an executable
file called object code. The compiled program is then run directly without the
need for the compiler to be present.
Although compilers translate the whole program as one unit, they often need to
make more than one pass through the program to do this. This is because after
translating, it may become apparent that line 10 of the program refers to a statement
at line 5. The first pass picks up this type of information and then the second pass
completes the translation. The whole program is still effectively translated in one go
before it is executed. However, some programming languages, such as Pascal, have
been designed so that they would only require one pass. The object code is machine
code that the processor can execute one instruction at a time. A compiler produces a
list of error messages after it has translated the program. These cannot be corrected
without going back to the source code.
2.2.2 Interpreters
An interpreter translates the high-level language program one statement, or
line, at a time into an intermediate form, which it then executes. It continues
translating the program until the first error is met, at which point it stops. This
means that errors are located by the programmer, exactly where they occur. An
interpreter has to do this conversion every time a statement is executed.
An interpreted program can be transferred between computers with different
operating systems because it remains in the form of source code, but it needs to
be translated in each computer it is moved to. This takes more time than with
a compiler, but it means that the program can be distributed regardless of the
processor or operating system (OS) of the computer. The computer that it is
transferred to must have a suitable interpreter however; if the interpreter needs to be
supplied together with the program, the overall process is more complicated than
with a compiler. Unlike with a compiler, translation occurs at the same time as the
program is being executed. The interpreter has to be resident in memory in order
for the program to be executed. Interpreters just run through a program line by line
and execute each command. As a result, another benefit of using an interpreter is
that only a few lines of the program need to be in memory at any one time, saving
memory space.
There are other benefits of using interpreters, such as they help programmers
when they are developing programs. Interpreters are able to execute each
54
2 HARDWARE AND SOFTWARE
2
statement as it is entered and are able to generate helpful error reports. This
means that interpreters can be used during program development allowing a
programmer to add a few lines at a time and test them quickly.
Some high-level language programs such as Python
®
can be translated using a
combination of a compiler and an interpreter. It is possible for the program to
be translated or compiled into what is called ‘bytecode. This is then processed
by a program called a ‘virtual machine’, which is often an interpreter, instead of
by the processor within the computer.
Activity 2d
Describe the purpose of compilers and interpreters.
2.2.3 Advantages and disadvantages of interpreters
compared with compilers
Advantages of interpreters Disadvantages of interpreters
While a program is being compiled, if it is a major
application and takes a long time, the programmer has to
wait, doing nothing, before they can correct any errors.
With an interpreted program the programmer can correct
errors as they are found.
The execution process is slower for an interpreted program
as each statement must be translated before execution,
whereas once a program has been compiled it executes
all in one go. The time it takes to compile a program can
be long but once it is compiled it does not have to be
translated, which compares favourably with an interpreted
program which has to be translated every time it runs.
Debugging is easier with an interpreter as error messages
are output as soon as an error in a statement is
encountered, which gives the programmer the opportunity
to correct the error there and then. With a compiler all the
error messages are output at the end of the process and
errors can be difficult to locate and correct.
With an interpreted program, the source code must
always be available, which can lead to software copyright
infringement or intellectual property rights being at
risk. With a compiled program, the source code has been
translated and machine code is difficult to understand and
alter.
A compiled program will only run on a computer with the
same operating system as the computer it was originally
compiled on, whereas an interpreted program will still
be in its original source code and so it will work on any
system with the appropriate interpreter.
Compiling a program uses more memory than interpreting
it as the whole program must be loaded before translation,
whereas with an interpreter only a few statements of the
program have to be in memory at any given time. This
means that small pieces of code can be tested to make sure
they work before continuing with the rest of the program.
V Table 2.1 Advantages and disadvantages of interpreters compared with compilers
There may be times when programmers wish to transfer their program to another
computer which has a different operating system and processor. In this case they
tend to write their programs in high level languages which use interpreters.
For compiled languages, it is possible to use a cross compiler, although this
can be complicated. The computer the program is written on is called the host
computer. The computer which the program is to be run on, after compilation,
is called the target computer. One problem with using a cross compiler is that
the compiled program will then no longer run on the host computer.
55
2.2 System software
2
Another problem comes as a result of a cross compiler tending to be a slimmed-
down version of a ‘native’ compiler (the compiler normally found on the host
computer so that the compiled program can be run on that computer). The
cross compiler produces more errors and mistakes than a native compiler. In
addition, the compiled code can run slower on the target machine than if it had
been produced on that machine.
2.2.4 Linkers
A linker, or to give it its full name a link editor, is a system program that combines
object files or modules that have been created using a compiler, into one single
executable file. Most programs are written in modular form. That is to say, a
number of programmers, write separate pieces of code, or modules that form the
required program when combined, which has the advantage of saving time than if
one person wrote the whole code although it is still possible for one person to write
all the modules. If there is an error only that module hasto be corrected.
In short, a linker is used to combine different modules of object code into one
single executable code program. It could be that a large program can only be
compiled in small parts because there may not be enough RAM to hold the
whole program and the compiler program. The parts of the program can be
stored on backing storage and then, one at a time, each part is brought into
RAM and compiled. The resulting object code is then saved to the backing
storage. When all the parts have been compiled, the compiler is no longer
required to be in RAM, all the pieces of object code can be brought back into
RAM and the linker can be used to combine them into the complete program.
An advantage of using linkers, therefore, is that programs can be written in
modules which requires less RAM so saving money. The disadvantages are
that there can be problems with variable names (this term will be explained in
Chapter 4) and also documentation has to be more detailed and takes longer to
write, or read when completed.
2.2.5 Device drivers
A device driver is a small program that enables the operating system (OS) and
application software to communicate with a hardware device. One example is
a printer driver which acts as an interface between the OS (or any application
software that is running) and the printer. The user, through the application,
might want to print information. The application tells the printer driver and the
printer driver tells the printer. This, in effect, allows the user to have control of
the device. Other devices which need drivers are sound cards, monitors, mice,
SSDs, network cards, keyboards, disk drives and many other items of hardware.
The software used by a computer tends to be created by different companies to
those that manufacture hardware. This results in software which uses a different
type of language to the hardware. There has to be some means of converting
the languages so that the software is able to communicate with the hardware
and vice versa. Think of a Spanish person who knows no French trying to
communicate with a French person who speaks no Spanish. They would not be
able to understand each other. If, however, they managed to find some translating
software, that is a program that could convert Spanish to French and French to
Spanish, they could run that software on a computer and be able to communicate.
The device driver, which is, after all, a piece of system software, performs the same
function as translating software. So, application software such as a word processor
sends information to a driver saying what it wants the hardware to do; the device
driver understands this and then tells the hardware what it needs to do.
56
2 HARDWARE AND SOFTWARE
2
If the appropriate driver is not installed, the computer is unable to send to or
receive data from the hardware devices. This means, in effect, the device will
not work. Modern operating systems are supplied with many drivers that allow
hardware to work at a basic level. However, if the OS of a computer does not
recognise certain features of the device, it will not work without drivers. It is
possible to connect any keyboard or mouse into a computer and it may work.
However, if that keyboard has any special keys or features or the mouse has extra
buttons, they will not work until the drivers are installed. In addition, drivers
that are produced for a specific OS will rarely work with an alternative OS.
2.2.6 Operating systems
Before an operating system (OS) is loaded the computer has to boot up. Booting
up a computer is starting it up by loading the BIOS. BIOS is stored in ROM
and is the Basic Input/Output System for the computer which executes during
boot-up. It checks various devices are present. It then loads the OS.
An OS is system software that manages computer hardware and software
resources as well as interacting with device drivers. Some of the device drivers
are separate to the OS, but are often included by the provider of the OS. The
OS acts an interface between the user and the computer, as well as supplying
important utilities for managing the computer. A utility program is a type of
system software that assists users in controlling or maintaining the operation of a
computer, its devices or its software. The OS also acts as an interface between an
application program and the computer hardware, so that an application program
can communicate with the hardware. To sum up, an operating system interacts
with application software, device drivers and hardware to manage a computer’s
resources, such as the processor, RAM, storage space, and peripherals.
For nearly all types of computer, the operating system program is large and
would occupy too much ROM, so most of it is stored on a hard disk. However,
the instructions for loading the operating system are stored in ROM and are
executed every time the computer is switched on.
One of the major functions of an operating system is to manage the computer’s
memory. The OS allocates a particular part of RAM for each program, whether it
is an application, system software or a utility that is running. It needs to make sure
that instructions and data from one program do not spread into another program’s
memory allocation, otherwise data can get corrupted and the computer could crash.
Another of the main functions of an OS is to manage data input and output. To
do this, it needs to be able to respond to input devices in order to receive and
manage that data. It does this by communicating with the device driver so that
it can receive data from the input device. It also uses device drivers when it sends
data or instructions to the printer.
The OS manages the storing of files on, as well as the loading of them from,
backing storage. It knows the names of each file and exactly where they are stored
on the hard disk, tape, pen drive or SSD. It also keeps a record of any empty
spaces on the medium so that it knows where new files can be stored. Using a
disk drive as an example, it requests from the disk drive the position of the first
available free storage location on the disk. It then records on the disk theposition
of the start of file and the end of file, as well as other details of thefile.
Strictly speaking, multitasking and multi-programming systems are not the
same thing. However, the OS has the same responsibility in both, in that it must
allocate time to each task or program fairly, so that all tasks or programs get a
reasonable amount of time. Most computers these days are able to multitask,
57
2.3 Utility software
2
so we will concentrate on those here. The OS loads the software in RAM for
each task and the computer gives each application a tiny amount of time before
moving to the next task. This process is repeated for however many tasks or
programs are running at the same time.
Another responsibility of the OS is to display error messages to the user should
an error occur which requires the user to intervene. A typical error might be
that a user, when they are trying to save their work, types in a symbol that is not
allowed in the file name, such as /. The OS will output a message saying that it
is an invalid file name and will not resume until the user takes action.
When a user logs in to a system, it is the OS that deals with this. Passwords are
no longer stored as plaintext, but are encrypted. A calculation is performed on
the password and the result is stored. When a password is entered by a user,
the calculation is performed again by the OS. If the result is the same as the
previous calculation result stored for that user, then the OS allows the user to
access the system. Even when a user has successfully logged in to a system, they
may still only have permission to access certain files. These are often referred to
as file permissions or access rights. Some of the files may be particularly sensitive
and only certain people will be allowed to look at them. In general, it is the
operating systems responsibility to handle the security of the system.
When a user wishes to shut down the computer, the OS has to safely close all
software running on the computer. It then shuts itself down bit by bit before
finally sending a signal to the power management hardware to turn off the power.
Activity 2e
List the different functions of an operating system.
2.3 Utility software
2.3.1Theneedforutilitysoftware
Utility software is a type of system software that is needed to help maintain a
computer system. A basic set of utility programs is often supplied with the OS,
most of which help to manage files and their associated storage devices. However,
users can sometimes feel the need to get additional utilities which perhaps the
OS does not possess. Much of the work a computer does revolves around the use
of files of data so it is no surprise that it needs a number of programs that deal
with file handling. Without utility software, the computer would not function
properly. Utility software is required to manage the allocation of computer
memory in order to improve the computers performance and so that users can
customise the appearance of their desktop.
2.3.2Typesofutilitysoftware
The structure of hard disk storage
A hard-disk drive consists of several platters (individual disks) with each side
(surface) of the platter (top and bottom) having its own read–write head. The
read–write heads move across the platters, floating on a film of air and, when
they stop, they either read data from or write data to the surface. They never
touch the
disk surface and each surface is used to store data. The platters are
stacked one above the other and spin together at the same speed. Each surface is
divided into several tracks and each track is divided into sectors. The tracks are
58
2 HARDWARE AND SOFTWARE
2
in the same position on each disk. The track on the top platter together with the
tracks exactly below it, form a cylinder. Data is written to the platters starting
with the outside track. When a cylinder has been filled with data, the read–write
heads move toward the centre of the disk. They write data on each of the second
tracks until the second cylinder is full. The diagram just shows one track out of
the many that would be on the disk. There are normally 512 bytes of data in a
sector. Operating systems normally deal with data in
blocks. A block can consist
of one, two, four, eight or more sectors.
Track t
Sector s
Cylinder c
Platter
Rotation
Arm
assembly
Read–write head
Spindle
Arm
V Figure2.3Thestructureofhard-diskstorage
Formatting
Disk formatting is the configuring of a data storage medium such as a hard
disk or SSD for initial use. It can be performed on a disk that already has files
on it, but all those files would be erased. Disk formatting is usually carried out
on a new disk or on an existing disk if a new OS has to be installed. There are
two levels of formatting:
low-level formatting and high-level formatting.
Low-level formatting prepares the actual structure of the disk by dividing the disk
into cylinders and tracks and then dividing the tracks into sectors. This type of
formatting is usually carried out by manufacturers rather than individual users. If
users were to attempt this, there are at least two drawbacks: after erasing all the
files, it would be almost impossible to restore them and if done repeatedly, it would
shorten the life of the medium. When high-level formatting is carried out, it does
not permanently erase data files but deletes the pointers on the disk that tell the OS
where to find them. These pointers are in a File Allocation Table which is stored
on the disk and contains where the file starts and the length of the file. High-level
formatting is typically done to erase the hard disk and reinstall the OS back onto
the disk drive. Unlike low-level formatting, the files are retrievable. One benefit of
disk formatting is that it can remove viruses.
Disk defragmentation
When a file of data is stored on a disk, it may consist of several blocks. There
may not be enough blank or empty sectors next to each other to store all the
blocks together which means they have to be spread out across the disk. The file
is now said to be fragmented.
When data is no longer needed it is deleted from the disk, which leaves some
empty sectors.
Defragmentation software is used to organise the data on the
59
2.3 Utility software
2
disk by moving the data blocks around to bring all the parts of a file together so
they are contiguous. As a result, data retrieval is made easier and quicker. With
fragmented files it takes longer for the read–write heads to move over the surfaces
to find all the different fragments of files than if the data is held in sequence. In
addition, the software provides additional areas of free space and more storage
capacity. Sometimes it is impossible to bring all the blocks of data belonging to a file
together, but the software will move as many blocks together as possible. It can also
attempt to keep smaller files which belong in the same folder or directory together
by reorganising other files.
Data compression
Data compression is the modifying of data so that it occupies less storage
space on a disk. It can be lossless or lossy. Lossless compression is where, after
compression, the file is converted back into its original state, without the loss
of a single bit (binary digit) of data. When the lossless compression software
sees a repeated sequence of bits it replaces the repeated sequences with a special
character which indicates what is being repeated and how many times. This type
of compression is normally used with spreadsheets, databases and word-processed
files, where the loss of just one bit could change the meaning completely.
Lossy
compression permanently deletes data bits that are unnecessary, such as the
background in a frame of a video which might not change over several frames.
Lossy compression is commonly used with images and sound, where the loss
of some data bits would have little effect.
JPEG is an image file format that
supports lossy image compression. Formats such as GIF and PNG use lossless
compression. Other methods of file compression can be found in Chapter 11.
An advantage of data compression is that it means data can be transmitted more
quickly over a network or the internet. Another advantage is that it saves storage
space on a disk or SSD. Consequently, administrators spend less money and less
time on storage. It also allows the streaming of high definition (HD) videos
which would ordinarily occupy a great deal of bandwidth and memory.
There are disadvantages however, such as the fact that data compression
software uses a lot of computer memory during the compression process.
Another disadvantage is that the process of loading or opening a compressed file
takes a lot longer than opening the original. Also, lossy compression causes a
slight lowering of the quality of the resulting sound and video files.
Back-up
Back-up software is a program that is used to keep copies of files from a
computer or copy the content of a server’s backing storage. The back-up is an
exact duplicate of the files. It can be used for restoring the original files, should
the original files become corrupted or deleted, accidentally or deliberately. Back-
up software allows the user to select the time and type of back-up they want and
how regularly the back-up is to take place.
When tapes or external disk drives are used to store server back-ups, they are
normally stored in a room separate to the one where the server is housed.
Should a disaster occur with the server, such as fire or malicious damage, the
back-up tapes or disks are still safe. This is also the case where the Cloud is
used; damage to the server will not affect the state of the back-ups.
Most back-up software allows different types of back-up, not just a full back-up.
An incremental back-up is one where only the data that has been added or
changed since a specific date and time is backed up. Back-ups can take a long
60
2 HARDWARE AND SOFTWARE
2
time to carry out and require a certain amount of storage space, so this situation
is improved if back-ups are done incrementally. However, this can lead to
difficulties when restoring what may well be several back-ups. An alternative is
a differential back-up which only backs up the data which has changed since the
last full back-up. Restoring the system only requires the use of two back-ups in
this case. Users can also opt to verify their back-up; this is when checksums (see
Chapter 1) are used to make sure the data matches. Back-up software can also
allow the user to choose whether they want the back-up encrypted or not.
File copying
File copying is creating a duplicate copy of an existing file. The copy will
have exactly the same content as the original. There are a number of ways a
file-copying utility works. In disk operating systems, they tend to involve the
use of a command line interface (CLI) where the user types some form of
copy’ command which contains the name of the original file as well as the
destination directory or folder. With a
graphical user interface (GUI) the user
can have a variety of ways of doing this. One of the simplest is to have both
folder windows present on the screen and, using the mouse, right click over the
original file, select the Copy option from the drop-down menu, right click over
the destination folder, then select the Paste option from the drop-down menu.
There are now two versions of the same file in different folders.
Deleting
The delete utility is a piece of software which deletes the pointers that tell the
OS where to find the file. The OS now considers these sectors to be available for
the writing of fresh data. Until new data is written to the space the file occupies,
users can still retrieve the data. Data recovery software is available which allows
users to retrieve deleted data. It can identify the start and end of file markers
on the disk and reset the pointers accordingly. If, however, data has already
overwritten part of the file it will be extremely difficult, if not impossible, to
retrieve any of the data from the file.
The delete utility is not to be confused with pressing the delete button on the
keyboard. With some systems there is a trash folder and depending on the OS,
it may be called the recycle bin, trash or, simply, bin. When the delete button is
pressed the file is sent to this folder and files are stored there in case they need
to be retrieved.
Anti-virus
As the name suggests, anti-virus software can be a program or set of programs
whose function is to detect and remove viruses. It monitors a computer in a bid
to prevent attacks from many types of malware (malicious software) such as
viruses,
worms, Trojan horses, adware and many more. (The different types of
malware are described in detail in Chapter 5.) It is important to keep anti-virus
software up to date because new viruses and other types of malware appear at
frequent intervals and older versions of anti-virus will not detect these.
Anti-virus software will either remove the virus or malware or will quarantine
it, asking the user if they want to delete the file or ‘clean’ it. It can be set up
so that it scans specific files or folders for threats, as well as having the option
to scan the whole disk or the whole computer. Scans can be set up so that they
take place automatically and can be scheduled to take place at a specific time.
There are different methods employed by the anti-virus software to detect viruses.
One such method is
signature-based detection, which is based on recognising
61
2.4 Custom-written software and off-the-shelf software
2
existing viruses. When a virus is identified, anti-virus manufacturers add its
signature to a database of known viruses. This virus signature is a sequence of
bytes (remember, a byte is usually a string of 8 bits) contained within the virus
and this sequence will exist within any similar virus. The anti-virus checks all
files for this sequence of bytes and when discovered within a file, that file is
either deleted or quarantined. In essence, signature-based detection compares
the contents of a file with its database of known malware signatures. The main
drawback with this method is that it is only capable of dealing with known
threats. If a new virus is created, it will do untold damage to the software or data
stored on a hard disk because it is not within the known database. It was for this
reason that the
heuristic-based detection method, sometimes referred to as static
heuristic, was devised whereby a program is decompiled, its source code compared
to that of known viruses, and if a specific percentage matches, it is flagged as a
potential threat and quarantined. The drawback with this method is that a false
positive
can occur. This happens when the detection algorithm is so general that
matches can be made with files that do not contain viruses, but just happen to
contain a small part of the sequence of bytes which make up the virus.
Behavioural-based malware detection, sometimes referred to as the dynamic heuristic
method, looks for abnormal or suspicious behaviour, for example sending a large
number of emails or attempting to alter certain files. It too can generate false positives.
Sometimes
behavioural-based detection can be used in a sandbox environment.
This is a virtual environment within the computer whereby the suspected virus
infected code is executed in the sandbox, so that it can do no realharm.
Activity 2f
Write a sentence about each different type of utility software.
2.4 Custom-written software and
off-the-shelf software
When a company installs a new computer system, it will need to obtain
application software, whether it is for producing word-processed documents,
keeping databases of employee records or producing invoices. However, many
companies discover that finding the most appropriate software for them can
prove difficult. If a wrong decision is made, they may need to keep modifying
their system or even have to abandon the software and start again. Generally,
there are two choices: either buy
off-the-shelf software or ask someone to
create custom-written software.
2.4.1Custom-writtensoftware
This is software which has to be specially written for a particular task and is
developed for a specific company or business. If the company with the new
computer system is a large company, it might want to employ a programmer to
write software specifically to solve a particular problem or provide for a specific
need. There are reasons why it would want to do this. For example, it may need
databases to be designed which require specialist programming skills. It may
also need a website to be created which it wants to have tailored to its own
needs. Once the software is written, the company will own it and may be able to
sell it to other companies.
62
2 HARDWARE AND SOFTWARE
2
2.4.2 Off-the-shelf software
This is software which already exists and is available straight away, ready for use. If the
company with a new computer system is a smaller company, it may turn to one of the large
software companies that already produce business software packages, for example invoicing
software, accounting software, payroll software and other programs which are available to
all businesses, organisations and the general public. Such programs may provide features
that many users want, such as text editing, accounting functions and mail merge. The
drawback is that in trying to cater for a wide range of users, there may be a substantial
number of features that the purchasing company does not need, such as trigonometric
functions or engineering functions. The software may therefore need to be adapted for
the company’s own specific purpose, which can mean that it occupies a large amount of
storage space. Unlike custom-written software, it will not be owned by the purchasing
company and even if adapted for it, it will not be able to sell it to other companies.
2.4.3 Advantages and disadvantages of custom-written and
off-the-shelf software
Here is a table showing custom-written software compared to off-the-shelf software.
Notice how each paragraph contains comparisons.
Advantages of custom-written software Disadvantages of custom-written software
Custom-written software is designed specifically
for the task and will meet all the customer’s
requirements. It will not need to be adapted,
unlike off-the-shelf software, which may be
difficult to adapt to the particular use the
customer requires.
The customer will have to pay the programmers to write the
programs which have to be written specifically for the task and this
will cost more than if they were buying off-the-shelf software. Off-
the-shelf software is cheaper to buy because it is mass-produced.
Instead of one customer paying for the development there are
several customers paying the software company and thereby
indirectly contributing to the development costs.
If the software does not quite meet what the
customer wants, alterations to the software can be
made by the programmer who is readily available.
Because there will only be one programmer or a small team of
programmers, customers may find it difficult to get support if
anything goes wrong. With off-the-shelf software, there are
likely to be internet forums or websites to help users, as well as
telephone helplines with operators who will be experienced with
all sorts of queries other customers have made.
Off-the-shelf software may have some features
which are not necessary for the customer, but
custom-written software will not have any
unnecessary features. Off-the-shelf software may
not have all the functions the customer needs, but
the programmer will make sure these are included
in custom-written software.
It can take a long time to develop the software since the
programmers will be starting from scratch, whereas
off-the-shelf software is available immediately because it has
already been written. There is also the likelihood that a lot of
time will be spent having meetings with the programmers to tell
them what will be required of the system.
The programmers will know what the current
computer system is and will be able to make sure
that the software is compatible with it, unlike off-
the-shelf software which may not necessarily be
compatible with the hardware or operating system
currently being used. There may be settings within
the off-the-shelf software that cannot be changed.
There may be more bugs in custom-written software as it may not
have been tested as thoroughly. Often the tests that are carried
out are those which the programmer thinks are necessary based
on how they think the software will be used, which may not be
accurate. Off-the-shelf software is usually tested rigorously so it
is highly unlikely that there will be any bugs in it and it will have
been used many times already, so any bugs that were present will
have been discovered and removed.
The customer will own the copyright of the custom-
written software and so be able to sell it to others
and have extra income. With off-the-shelf software,
even if they adapt it, customers cannot sell it as this
would infringe the software companys copyright.
V Table 2.2 Advantages and disadvantages of custom-written software and off-the-shelf software
63
2.5 User interfaces
2
Proprietary and open source software will be described in Chapter 10,
Section 10.12.
Activity 2g
Describe custom-written software and off-the-shelf software in terms of:
a availability
b number of bugs.
2.5 User interfaces
A user interface is the means by which the computer system interacts with the
user. It enables the user, with the help of input devices, to communicate with the
computer and then, via the OS, communicate with a piece of software or any
output device. A good user interface is one which allows the user to perform this
communication without encountering any problems; it needs to be user-friendly.
It should also be intuitive; users should be able to predict what will happen if
they take a certain action, for example if a button on a user interface looks like
a button in real life (such as the on/off button on a computer), a user should be
able to press it and get a response. The four major interfaces are the
command
line interface, graphical user interface, dialogue interface and gesture-based
interface.
2.5.1 Command line interface
The command line interface (CLI) is a means of interacting with a computer using
commands in the form of successive lines of text. Normally, a prompt appears on
the screen to which the user responds by typing a command. The output from the
computer could be to produce a list or take some other action. In the early days
of computing, the CLI was the only way a user could get the computer to run
software or carry out tasks. This type of user interface is rarely used today except
by software developers, system administrators and more advanced users. Most
individuals use a graphical user interface (GUI) when communicating with their
computers. However, even within a GUI it is still possible to access a CLI.
V Figure2.4Acommandlineinterfacescreen
64
2 HARDWARE AND SOFTWARE
2
As we can see in Figure 2.4, the CLI usually consists of a black box with white
text. In the early days of computing the text was green. In Figure 2.4, on entering
the interface, a prompt C:\Users\guest_8k65j6c> appears. The > symbol tells
the user that they need to type in a command. Here, the command ‘dir’ was
entered, which asked the computer to list the files and directories (folders) that are
in the directory (folder) belonging to the user guest_8k65j6c. Notice that after
executing the command, the original prompt is shown again. In this example
there are no files in this directory, only other directories. The ‘dir’ command is
only one of hundreds of commands which are available in a CLI. It is possible to
do any action with a CLI that could be achieved with a GUI. In fact, it could take
several clicks of the mouse and negotiation through a number of dialogue boxes
and menus in a GUI to achieve the same outcome as a single line of text in a CLI.
2.5.2 Graphical user interface
Icons
Window
Menu
V Figure2.5Agraphicaluserinterfacescreen
When CLIs were introduced, commands had to be typed in correctly with any
misspellings potentially causing the system to fail to perform as desired, and this
made the interface clumsy and confusing. There was a need for a less inefficient
means of communicating with the computer, which resulted in the creation of the
GUI. Instead of typing in commands, the GUI used windows, icons, menus and
pointers, collectively known as a ‘WIMP’ interface, to carry out commands, such as
opening, deleting, and moving files. Technically speaking, a WIMP interface is only
a subset of GUI and requires input devices such as a keyboard and mouse, whereas
other types of GUI use different input devices such as a touchscreen. Figure 2.5
shows a window, icons and a menu. A user can double-click on an icon, which could
represent a file, a folder or an application, and open it. A right click on a two-button
mouse opens a menu. By moving the mouse, the pointer can be moved up and
down through the menu and then an option can be selected by clicking on it.
2.5.3 Dialogue interface
A dialogue interface allows a user to communicate with a computer or device using
their voice. The computer is able to use speech-recognition software to convert
65
2.5 User interfaces
2
the spoken word into commands it can understand. Many cars have such a system
whereby the driver is able to control their phone or radio without touching them.
For example the driver is able to initiate a phone call by saying ‘phone Graham’ or
switch a particular radio channel on by saying the name of the channel. Laptops
and PCs often come with voice control these days. The user is able to load and
run software packages and files by speaking into a microphone and saying the
commands. The computer or device responds with spoken words after the required
text has been converted into speech. It requires the device to learn the way the
speaker talks by asking the user to repeat certain sentences until it has ‘learnt’ the
way they speak. It can, however, become quite capable of understanding simple
commands. Noise in the background while the user is speaking and the ability to
recognise only a limited vocabulary can cause problems.
2.5.4 Gesture-based interface
A gesture-based interface is designed to interpret human gestures and convert
these into commands. Gestures can be made with any part of the body, but it
is usually the face or hand that makes the gestures the computer can interpret.
An example of where this type of interface is used is in ‘smart’ homes where
a gesture can turn on the lights, for example. In this area of IT, a gesture can
be said to be any physical movement, large or small, that can be interpreted
by a computer. Examples of these are the pointing of a finger, nodding the
head, or a wave of the hand. These types of gestures can be understood by a
computer. First of all, a camera in conjunction with an infrared sensor detects
the movements being made in front of it. The computer, using a special type
of software, searches through all the gestures it has stored in a database to
match it with the input. Each stored gesture is linked to a specific command
which is then executed after the gesture has been matched.
2.5.5 Advantages and disadvantages of different types
of user interface
Users with disabilities may not be able to hold a mouse or click it, so a GUI
may not be suitable for them. They may not be able to type using a keyboard,
so using a CLI would also be inappropriate. They may not be able to control
the movement of their limbs accurately, so a gesture-based interface would be
unsuitable. In this instance, then, a dialogue interface would be the best type of
interface for them to use, although people with different disabilities may favour
a different type of user interface.
Despite this potential advantage of a dialogue interface, if there is
any background noise when the user is speaking, the computer might
misunderstand what is being said, which is not a problem when using the other
types of interface.
Some types of user interface would be inappropriate for hygienic reasons. If
a user was, for example, involved in the food service industry, then touching
a mouse, keyboard or touchscreen may be inadvisable while working, so a
GUI or CLI would not be suitable for them. However, they would be able
to make gestures and speak, so a gesture-based or dialogue interface would
be a sensible choice for them. On the other hand, certain gestures could
be misunderstood by the computer, particularly if the user has made them
without realising, and some gestures in certain cultures might be judged to
be inappropriate.
66
2 HARDWARE AND SOFTWARE
2
In terms of accuracy, a GUI is better than gesture-based or dialogue interfaces.
A gesture may not point exactly at an icon whereas a mouse can be more
accurately controlled, and voice inputs can be misunderstood by the speech-
recognition software.
CLIs and, to an extent, dialogue interfaces require the user to learn a lot of
commands, whereas GUIs and gesture-based interfaces are more user-friendly
and reasonably intuitive. CLIs do tend to be used by IT specialists and require a
certain amount of IT knowledge but this is not the case with GUIs or gesture-
based interfaces. Compared with a GUI, commands entered into a CLI are
far more difficult to correct. There is a degree of editing allowed using the
arrow keys on a keyboard to manoeuvre to the line with the error, but this can
be far more awkward to do than using a mouse, for example. However, CLIs
tend not to change over time and once a user is familiar with one, they do not
have to relearn how to use a changed version. GUIs do tend to develop and
consequently the user has to learn how to use the new version, which can take
time.
Generally, the more advanced the type of interface, and this not only means
GUIs but also includes gesture-based and dialogue interfaces, the faster the
processing is and the greater the storage space required to store the interface
software compared with a CLI. Gesture-based and dialogue interfaces also
tend to be more expensive to develop than CLIs or even GUIs. Some situations
require the use of dialogue interfaces for safety reasons. A driver in a vehicle may
wish to play a particular piece of music using their in-car entertainment system.
To select it using a GUI or a gesture would require taking a hand off the
steering wheel, which could be dangerous, whereas using their voice through a
dialogue interface would not.
Activity 2h
1 Write down two advantages of using a GUI rather than a CLI.
2 Write down two disadvantages of using a gesture-based interface rather
than a dialogue interface.
Examination-style questions
1 Mainframe computer manufacturers often refer to RAS.
Explain what is meant by the term ‘RAS’.
[3]
2
Explain how high-level language is translated to run on different
computer systems.
[5]
3
Describe the terms: [4]
a
sector
b block
c track
d cylinder.
4 Explain what is meant by custom-written software. [3]
5
Describe the features of a command line interface. [4]