Introduction to Real Time Systems
Set of one or more inputs entering the black box and a set of outputs exiting the black box is called a system.
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.
A software system that is completely encapsulated by the hardware that it controls.
The instant of time at which the execution of task is required to be completed.
* absolute deadline
* relative deadline = absolute deadline – 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
Task – A set of related jobs that execute to support a function is called a task.
Fixed, Jittered and sporadic release time
Jittered means the range of release time
(ri- , ri+) the release time is given range
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
- 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.
- The disadvantage here is the overhead due to the context switching. Because switching between the tasks frequently is a over head.
- Criticality of jobs
- 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.
- 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
- 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
- Determines whether hard or soft deadlines
- Based on usefulness function
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
- Ti <>
- Tj is constrained to be preceded by Ti
- Data dependency
- 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
- 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
- One job will be waiting for all its immediate predecessor to be completed before its execution begins.
- Eg. Transmitting a message can be accomplished only after the following three conditions, so transmitting a message refers a AND job.
- Setting the connection
- Encrypt the data
- 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.
- So, to draw the task graph one should note these things in mind
- AND job is represented by - unfilled circle - o
- OR job is represented by – square box
- Branching is by means of – filled circle
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