Professional Documents
Culture Documents
Assi Progress
Assi Progress
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 been written for me another person.
Student’s signature:
ANKUR RAJ PANDEY.
Evaluator’s comments:
Part-A
Q. 1 Identify at least 5 real time application areas.
Ans. In computer science, real-time computing (RTC), or reactive computing, is the study of
hardware and software systems that are subject to a "real-time constraint"—i.e., operational
deadlines from event to system response. Real-time programs must execute within strict
constraints on response time. By contrast, a non-real-time system is one for which there is no
deadline, even if fast response or high performance is desired or preferred. The needs of real-
time software are often addressed in the context of real-time operating systems, and synchronous
programming languages, which provide frameworks on which to build real-time application
software.
3. The WebAdmin Interface provides the Real-Time Application Environment Editor pages to
manage Server-wide, Cluster-wide, and Domain Application Environments.
The Environment Editor page contains the list of all files "visible" in this Environment: it lists
files directly uploaded to this particular Environment, as well as all files uploaded to the
Environments used as the "default files" source for this Environment.
4. The Bridged Call functionality is used to implement the B2BUA (Back-to-Back User Agents)
technology. A pair of Real-Time Tasks in the Bridged Mode can work as a "smart proxy": while
peers connected to these tasks can communicate directly, the signaling is still controlled with the
Tasks and the application programs these Tasks are running.
5.Artificial intelligence
The classical conception is that in a hard real-time or immediate real-time system, the
completion of an operation after its deadline is considered useless - ultimately, this may cause a
critical failure of the complete system.
thus, the goal of a hard real-time system is to ensure that all deadlines are met,
Hard real-time systems are used when it is imperative that an event is reacted to within a strict
deadline. Such strong guarantees are required of systems for which not reacting in a certain
interval of time would cause great loss in some manner, especially damaging the surroundings
physically or threatening human lives
Hard real-time systems are typically found interacting at a low level with physical hardware, in
embedded systems.
A soft real-time system on the other hand will tolerate such lateness, and may respond with
decreased service quality (e.g., omitting frames while displaying a video).
but for soft real-time systems the goal becomes meeting a certain subset of deadlines in order to
optimize some application specific criteria.
Soft real-time systems are typically used where there is some issue of concurrent access and the
need to keep a number of connected systems up to date with changing situations; for example
software that maintains and updates the flight plans for commercial airliners. The flight plans
must be kept reasonably current but can operate to a latency of seconds. Live audio-video
systems are also usually soft real-time; violation of constraints results in degraded quality, but
the system can continue to operate
Q. 3 Elaborate the three model elements for a real time system that helps designing
a reference model.
Workload Model –
A job is a unit of work that is scheduled and executed by a system
– e.g. computation of a control-law, computation of an FFT on sensor data,transmission of a data
packet, retrieval of a file
• A task is a set of related jobs which jointly provide some function
– e.g. the set of jobs that constitute the “maintain constant altitude” task, keeping an airplane
flying at a constant altitude
INTERCONNECTION PARAMETERS
• Defines how the job depends on others, how others depend on it.
• Some types of edge-interconnection parameters:
Data dependency
Temporal Dependency
2) RESOURCE MODEL
Modeling of resources as
• Active resources (Servers/Processors)
• Passive resources (Resources)
Processors: CPU, Transmission Link, Disks, etc.
Processors carry out machine instruction, move data, retrieve files, etc.
Resources: Memory, mutexes, locks, etc.
Some Characteristics:
• Context Switch Time
• Pre-emptivity
Parameters of Resource Vs Resource Parameters of Job
3)SCHEDULING MODEL
• The total amount of processor time assigned to every job is equal to its
maximum or actual execution time.
Part-B
Q. 4 Consider a real time system. Identify the psuedocode and draw the task graph
for the same.
Ans. BANKING
GET /bank/init.php?BESIM_HOST=besimhost1+besimhost2&BESIM_PORT=81+82\
&BESIM_URI=/BeSim/specweb2009_besim&BESIM_PERSISTENT=true\
&PADDING_DIR=/data/SPECweb2009/bank/dynamic_padding/\
&SMARTY_DIR=/data/SPECweb2009/assl/Smarty2.6.2/libs/\
&SMARTY_SUPPORT_DIR=/data/SPECweb2009/support/\
&SEND_CONTENT_LENGTH=true
[Foreach name, value pair in QUERYSTRING]
Set name = value (NOTE: these must persist across script executions)
[End Foreach]
<html>
<head>
</head>
<body>
<P>SERVER_TIME = [SERVER_TIME]</P>
</body>
</html>
Sample requests:
GET /bank/login.php HTTP/1.1
or
POST /bank/login.php HTTP/1.1
[rest of HTTP headers]
Content-Type: application/x-www-form-urlencoded
Content-Length: 19
userid=6&password=6
Set MESSAGE = ''
[If {POST_DATA['userid']} and {POST_DATA['password']} are not set]
[No-op]
[Else If {POST_DATA['userid']} or {POST_DATA['password']} are empty]
Set MESSAGE = 'No empty user id or password allowed!'
[Else]
Set REAL_PASSWORD, ERROR_NUM = [BESIM query with REQUEST = '1&' +
{POST_DATA['userid']}]
[If ERROR_NUM not 0]
REAL_PASSWORD = ''
[End If]
Set FORM_PASSWORD = [MD5 hash of {POST_DATA['password']}]
[If REAL_PASSWORD equivalent to FORM_PASSWORD]
Set ACCOUNT_BALANCE_ARRAY, ERROR_NUM = [BESIM query with REQUEST
= '2&' + {POST_DATA['userid']}]
Return Page with HTML =
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>SPECweb2009: Welcome</title>
</head>
<body bgcolor="white">
<!-- SPECweb2009 Dynamic Data Area -->
<table summary="SPECweb2009_User_Id">
<tr><th>User ID</th></tr>
<tr><td>{POST_DATA['userid']}</td></tr>
</table>
<table summary="SPECweb2009_Acct_Balance" cellpadding=3 border=1>
<tr>
<th>Account</th>
<th>Type</th>
<th>Balance</th>
</tr>
[Foreach account in ACCOUNT_BALANCE_ARRAY]
<tr><td>{account[accountno]}</td>
<td>[If {account[type]} == "1"]
Checking
[Else If {account[type]} == "2"]
Saving
[Else]
Other
[End If]</td>
<td>{account[balance]}</td>
</tr>
[End Foreach]
</table>
<!-- SPECweb2009 Displayable Page Title -->
<table>
<tr>
<td><b><font color="#9400d3">SPECweb2009: Welcome User</font></b></td>
</tr>
</table>
<!-- SPECweb2009 User Action Area -->
[Include Menu Template]
<!-- SPECweb2009 Image References -->
<!-- SPECweb2009 Embedded Text -->
<pre>
[Include [PADDING_DIRECTORY]/welcome]</pre>
</body>
</html>
Set {SESSION_ARRAY['userid']} = {POST_DATA['userid']}
[EXIT]
[Else]
Set MESSAGE = 'Incorrect user id or password!'
[End If]
[End If]
Return Login Page Template
• Preemptivity
– Preemption: suspend job then dispatch different job to processor. Cost includes context
switch overhead.
– Non-preemptable task - must be run from start to completion.
• Criticalness - positive integer indicating the relative
importance of a job. Useful during overload.
• Optional Executions - jobs or portions of jobs may be declared optional. Useful during
overload.
• Laxity - Laxity type => hard or soft timing constraints.Supplemented by a usefulness function.
Useful during overload.
Role played by constraints and dependencies in real time systems with the example of traffic
intersection control system that controls the traffic system:-