Skip to main content

Introduction to Real Time Systems

System
Set of one or more inputs entering the black box and a set of outputs exiting the black box is called a system.

Response Time
The time between the presentation of set of inputs and the appearance of the associated outputs.

Real time System
A System that must satisfy the response tine constraints or it will be a failure.

Embedded System
A software system that is completely encapsulated by the hardware that it controls.

Deadline
The instant of time at which the execution of task is required to be completed.
* absolute deadline
* relative deadline = absolute deadline – release time

Release time
The instant of time at which the task or job is ready for execution

Challenges or Issues in Real time Systems
  • Selection of hardware and Software (Hardware includes sensors, actuators, timers, controllers or processors)
  • Selection of the operating Systems (Real Time Operating System) (RTOS works under the preemption principle.)
  • Selection of Programming language. (C, C++, ADA, Java, etc)
  • Maximizing the fault tolerance
  • Testing of the systems
  • Prediction and measurement of response time (The system should predict and measure of the response time before the development of the application.)
  • Concurrent control
Temporal parameters of Real Time workload
Task – A set of related jobs that execute to support a function is called a task.
Periodic task
Aperiodic task
Sporadic task
Fixed, Jittered and sporadic release time
Jittered means the range of release time
(ri- , ri+) the release time is given range
Execution time
Depends on the complexity of job and speed of the processor
The MPEG compression will take long time to execute.

Functional Parameters of RTS
  • Preemption of jobs
  1. if one job is running, when the other job comes and want of the execution, the first job is suspended and then the second job will be executed, after the second job complete, the first again resumes. This is called preemption. Usually the RTOS are working under the preemptive scheduling mechanism.
  2. The disadvantage here is the overhead due to the context switching. Because switching between the tasks frequently is a over head.
  • Criticality of jobs
  1. Criticality means the urgency of a job. That is, if a job is a urgent job so that it should be completed soon, then the job is said to be critical and that job has to be given higher priority or weightage.
  2. Generally, if tasks are there, then we can say priority of the task and if jobs are there, then we can say weightage of the job.
  • Optional execution
  1. Some jobs may be partially done or not at all executed, we can simple neglect those jobs or in other words the jobs are optional one.
  • Laxity type
  1. Determines whether hard or soft deadlines
  2. Based on usefulness function
Scheduling Hierarchies
A scheduler is responsible for managing the resource allocation to the tasks and it is based on the scheduling algorithms. A scheduler produces a valid schedules should obey these rules
  • Every process is assigned to atmost one job at a time
  • Every job is assigned to atmost one processor at a time
  • No job is scheduled before its release time
  • Depending on the scheduling algorithms used, the total amount of processor time assigned to every job is equal to its actual execution time
  • All the precedence and resource usage constraints are satisfied.

Precedence constraints and data dependency
  • Precedence graph and task graph
  1. Ti <>
  2. Tj is constrained to be preceded by Ti
  • Data dependency
  1. A common pool of data is used by various tasks in the system. So it is said as the shared data, being the data shared, there may not be any precedence constraints.
  • Temporal dependency
  1. Jobs are said to have a temporal distance constraint if their temporal distance must be a finite value. For example, the synchronizing the video and audio should have a temporal distance of 160ms.
  • * AND/ OR precedence constraints
  1. One job will be waiting for all its immediate predecessor to be completed before its execution begins.
  2. Eg. Transmitting a message can be accomplished only after the following three conditions, so transmitting a message refers a AND job.
  3. Setting the connection
  4. Encrypt the data
  5. Checking users account

  • One or more of its immediate predecessors are completed, and then it starts its execution. This is called as OR precedence constraints.
  1. So, to draw the task graph one should note these things in mind
  2. AND job is represented by - unfilled circle - o
  3. OR job is represented by – square box
  4. Branching is by means of – filled circle
Examples
o o o o o -(each circle indicate one task) there are five tasks, all are independent and
one task does not depend on the other. So, No precedence constraints

o------->o------> o------->o------> o------> o Here there are five tasks with precedence
constraints and one task after the completion, then only the next task will run, this is a dependency relationship

Comments

  1. A real-time operating system (RTOS) is an operating system that guarantees a certain capability within a specified time constraint.

    ques : i found this def somewhere .i dont really understand the difference between os and rtos.is windows xp rtos???

    ReplyDelete
  2. The specified time constraint... its response time and deadline associated with the Operating System..... Windows XP, the response time is unpredictable..

    ReplyDelete
  3. sir,
    is RTOS an hardware specific ?
    or its like some kernel will be available for development ?

    ReplyDelete
  4. sir,
    is RTOS an hardware specific ?
    or its like some kernel will be available for development ?

    ReplyDelete
  5. Each RTOS needs a Target Machine to run. For Example, the mobile phone uses a OS (symbian). it needs a Target Machine (ARM Controllers). Having a RTOS without any target, you can simply run hello world kind of examples...... but there are some RTOS,they provide freely which can be running under Personal Computer, as they the target as Intel itself. Ex. Micro C OS II, http://www.micrium.com

    ReplyDelete

Post a Comment

Popular posts from this blog

Installing ns-3.34 in Ubuntu 20.04

This post shows how to install ns 3.34 in Ubuntu 20.04 LTS Prerequisites: Fresh installation of Ubuntu Version 20.04 LTS  ns3.34 can be downloaded from here Follow the video link for complete step by step instructions on the installation.  This version fixes the compilation issues of vanet-routing-compare.cc (bug in ns3.33)  Issue the following commands after opening a terminal  $ sudo apt update $ sudo apt install g++ python3 python3-dev python-dev pkg-config sqlite3 python3-setuptools git qt5-default gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 openmpi-bin openmpi-common openmpi-doc libopenmpi-dev autoconf cvs bzr unrar openmpi-bin openmpi-common openmpi-doc libopenmpi-dev tcpdump wireshark libxml2 libxml2-dev Unzip or untar the ns-allinone-3.34.tar.bz2 in the home folder (in my case its /home/pradeepkumar) $ cd ns-allinone-3.34/ $ ./build.py --enable-examples --enable-tests  Once the installation is completed, you may get an output show

Installation of ns3 in Windows 10 and Windows 11 OS using WSL (Windows Subsystem for Linux)

This post shows how to install ns-3.33 in Windows 10 through WSL (Windows Subsystem for Linux) This posts works for Windows 11 also (I have tested it on a Windows 11 ISO and it works the Same way as mentioned in the following post.) This post will work for ns-3.3x version. Prerequisites : Install Windows Subsystem for Linux with GUI: Please refer the following video  System Information: OS used: Windows 10 and WSL (Ubuntu 20.04) GUI: XServer for Windows NS3 Version: ns-3.33 See the following complete video on how to install ns3 in Windows 10 Step 0 : Open XLaunch Step 1 :  Open WSL using PowerShell and open it as Administrator Command:/  wsl $ xfce4-session The GUI of Ubuntu Opens within Windows 10 OS. Step 2 : Download ns3 from nsnam.org website through Mozilla Firefox browser Step 3: Open a Terminal  $ sudo apt update $ sudo apt install build-essential autoconf automake libxmu-dev python3-pygraphviz cvs mercurial bzr git cmake p7zip-full python3-matplotlib python-tk python3-dev qt5-q

Installing NS-3.32 in Ubuntu 20.04

This is about installing ns version 3.32 in Ubuntu 20.04 LTS. #ns3 #ns3 .32 #networksimulation The commands used in the video are given here. $] sudo apt update $] sudo apt install build-essential autoconf automake libxmu-dev python3-pygraphviz cvs mercurial bzr git cmake p7zip-full python3-matplotlib python-tk python3-dev qt5-qmake qt5-default gnuplot-x11 wireshark Download the ns-allinone-3.32.tar.bz2 package from nsnam.org and copy it to /home/ folder See the full video for detailed instructions Extract it either in GUI or using command $] tar jxvf ns-allinone-3.32.tar.bz2 $] cd ns-allinone-3.32/ $] ./build.py --enable-examples --enable-tests The above command will take some time to install all the packages  You can see the output as shown below ns3 To check whether ns3 installed successfully, use the following commands. $] cd ns-3.32/ $] ./waf --run hello-simulator You should get the output as Hello Simulator $] ./waf --run first This is the example from the ns-3.32/exa