Sunteți pe pagina 1din 11

Homework Title / No.

: ____1

Course Code : __CAP536

Course Instructor: ____Gargi sharma_

Student’s Roll No.____D3804A15__

Section No. : _____D3804

Declaration:
I declare that this assignment is my individual work. I have not copied from any
other student’s work or from any other source except where due acknowledgment
is made explicitly in the text, nor has any part been written for me by another
person.

Student’s Signature :
___surendra__________

Evaluator’s comments:
__________________________________________________________________
___

Marks obtained : ___________ out of ______________________

Content of Homework should start from this page only:


Part-A

1. Explain the key differences between the characteristics of a soft real time
task such as web browsing and a non real time task such as e-mail
delivery.

Answer.

Soft real time tasks also have time bounds associated with them, however
unlike hard and firm real time task, the timing constraints on soft real time tasks
are not expressed as absolute values. Instead the constraints are expressed either
in terms of the average response times required.

An example of soft real time task is web browsing, Normally ,after an URL is
clicked ,the corresponding web page is fetched and displayed within a couple of
seconds on the average. However when it takes several minutes to display a
requested page, we will do not consider the system to have failed, but merely
express that the performance of the system has degraded.

A non-real time tasks is not associated with any time bounds. Now most of the
interactive computations we perform are handled by soft real time tasks.
Examples of non-real time tasks are; batch processing jobs, e-mail, and back
ground tasks such as event loggers.
For example, an e-mail is expected to reach its destination at least within a
couple of hours of being sent. Similar is the case with a batch processing job
such as play-slip printing.

So the real time tasks, the associated time bounds are typically of the order of a
few minutes, hours or even days. In contrast, the time bounds associated with
soft real time tasks are at most of the order of a few seconds.

2. Name any two important sensors devices and two actuator devices use in
real time applications and explain the physical principals behind their
working?

ANSWER. Two important sensors devices used in real time applications are:

1. Alarm sensor

2. Speed sensor

Alarm sensor:

In communications systems, a device that can sense an abnormal condition


within the system and provide a signal indicating the presence or nature of the
abnormality to either a local or remote alarm indicator, or (b) may detect events
ranging from a simple contact opening or closure to a time-phased automatic
shutdown and restart cycle.

In a physical security system, an approved device used to indicate a change in


the physical environment of a facility or a part thereof.

Alarm sensors may also be redundant or chained, such as when one alarm
sensor is used to protect the housing, cabling, or power protected by another alarm
sensor.
Speed sensor:

Speed sensors are machines used to detect the speed of an object, usually a
transport vehicle. They include:

Wheel speed sensors

Speedometers

Pitometer logs

Airspeed indicators

Two important actuator devices used in real time applications are:

1. Motors

2. Pneumatic

Motor: Motors are mostly used when circular motions are needed, but can also
be used for linear applications by transforming circular to linear motion with a
bolt and screw transducer. On the other hand, some actuators are intrinsically
linear, such as piezoelectric actuators

Pneumatic :

A pneumatic actuator converts energy (in the form of compressed air, typically)
into motion. The motion can be rotary or linear, depending on the type of
actuator. Some types of pneumatic actuators include:

Tie rod cylinders

Rotary actuators

Grippers

A Pneumatic actuator mainly consists of a piston, a cylinder, and valves or ports.


The piston is covered by a diaphragm, or seal, which keeps the air in the upper
portion of the cylinder, allowing air pressure to force the diaphragm downward,
moving the piston underneath, which in turn moves the valve stem, which is
linked to the internal parts of the actuator. Pneumatic actuators may only have
one spot for a signal input, top or bottom, depending on action required. This
pressure is transferred to the valve stem, which is hooked up to the valve plug or
butterfly valve.

3. In a hard real time system, is it necessary that every task in the system
be of hard real time type? Explain your answer using a suitable
example?

ANSWER:
It is not necessary that all tasks of a hard real-time application belong to the
same category. It is possible that different tasks of a hard real-time system can
belong to different categories.
The hard real time tasks is constrained to produce its results within certain
predefined time bounds. The system is considered to have failed whenever any of
its hard real-time tasks does not produce its required results before the specified
time bound.

An example of a system having hard real-time tasks is a robot. The robot


cyclically carries out a number of activities including communication with the host
system, logging all completed activities, sensing the environment to detect any
obstacles present, tracking the objects of interest, path planning, effecting next
move, etc. Now consider that the robot suddenly encounters an obstacle. The robot
must detect it and as soon as possible try to escape colliding with it. If it fails to
respond to it quickly (i.e. the concerned tasks are not completed before the required
time bound) then it would collide with the obstacle and the robot would be
considered to have failed. Therefore detecting obstacles and reacting to it are hard
real-time tasks.
So it is not necessary that in the every task in thehard real time system be a hard
real time type.

Part-B

4. What are the different types of timing constraints that occur in a


system? Give examples of each.

Answer.
Different timing constraints associated with a real-time system can broadly be
classified into performance and behavioral constraints.
Each of performance and behavioral constraints can further be classified into
the following three types:
• Delay Constraint
• Deadline Constraint
• Duration Constraint

Delay Constraints

A delay constraint captures the minimum time (delay) that must elapse between
the occurrence of two arbitrary events e1 and e2. After e1 occurs, if e2 occurs earlier
than the minimum delay, then a delay violation is said to occur. A delay constraint
on the event e2 can be expressed more formally as follows:
t (e2) − t(e1 ) ≥ d
Where t (e2) and t (e1) are the time stamps on the events e2 and e1 respectively and d
is the minimum delay specified from e2.
Δ denotes the actual separation in time between the occurrence of the two
events e1 and e2 and d is the required minimum separation between the two events
(delay).

Deadline Constraints

A deadline constraint captures the permissible maximum separation between


any two arbitrary events e1 and e2. In other words, the second event (i.e. e2) must
follow the first event (i.e. e1) within the permissible maximum separation time.
Consider that t(e1 ) and t(e2 ) are the time stamps on the occurrence of the events
e1 and e2 respectively and d is the deadline.

Δ denotes the actual separation between the time of occurrence of the two
events e1 and e2, and d is the deadline. A deadline constraint implies that e2 must
occur within d time units of e1’s occurrence. We can alternatively state that t(e1)
and t(e2) must satisfy the constraint:

t(e2 ) − t(e1 ) ≤ d

Duration Constraints
A duration constraint on an event specifies the time period over which the
event acts. A duration constraint can either be minimum type or maximum type.
The minimum type duration constraint requires that once the event starts, the event
must not end before a certain minimum duration; whereas a maximum type
duration constraint requires that once the event starts, the event must end before a
certain maximum duration elapses.
5. Explain why safety and reliability are not independent issues in safety-
critical hard real time systems. Explain the basic techniques you would
adopt to develop a software product that is required to be highly
reliable.

Answer.
A hard real-time task is one that is constrained to produce its results within certain
predefined time bounds. The system is considered to have failed whenever any of
its hard real-time tasks does not produce its required results before the specified
time bound. So
Applications having hard real-time tasks are typically safety-critical. This
means that any failure of a real-time task, including its failure to meet the
associated deadlines, would result in severe consequences. This makes hard real-
time tasks extremely critical. Criticality of a task can range from extremely critical
to not so critical. Task criticality therefore is a different dimension than hard or soft
characterization of a task. Criticality of a task is a measure of the cost of a failure -
the higher the cost of failure, the more critical is the task.
For hard real-time tasks in practical systems, the time bounds usually range
from several micro seconds to a few milli seconds. It may be noted that a hard real-
time task does not need to be completed within the shortest time possible, but it is
merely required that the task must complete within the specified time bound. In
other words, there is no reward in completing a hard real-time task much ahead of
its deadline.
So safety and reliability are not independent issues in safety-critical hard real
time systems.
The basic techniques which are adopt to develop a software product that is required
to be highly reliable.

Good engineering methods can largely improve software reliability.

Before the deployment of software products, testing, verification and validation are
necessary steps. Software testing is heavily used to trigger, locate and remove
software defects. Software testing is still in its infant stage; testing is crafted to suit
specific needs in various software development projects in an ad-hoc manner.
Various analysis tools such as trend analysis, fault-tree analysis, Orthogonal Defect
classification and formal methods, etc, can also be used to minimize the possibility
of defect occurrence after release and therefore improve software reliability.

After deployment of the software product, field data can be gathered and analyzed
to study the behavior of software defects. Fault tolerance or fault/failure
forecasting techniques will be helpful techniques and guide rules to minimize fault
occurrence or impact of the fault on the system.

6. Give an example of soft real time task and non real time task. Explain
the difference in between these two types of tasks?

Answer.
An example of a soft real-time task is a task handling a request for a seat
reservation in a railway reservation application. Once a request for reservation is
made, the response should occur within 20 seconds on the average. The response
may either be in the form of a printed ticket or an apology message on account of
unavailability of seats. Alternatively, we might state the constraint on the ticketing
task as: At least in case of 95% of reservation requests, the ticket should be
processed and printed in less than 20 seconds.

A few examples of non-real-time tasks are: batch processing jobs, e-mail, and
back ground tasks such as event loggers.
Batch processing is the sequential execution of a series of programs ("jobs") on
a computer. The term batch originated in the days when programmers wrote code
on paper forms which would be keypunched onto 80-column punch cards or paper
tape. The cards or tape would then be passed to the system operator who would
schedule the task and later stage feed the program into the computer. Because a
number of tasks would be 'batched' together rather than be put into the system
immediately the tasks were referred to as "batch jobs".

Let us now analyze the impact of the failure of a soft real-time task to meet its
deadline, by taking the example of the railway reservation task. If the ticket is
printed in about 20 seconds, we feel that the system is working fine and get a feel
of having obtained instant results. As already stated, missed deadlines of soft real-
time tasks do not result in system failures. However, the utility of the results
produced by a soft real-time task falls continuously with time after the expiry of
the deadline. The utility of the results produced are 100% if produced before the
deadline, and after the deadline is passed the utility of the results slowly falls off
with time. For soft real-time tasks that typically occur in practical applications, the
time bounds usually range from a fraction of a second to a few seconds.
 A non-real-time task is not associated with any time bounds.
 Soft real-time tasks have time bounds associated with them. However,
unlike hard and firm real-time tasks, the timing constraints on soft real-
time tasks are not expressed as absolute values. Instead, the constraints
are expressed either in terms of the average response times required

S-ar putea să vă placă și