Вы находитесь на странице: 1из 6

OPERATING SYSTEM

Assignment # 2

Group Members:
 Habib Ur Rehman (049)
 Shahab Mughal (024)

DEPARTMENT OF SOFTWARE ENGINEERING

BAHRIA UNIVERSITY
ISLAMABAD CAMPUS
Real Time Systems

Realtime system:
A real-time system is any information processing system which has to
respond to externally generated input stimuli within a finite and specified
period. It means that the system is subjected to real time i.e. response should
be guaranteed within a specified timing constraint or system should meet the
specified deadline.
Uses:
 Flight control system.
 Real time monitors.
 Commands and Control systems.
 Defence and space systems.
 Networked multimedia systems.
 Embedded automotive electronics.
Types of Real Time System:
 Hard Real-Time System 
 Soft Real-Time System 
Hard Real-Time System 
A real time system is a data processing system. The time taken by the
system to respond to an input and provide the output or display the updated
information is known as the response time. So, in these systems, the
response time should be very minimum. The system should complete the
task within the deadline. In a real-time operating system, the correctness of
the system output depends on the logical result of computation as well as the
time it takes to produce the result.
Soft Real Time System
In a soft real time, system, the time requirement is not very crucial. The
system should perform the task or give the output within the deadline but
there can be a small tolerance occasionally. If the system, did not perform
the task within the deadline it is not considered as a failure as long as it
provides the required output. But performance is considered to be degraded.
Missing the deadline will not cause a catastrophic event like in a hard-real
time system.
Hard vs Soft Real Time System
A hard-real time system is a system in which a A soft real time system is a system in which one or
failure to meet even a single deadline may lead to more failures to meet the deadline is not considered
complete or catastrophic system failure. as complete system failure but that performance is
considered to be degraded.
Restrictive Nature
A Hard-real time system is very restrictive. A Soft real time system is not very restrictive.
Deadline
A Hard-real time system should not miss the A Soft real time system can miss the deadline
deadline. Missing the deadline cause complete or occasionally. Missing the deadline is not
catastrophic system failure. considered as a complete system failure but
degrades the performance.
Utility
A hard-real time system has more utility. A soft real time system has less utility.
Examples
Air traffic control systems, missile, and nuclear Multimedia streaming, advanced scientific projects,
reactor control systems are some examples of and virtual reality are some examples of soft real
hard real time systems. time systems.

Examples and applications


Real-time systems have of late, found applications in wide ranging areas.
Industrial Applications:
Chemical Plant Control
In an automated chemical plant, a real-time computer periodically monitors
plant conditions. The plant conditions are determined based on current
readings of pressure, temperature, and chemical concentration of the reaction
chamber. These parameters are sampled periodically. Based on the values
sampled at any time, the automation system decides on the corrective actions
necessary at that instant to maintain the chemical reaction at a certain rate.
Typically, the time bounds in such a chemical plant control application range
from a few micro seconds to several milliseconds.
Automated Car Assembly Plant
In an automated car assembly plant, the work product moves on a conveyor
belt. By the side of the conveyor belt, several workstations are placed. An
empty chassis is introduced near the first workstation on the conveyor belt.
As soon as the partially assembled product is sensed by sensor, the
workstation begins to perform its work on the product. The time constraint
imposed on the workstation computer is that the workstation must complete
its work before the work product moves away to the next workstation. The
time bounds involved here are typically of the order of a few hundreds of
milliseconds.
Medical
Robot Used in Recovery of Displaced Radioactive Material
Radioactive materials such as Cobalt and Radium are used for treatment of
cancer. At times during treatment, the radioactive Cobalt (or Radium) gets
dislocated and falls down. Since human beings can not come near a
radioactive material, a robot is used to restore the radioactive material to its
proper position. The robot has to sense its environment frequently and based
on this information, plan its path to pick and restore the material position.
The real-time constraint on the path planning task of the robot is that unless it
plans the path fast enough after an obstacle is detected, it may collide with it.
The time constraints involved here are of the order of a few milliseconds.
Aerospace
Computer On-board an Aircraft
In many modern aircrafts, the pilot can select an “auto pilot” option. As soon
as the pilot switches to the “auto pilot” mode, an on-board computer takes
over all controls of the aircraft including navigation, take-off, and landing of
the aircraft. In the “auto pilot” mode, the computer periodically samples
velocity and acceleration of the aircraft. From the sampled data, the on-board
computer computes X, Y, and Z co-ordinates of the current aircraft position
and compares them with the pre-specified track data. In this case, the
sampling of the various parameters, and their processing need to be
completed within a few micro seconds.
Real-Time CPU Scheduling ,

A normal processing unfortunately doesn’t fulfil real-time demands. As a


process doesn’t need full time of the CPU, it only takes time that is enough to
complete it.
So, in order to handle real-time or time-strict processes what level of priority
should we assign to these tasks if there is only one then it has a highest priority
but what if there are one or more processes at this point, we need CPU
scheduler that handles these critical tasks. The goal is to use system resources in
a best way so that we minimize average response time.
Minimizing average response time:
Real-time processes are very critical to time. They have a start time and end
time that is called dead line. This dead line a time by which the task must be
completed. Dead lines for hard-time real system and soft-times real systems
are different. In hard dead lines if the task is completed after the dead line
then it has no value because if the process completed after deadline or before
deadline then it may cause a real harm. On the other hand, in soft-time real
systems there are soft deadlines. Most of the real-time systems are fall in this
category such as a sound system in our computers. In order to perform real
task minimizing average response time is a key factor for real-time tasks.
Minimizing buffering delay:
In order to get a real-time response real-time scheduler must serve application
request as it comes in without any buffering delay. Although this delay is
measures in one tenth of seconds but this time becomes a factor in real-time
response. Some times the operating system delay becomes a factor in real-
time systems.
Real-time Process have highest priority:
Real time process has highest priority than any other processes. Whenever
real-time process comes in processor stop its work and scheduler provides it a
first place with highest priority.
Given are some issues scheduler face in real time systems:
Minimum thread latency rate:
Consider the event-driven nature of a real-time system. The system is
typically waiting for an event in real time to occur. Events may arise either in
software or in hardware. When an event occurs, the system must respond to
and service it as quickly as possible. Event latency as the amount of time that
elapses from when an event occurs to when it is serviced.so minimizing the
latency rate real-time performance increases.
Priority Based Scheduling:
As the real-time system response very quickly as the process require CPU.
But when there are multiple processes so there is a need of priority do that
the scheduler provide the CPU time to the job having highest priority.

Earliest deadline first:


In this technique scheduler finds a job that is closest to the deadline.so the
task having earliest deadline have a highest priority and later the dead line
lowest the priority.

Static Priority:
In this priority technique developers defines the priorities statically. They
assign highest priority to these tasks they think the most important.
Shortest Job first:
When process enters it is prioritized according to its time of execution.
Shortest job first is a scheduling policy that selects for execution the waiting
process with the smallest execution time. If there is pre-emption then if the
low priority task is running and highest priority job or process is ready to
run then lower priority process will stop and highest priority job gets CPU
time.
Proportional share Scheduling:
In this technique processes have their weights according to these weights’
scheduler defines a share of resources for each process.

Вам также может понравиться