Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Software Engineering Tutorial
  • Software Development Life Cycle
  • Waterfall Model
  • Software Requirements
  • Software Measurement and Metrics
  • Software Design Process
  • System configuration management
  • Software Maintenance
  • Software Development Tutorial
  • Software Testing Tutorial
  • Product Management Tutorial
  • Project Management Tutorial
  • Agile Methodology
  • Selenium Basics
Open In App
Next Article:
Tasks in Real Time systems
Next article icon

Tasks in Real Time systems

Last Updated : 31 Aug, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

The system is subjected to real-time, i.e. response should be guaranteed within a specified timing constraint or system should meet the specified deadline. For example flight control systems, real-time monitors, etc. 

There are four types of tasks in real-time systems: 

  1. Periodic tasks
  2. Dynamic tasks
  3. Critical task
  4. Non-critical task
  • Periodic Tasks: In periodic tasks, jobs are released at regular intervals. A periodic task is one that repeats itself after a fixed time interval. A periodic task is denoted by four tuples: Ti = < Φi, Pi, ei, Di > 
    Where, 
    • Φi - is the phase of the task. Phase is the release time of the first job in the task. If the phase is not mentioned then the release time of the first job is assumed to be zero.
    • Pi - is the period of the task i.e. the time interval between the release times of two consecutive jobs.
    • ei - is the execution time of the task.
    • Di - is the relative deadline of the task.

For example: Consider the task Ti 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 then the next job is released at t = 10. So jobs are released at t = 5k where k = 0, 1, . . ., n

Interval real time

Hyper period of a set of periodic tasks is the least common multiple of periods of all the tasks in that set. For example, two tasks T1 and T2 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 pattern of job release times starts to repeat.

  • 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. 
    1. Aperiodic Tasks: In this type of task, jobs are released at arbitrary time intervals i.e. randomly. Aperiodic tasks have soft deadlines or no deadlines.
    2. Sporadic Tasks: They are similar to aperiodic tasks i.e. they repeat at random instances. The only difference is that sporadic tasks have hard deadlines. A sporadic task is denoted by three tuples: Ti =(ei, gi, Di) 
      Where 
      ei - the execution time of the task. 
      gi - the minimum separation between the occurrence of two consecutive instances of the task. 
      Di - the relative deadline of the task.


  • Critical Tasks:

Critical Tasks are those whose opportune executions are basic. In the event that cutoff times are missed, calamities happen.

For instance, life-emotionally supportive networks and the steadiness control of airplane. On the off chance that basic errands are executed at a higher recurrence, it is fundamental.


  • Non-critical Tasks:

Non-critical Tasks are genuine times assignments. As the name infers, they are not basic to the application. Be that as it may, they can manage time, changing information, and consequently they are futile on the off chance that not finished inside a cutoff time. The objective of booking these assignments is to expand the level of occupations effectively executed inside their cutoff times.



Jitter: Sometimes actual release time of a job is not known. Only know that ri is in a range [ ri-, ri+ ]. This range is known as release time jitter. Here ri- is how early a job can be released and ri+ is how late a job can be released. Only the range [ ei-, ei+ ] of the execution time of a job is known. Here ei- is the minimum amount of time required by a job to complete its execution and ei+ is the maximum amount of time required by a job to complete its execution. 

Precedence Constraint of Jobs: Jobs in a task are independent if they can be executed in any order. If there is a specific order in which jobs in a task have to be executed then jobs are said to have precedence constraints. For representing precedence constraints of jobs a partial order relation < is used. This is called precedence relation. A job Ji is a predecessor of job Jj if Ji < Jj i.e. Jj cannot begin its execution until Ji completes. Ji is an immediate predecessor of Jj if Ji < Jj and there is no other job Jk such that Ji < Jk < Jj. Ji and Jj are independent if neither Ji < Jj nor Jj < Ji 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. Jobs are represented by vertices of the graph and precedence constraints are represented using directed edges. If there is a directed edge from Ji to Jj then it means that Ji is the immediate predecessor of Jj. For example: Consider a task T having 5 jobs J1, J2, J3, J4, and J5 such that J2 and J5 cannot begin their execution until J1 completes and there are no other constraints. 

The precedence constraints for this example are: 
J1 < J2 and J1 < J5  

Precedence graph

Set representation of precedence graph: 

  1. < (1) = { }
  2. < (2) = {1}
  3. < (3) = { }
  4. < (4) = { }
  5. < (5) = {1}

Consider another example where a precedence graph is given and you have to find precedence constraints 

precedence graph another example


From the above graph, we derive the following precedence constraints:  

  1. J1 < J2
  2. J2 < J3
  3. J2 < J4
  4. J3 < J4

FAQ:

What are some common examples of real-time systems?
Industries like aviation, healthcare, manufacturing, and telecommunications make use of real-time systems. The employed systems incorporate flight control applications, real-time monitors in healthcare facilities, industrial control systems, and real-time communication systems.

What is the difference between aperiodic and sporadic tasks?
Tasks that are aperiodic are not released on a regular schedule, whereas sporadic tasks are released at irregular but anticipated intervals. Aperiodic tasks may have lenient or nonexistent deadlines, while sporadic tasks are required to meet strict deadlines.

What is jitter in real-time systems?
The time release or execution of a task can be affected by a fluctuation known as Jitter. This phenomenon can be triggered by multiple factors including network delays, software errors, or hardware limitations. Struggling to manage Jitter can have a tremendous effect on real-time systems, so precise timing control is crucial.

How are precedence constraints represented in real-time systems?
Precedence constraints are represented using a directed graph called a precedence graph. Each job is represented by a vertex, and the precedence constraints are represented by directed edges between vertices. If there is a directed edge from job A to job B, it means that A must complete before B can begin.

What is the hyper period of a set of periodic tasks?
The hyper period of a set of periodic tasks is the least common multiple of their periods. It is the smallest time after which the pattern of job release times for all tasks in the set repeats. The hyper period is an important parameter in real-time scheduling, as it determines the scheduling cycle for the tasks.


Next Article
Tasks in Real Time systems

P

priyanka dahiya
Improve
Article Tags :
  • Software Engineering

Similar Reads

    Types of Real Time Tasks
    Real Time Tasks :A task whose performance is judged based on deadlines is termed as real time tasks. And the hardware System that handles the real time tasks are called "Real Time Systems". There are three types of Real Time Tasks - Hard Real Time TasksSoft Real Time TasksFirm Real Time Tasks These
    3 min read
    TCD (Task-centered system design)
    Task-Centered system design A variant of user-centered design, task-centered system design, is a technique that allows developers to design and evaluate interfaces based on users' real-world tasks. As part of the design, this becomes a requirements analysis (requirements are the tasks to be performe
    6 min read
    Distributed Real-Time Systems
    Distributed real-time systems are networks of computers that coordinate to perform tasks instantly. These systems respond to inputs without delay, which is crucial for many modern applications. They manage data and processes across various locations in a synchronized manner. Industries like manufact
    8 min read
    Real Time Operating System (RTOS)
    Real-time operating systems (RTOS) are used in environments where a large number of events, mostly external to the computer system, must be accepted and processed in a short time or within certain deadlines. such applications are industrial control, telephone switching equipment, flight control, and
    6 min read
    Real Time Systems
    A real-time system means that the system is subjected to real-time, i.e., the response should be guaranteed within a specified timing constraint or the system should meet the specified deadline. For example flight control systems, real-time monitors, etc. Types of real-time systems based on timing c
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences