SIMULATION AND
REAL-TIME PROCESSING
Chapter 3.7
VC
N 9
69
1 C
om
pu
ting
No
tes
1
REAL –TIME SYSTEMS
A real-time system is one that can react quickly enough to data input to affect the real world.
The system should process and output data without a significant delay.
2
VC
N 9
69
1 C
om
pu
ting
No
tes
APPLICATION OF REAL-TIME SYSTEMS The real-time systems are needed in
situations where there is a need to make a decision quickly.
For example A nuclear reactor may start to react too violently. The sensors will pick up the readings and send
input to the controlling program. The control program takes the decision to insert
graphite rods to slow the reaction down. The readings from the sensors (input) must be
processed immediately. This is a real-time processing system. It is not important how quick the output (insertion of graphite rods) should be. The decision making time is important. 3
VC
N 9
69
1 C
om
pu
ting
No
tes
APPLICATION OF REAL –TIME SYSTEMS
4
VC
N 9
69
1 C
om
pu
ting
No
tes
APPLICATION OF REAL-TIME SYSTEMS
Real time systems can be used in: temperature control systems security alarm systems Biometric objects
5
VC
N 9
69
1 C
om
pu
ting
No
tes
ADVANTAGES OF REAL-TIME SYSTEMS The system will make decision immediately
which can be vital in making critical decisions.
Real-time systems can eliminate the need of human supervision in certain situations.
Real-time systems can help save human lives, equipment and environment catastrophes by providing timely feedback.
6
VC
N 9
69
1 C
om
pu
ting
No
tes
DISADVANTAGES OF REAL-TIME SYSTEMS Real-time systems are almost always
dedicated systems and can not do anything else in order to keep the decision time short.
Real-time systems need expensive hardware and software in order to provide the best response time.
7
VC
N 9
69
1 C
om
pu
ting
No
tes
THE FEEDBACK LOOP; INPUT & OUTPUT; SENSORS & ACTUATORS
A sensor is a device that measures physical quantities such as length, time, temperature, light, flow, pressure, etc
Sensors can be analogue or digital.
For analogue sensors the computer will require the signals to be passed through an analogue/digital converter (ADC) because the computers can only use digital signals as input.
SENSORS ARE FOR INPUT8
VC
N 9
69
1 C
om
pu
ting
No
tes
ACTUATORS
An actuator is the device that can accept a signal from the computer and turn it into a physical movement.
Actuators are commonly used in devices that are needed to be controlled by a computer system.
Example: Turning a robot in a different direction. Opening and closing an automatic door.
9
VC
N 9
69
1 C
om
pu
ting
No
tes
ROBOTS
10
VC
N 9
69
1 C
om
pu
ting
No
tes
THE USE OF ROBOTS
A robot is a mechanical device which is under the control of a processor.
Robots are used because:- (advantages) A single robot can do work that can equally be
done by, say, 100 employees, thus helping cut costs on salary.
A robot is consistent and does not get tired, as opposed to humans
Robots can be used to do work in places that are hazardous to humans, e.g. inside of a nuclear reactor
In places where the environment does not have essential components for humans like air, light etc, robots can be used. E.g. on mars exploration.
11
VC
N 9
69
1 C
om
pu
ting
No
tes
THE USE OF ROBOTS
Disadvantages Robots are expensive to buy. Robots may not be able to adapt to unexpected
situations, because they are preprogrammed. The use of robots has created unemployment to
a certain level There is a need, to employ expert technicians to
service the machines, programmers to program every task that they need to undertake.
Robots break down due to extensive use and require periodic maintenance.
12
VC
N 9
69
1 C
om
pu
ting
No
tes
THE USE OF SIMULATIONS
Simulation is the use of a computer program to predict the likely behavior of a real-life system.
Simulations involve constructing mathematical models of a system and testing them, usually under controlled conditions. By changing different variables in the model,
many different situations can be tested and experienced.
Interactive simulations allow the user to ‘interact’ with the simulation by accepting live input and responding to it in real-time.
13
VC
N 9
69
1 C
om
pu
ting
No
tes
REASONS FOR SIMULATION Simulation can be used to predict the results
of actions, or model situations, that would be otherwise too dangerous. For example simulating a car’s reaction to
imminent crash without necessarily crashing a car. Simulation can help to speed up a process in
order to give results in a more reasonable time scale. For example, simulating the growth of a crop
which could otherwise take months to grow They can be used to create virtual reality
worlds where impossible things seem possible, e.g flying through the rings of planet saturn 14
VC
N 9
69
1 C
om
pu
ting
No
tes
REASONS FOR SIMULATION
Production of a test prototype would be very expensive
-Time taken to produce and test a prototype may be too long/immediate need
Need to test in circumstances unable to be reproduced
May be too dangerous to test in reality Situations can be reproduced which may
never arise in ordinary testing
15
VC
N 9
69
1 C
om
pu
ting
No
tes
EXAMPLE QUESTIONS
1. Describe the real time application of a computer used to control a burglar alarm system. (4)
2. Explain why some applications require parallel architecture to carry out their processing and describe what is meant by parallel processing.
16
VC
N 9
69
1 C
om
pu
ting
No
tes