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. T S Pradeepkumar4 December 2008 at 20:30

    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 TexLive 2019 in Ubuntu 18.04

Installation of TexLive 2019 in Linux (Ubuntu 18.04 LTS)
TeX (Tech)

Installation of TexLive 2019

Please watch the video for full installation



I used .iso file to download, the Total size is 3.3GB for Linux,

and i used the torrent file to download, it took me just 20 min to download the entire .iso file

Extract the .iso file to a folder and open a terminal

$] sudo ./install-tl
(it goes into a terminal mode, which is faster compared to the GUI Mode)

$] sudo ./install-tl -gui
after the installation, set the PATH, MANPATH and INFOPATH as suggested by LATEX

export PATH=$PATH:/usr/local/texlive/2019/bin/x86_64-linux
export MANPATH=/usr/local/texlive/2019/texmf-dist/doc/man
export INFOPATH=/usr/local/texlive/2019/texmf-dist/doc/info

put these lines in to the /home/pradeepkumar/.bashrc

$] gedit /home/pradeepkumar/.bashrc
We have installed TexLive 2019 and texstudio.

To install texstudio

$] sudo apt install texstudio
The look and feel of TexStudio looks like this image.


texlive, it install everyt…

Implementing a new system call in Kernel version 2.6.32

A system call is used by application or user programs to request service from the operating systems. Since the user programs does not have direct access to the kernel whereas the OS has the direct access. OS can access the hardware through system calls only.The following files has to be modified for implementing a system call/usr/src/linux-2.6.32.5/arch/x86/kernel/syscall_table_32.S/usr/src/linux-2.6.32.5/arch/x86/include/asm/unistd_32.h/usr/src/linux-2.6.32.5/include/linux/syscalls.h/usr/src/linux-2.6.32.5/MakefileNew set of files to be createdCreate a new directory newcall/ inside the path “/usr/src/linux-2.6.32.5/” Create new files Makefile, newcall.c and put them in the /usr/src/linux-2.6.32.5/newcall/ folder Create new user files (in any folder of Linux) to test the system call
testnewcall.c, testnewcall.h (created in /home/pradeepkumar) syscall_table_32.S Find the file /usr/src/linux-2.6.32.5/arch/x86/kernel/syscall_table_32.S and add the following line at the end
"…

Electrical Machine Design (equations)

FactorsDC Machine Transformers Induction Machines Synchronous MachinesOutput EquationPa=CoD2Ln, where Pa=P/h for generators, Pa=P for motorsFor Single Phase
Q=2.22 f Bm Ai Kw Aw d10-3
For Three Phase
Q=3.33 f Bm Ai Kw Aw d 10-3Q=CoD2 L ns
KVA Input Q=
HP * 0.746 / Cos f * hQ=CoD2 L ns
KVA Input Q=
HP * 0.746 / Cos f * h
For Turbo alternators
Q=1.11Bavac KwsVa2 L 10-3/nsOutput CoefficientCo=Bav ac* 10-3where Bav-magnetic loading and ac - electric loadingDNACo=11 Kws Bav ac 10-3Co=11 Kws Bav ac 10-3 Choice of Magnetic LoadingFlux Density in Teeth Frequency of Flux Reversals Size of machineDNAMagnetizing current, Flux Density, Iron lossIron loss, Stability, Voltage Rating, Parallel Operation, Transient ShortCircuit current Choice of Electric LoadingTemperature rise,
speed of machine, Voltage, Armature reaction, CommutationDNAOverload Capacity, Copper losses, Temperature rise, Leakage ReactanceCopper loss, Synchronous reactance, Temperature rise, Stray Load losses,
Voltage rating Flux …