Tasks in RealTime SystemsA realtime operating system (RTOS) serves realtime applications that process data without any buffering delay. In an RTOS, the Processing time requirement is calculated in tenths of seconds increments of time. It is a timebound system that is defined as fixed time constraints. In this type of system, processing must be done inside the specified constraints. Otherwise, the system will fail. Realtime tasks are the tasks associated with the quantitative expression of time. This quantitative expression of time describes the behavior of the realtime tasks. Realtime tasks are scheduled to finish all the computation events involved in it into timing constraint. The timing constraint related to the realtime tasks is the deadline. All the realtime tasks need to be completed before the deadline. For example, Inputoutput interaction with devices, web browsing, etc. Types of Tasks in RealTime SystemsThere are the following types of tasks in realtime systems, such as: 1. Periodic Task In periodic tasks, jobs are released at regular intervals. A periodic task repeats itself after a fixed time interval. A periodic task is denoted by five tuples: T_{i} = < Φ_{i}, P_{i}, e_{i}, D_{i} > Where,
For example: Consider the task T_{i} with period = 5 and execution time = 3 Phase is not given so, assume the release time of the first job as zero. So the job of this task is first released at t = 0, then it executes for 3s, and then the next job is released at t = 5, which executes for 3s, and the next job is released at t = 10. So jobs are released at t = 5k where k = 0, 1. . . N Hyper period of a set of periodic tasks is the least common multiple of all the tasks in that set. For example, two tasks T_{1} and T_{2} having period 4 and 5 respectively will have a hyper period, H = lcm(p1, p2) = lcm(4, 5) = 20. The hyper period is the time after which the pattern of job release times starts to repeat. 2. Dynamic Tasks It is a sequential program that is invoked by the occurrence of an event. An event may be generated by the processes external to the system or by processes internal to the system. Dynamically arriving tasks can be categorized on their criticality and knowledge about their occurrence times.
3. Critical Tasks Critical tasks are those whose timely executions are critical. If deadlines are missed, catastrophes occur. For example, lifesupport systems and the stability control of aircraft. If critical tasks are executed at a higher frequency, then it is necessary. 4. Noncritical Tasks Noncritical tasks are real times tasks. As the name implies, they are not critical to the application. However, they can deal with time, varying data, and hence they are useless if not completed within a deadline. The goal of scheduling these tasks is to maximize the percentage of jobs successfully executed within their deadlines. Task SchedulingRealtime task scheduling essentially refers to determining how the various tasks are the pick for execution by the operating system. Every operating system relies on one or more task schedulers to prepare the schedule of execution of various tasks needed to run. Each task scheduler is characterized by the scheduling algorithm it employs. A large number of algorithms for realtime scheduling tasks have so far been developed. Classification of Task SchedulingHere are the following types of task scheduling in a realtime system, such as:
Precedence Constraint of JobsJobs in a task are independent if they can be executed in any order. If there is a specific order in which jobs must be executed, then jobs are said to have precedence constraints. For representing precedence constraints of jobs, a partial order relation < is used, and this is called precedence relation. A job J_{i} is a predecessor of job J_{j} if J_{i} < J_{j}, i.e., J_{j} cannot begin its execution until J_{i} completes. J_{i} is an immediate predecessor of J_{j} if J_{i} < J_{j}, and there is no other job J_{k} such that J_{i} < J_{k} < J_{j}. J_{i} and J_{j} are independent if neither J_{i} < J_{j} nor J_{j} < J_{i} is true. An efficient way to represent precedence constraints is by using a directed graph G = (J, <) where J is the set of jobs. This graph is known as the precedence graph. Vertices of the graph represent jobs, and precedence constraints are represented using directed edges. If there is a directed edge from J_{i} to J_{j}, it means that J_{i} is the immediate predecessor of J_{j}. For example: Consider a task T having 5 jobs J_{1}, J_{2}, J_{3}, J_{4}, and J_{5}, such that J_{2} and J_{5} cannot begin their execution until J_{1} completes and there are no other constraints. The precedence constraints for this example are: J_{1} < J_{2} and J_{1} < J_{5} Set representation of precedence graph:
Consider another example where a precedence graph is given, and you have to find precedence constraints. From the above graph, we derive the following precedence constraints:
Next TopicWhat is RPC in Operating System
