You are on page 1of 9

ASSIGNMENT- 4

ASSIGNMENT
OF
REAL TIME SYSTEM AND
SOFTWARE
(CAP-536)

SUBMITTED TO: - Miss. Jasleen


SUBMITTED BY: - Sakshi Sharma
Roll no B33
Sec-RE3804
MCA 4th Sem.
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:
Sakshi Sharma
Evaluator’s comments:

Marks obtained: ___________ out of ______________________


Part-A

Q1. The bandwidth of a priority-based token ring network


(IEEE 802.5) is 100 mbps. Assume that the propagation
time of the network is 10 mSec. Determine the fraction of
bandwidth wasted during every frame transmission, when
the frame size is 2 kbps (kilobytes per second) Under what
condition would the wasted bandwidth be zero?
Ans: - As in the question we have given the propagation time
10msec.
Bandwidth of network = 100 mbps
Frmae size F= 2kbps
Now according to the standard IEEE802.5 We have (F ,θ) the
minimum time required to complete transmission of frame.
Ө = propagation time= 10/100
Now, Max(2,10/100) So the fraction of bandwidth wasted during
every frame transmission is max(2,0.1) .
Therefore Minimum Time Required for Transmission=10
Bandwidth wasted in frame transmission=10/100=0.1
Wasted bandwidth will be zero if Propagation time & Frame size
are zero. But this is not possible.

Q2. Consider the use of timed token protocol (IEEE 802.4)


in the following situation. We have four nodes in the
system. The real time requirement is that node Ni be able
to transmit up to bi bits over each period of duration pi
milliseconds, where bi and pi are given in the table below.
Node bi pi
N1 IK 10,000
N2 4K 50,000
N3 16 K 90,000
N4 16 K 90,000
Choose suitable Target Token rotation Time (TTRT) and
obtain suitable values of fi (total number of bits that can
be transmitted by node Ni over every cycle). Assume that
the propagation time is negligible compared to TTRT and
that the system bandwidth is 1 mbps.
Ans: - System bandwidth given is 1mbps. The shortest deadline
among all the messages is 10000 nsec.
Therefore TTRT can be calculating as follows: -
TTRT=10,000/1=10000msec
Now, total number of bits that can be transmitted by node Ni over
every cycle i.e fi can be calculated as follows: -
B1/p1=1*8/10,000mb/msec
B2/p2=4*8/50,000mb/msec
B3/p3=16*8/90,000mb/msec
B4/p4=16*8/90,000mb/msec

Q3. In a real time packet switched network, explain the


roles of a traffic police and a traffic shaper, explain one
popular traffic shaping and one traffic policing techniques.
Ans: - Packet switching dominates data networks like the
internet. Packet switched networks exist for the data
communication needs of education, business, and government.
The role of traffic police and traffic shaping is important in any
network. The role of traffic police and traffic shaping is similar in
the aspect as both are used to control or inspect the traffic. The
role of traffic police is to discard the method that’s not meets
the criteria for a given environment on the other hand the role
of the traffic shaper is to control the rate of flow to which data
or packet is sent over the network meeting the certain criteria.
One of the most commonly techniques used for traffic
shaping and traffic policing is Leakey Bucket Method. This
can be explained as follows: -
Leakey Bucket Method: - Although the leaky bucket algorithm
has several uses, it is best understood in the context of network
traffic shaping or rate limiting. Typically, the algorithm is used to
control the rate at which data is injected into a network,
smoothing out "burstiness" in the data rate.
In Leakey bucket method there is a bucket with a hole in the
bottom. If packets arrive, they are placed into the bucket until it
becomes full, then packets are discarded. Packets are sent at a
constant rate, which is equivalent to the size of the hole in the
bucket.
Traffic policing allows you to control the maximum rate of traffic
sent or received on an interface, and to partition a network into
multiple priority levels. An application that wishes to use the
broadband network to transport traffic must first request a
connection, which involves informing the network about the
characteristics of the traffic and the Quality of service (QOS)
required by the application. This information is stored in a traffic
contract. If the connection request is accepted, the application is
permitted to use the network to transport traffic. During
communication, the network monitors the conformity between
the declared traffic characteristics and the characteristics of the
actual traffic entering the network. This is known as traffic
policing. The main purpose of this function is to protect the
network resources from malicious connections and to enforce the
compliance of every connection to its negotiated traffic contract.
PART – B

Q1. Would it be advisable to use an Ethernet LAN in a hard


real-time application such as factory automation? Justify
your answer. Evaluate the pros and cons of using an
Ethernet-based protocol in such an application.
Ans: -The main obstacle to using Ethernet at the Field level is the
non determinism of the Ethernet MAC protocol, which cannot
provide real-time traffic with bounded channel access times that’s
why it is not used with the hard real time application such
as factory automation.
Pros and cons of using the Ethernet based protocol in hard real
time application is as follows: -
Pros: -
1. It is simple to use.
2. It is relatively inexpensive as design of the Ethernet is
simple.
3. It is not noisy as in this we use the coaxial cable which is well
shielded and has a very high immunity from electrical noise.
Cons: -
1.It increases the transmission of the data packet.
2. Difficultto change this means that reconfiguring of the
Ethernet is difficult.
3.Fault tolerance.
4.Difficult trouble shooting.
5. Specialized cable used in order to establish the connection.
Q2. Identify the factors which contribute to delay jitter in
real-time communication. Assume that a certain real time
applications receive data at the rate of 10 mbps. The QoS
guarantee to the application permits a delay jitter of 20
mSec. Compute the buffer requirements at the receiver.

Ans: - The delay is the time taken to deliver a packet and the
jitter is a variance in the delay. The various factors that cause the
delay jitter in the real time communication is as follows: -
 Data message units can suffer jitter not only due to issues of
signal jitter, but also because they may encounter different
levels of congestion, which may cause them to spend
different amounts of time in queues.
 Variability in latency of a block, cell, frame, packet, or other
message unit.
 Delay problems with real-time traffic.
 Survey of TCP performance issues that result in delay.

As given above the application receive the data at the rate of 10


mbps.
Delay jitter is 20 mbps.
Now, buffer requirement at the receiver end can be finding as
follows: -
Buffer size (required) = peak* delay jitter
-3
= 10 mbps * 20 * 10 sec
= 2 / 10 = 0.2 mb Ans.

Q3. Traditional 2 phase locking (2PL) based concurrency


control protocol may not be suitable for use in real time
databases. Why? Explain how the traditional 2PL protocol
can be extending to make it suitable for use in real time
database applications.
Ans: - Many real-time database applications are deployed in
safety-critical systems like military systems where enforcing
security is crucial to the success of the organization. A secure
real-time database system has to simultaneously satisfy two
requirements - guarantee data security and minimize the number
of missed transaction deadlines.
A real-time database system usually requires maintaining a large
amount of temporal data objects which record and model a
physical, real-world environment. These temporal data objects are
accessed by application transactions to generate the ultimate
control actions. In the actual applications, real-time database
systems require not only ensuring transactions finished in the
specified time limits (deadlines), but also guaranteeing temporal
consistency of data objects accessed by transactions. The
traditional real-time concurrency control protocols stress on
meeting transaction deadlines, while ignore the fact that
transactions require reading fresh and consistent data. The
traditional 2 Phase Locking protocol is unsatisfactory for real Time
application because of
 Possibility of priority inversions.
 Long blocking delays.
 Lack of consideration for timing information.
 Undergo deadlock.

New protocol 2PL-HP, which stands for 2 Phase Locking- high


Priority based concurrency control overcomes some of the
problem of 2 PL protocol. In this, when a transaction requests a
lock on a data object held by a lower priority transaction in
conflicting mode, the lock holding lower priority transaction is
aborted. This protocol is also known as Priority Abort protocol.
This protocol in addition to being free from priority inversion is
also free from deadlocks. A result of various experiments tells
that 2PL-HP overcomes the problems of 2PL and 2PL-WP. Since
under 2PL-HP, work is wasted due to transaction abortions
occurring whenever a higher priority task requires a resource
locked by a lower priority transaction.

You might also like