Erts Unit IV

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 20

UNIT IV

REAL TIME SYSTEMS

Structure of a Real Time System - Estimating program run times –


Task Assignment and Scheduling – Fault Tolerance Techniques –
Reliability, Evaluation – Clock Synchronization.
Operating System
⚫An Operating System performs all the basic tasks like managing
file, process, and memory.
⚫Thus operating system acts as manager of all the resources,
i.e. resource manager.
⚫Operating system becomes an interface between user and
machine.
Types of Operating Systems
⚫Batch Operating System
⚫Time-Sharing Operating Systems
⚫Distributed Operating System
⚫ Network Operating System
⚫Real-Time Operating System
1. Batch Operating System
Time-Sharing Operating Systems
Distributed Operating System
Network Operating System
Real-Time Operating System
⚫These types of OSs serves the real-time systems. The time
interval required to process and respond to inputs is very small.
This time interval is called response time.
⚫ Real-time systems are used when there are time requirements are
very strict like missile systems, air traffic control systems, robots etc
⚫ Two types of Real-Time Operating System which are as follows:
⚫ Hard Real-Time Systems:
⚫ Soft Real-Time Systems:
⚫Hard Real-Time Systems:
• These OSs are meant for the applications where time
constraints are very strict and even the shortest possible delay is
not acceptable.
⚫These systems are built for saving life like automatic parachutes
or air bags which are required to be readily available in case of
any accident.
⚫ Virtual memory is almost never found in these systems.
⚫Soft Real-Time Systems:
• These OSs are for applications where for time-
constraint is less strict.
Structure of a Real Time System
Estimating Program Run Times

⚫ Real time system meet deadlines, it is important to be able to


accurately estimate program run times.
⚫ Estimating the executing time of any given program is a very difficult
task
⚫ It depend on the following factors
⚫ Source code
⚫ Compiler-Mapping should be depend on the compiler used.
⚫ Machine architecture
⚫ Operating system
⚫ Analysis of a source code
⚫ L1: a = b x c;
⚫ L2: b = d + e;
⚫ L3: d = a – f;
Schematic of a timing estimation system
• Accounting of Pipeline

Two Stage pipeline


⚫ Cache Memory
⚫ Virtual Memory
Task Assignment and Scheduling
⚫ A Task requires some execution time on a processor
⚫ Also a task may required certain amount of memory or access to a bus
⚫ Sometimes a resource must be exclusively held by a task
⚫ In other cases resource may be exclusive or non exclusive depending on the
operation to be performed on it
⚫ Release Time
⚫ A task is a time at which all the data that are required to begin executing the Task are
available
⚫ Deadline
⚫ The deadline is the time by which the task must complete its execution
⚫ The deadline must be hard or soft
⚫ Task are classified as
⚫ Periodic

⚫ Sporadic

⚫ Aperiodic
⚫ Periodic
•A task Ti is periodic if it is released periodically. say every pi
seconds pi is called the period of task Ti

⚫ Sporadic Task
⚫ Sporadic task is a not periodic task, but may be invoked at irregular interval
⚫ Sporadic tasks are characterized by an upper bound on the rate at which they may be
invoked

⚫ APeriodic Task
⚫ Tasks to be those tasks which are not periodic and which also have no upper bound on
their invocation rate
⚫ Task Assignment / Schedule
⚫ All task starts after the release time and complete before their deadline

⚫ A schedule may be
⚫ Pre-computed(Offline scheduling)
⚫ Dynamically(Online Scheduling)
⚫ Pre-computed Scheduling
⚫ Advance the operation with specification of periodic tasks will be run and slots for the
sporadic / aperiodic tasks in the event that they are involved.

⚫ Dynamically Scheduling
⚫ Tasks are scheduled as they arrive in the system
⚫ The algorithm used in online scheduling must be fast and it takes to meet their
deadlines is clearly useless
⚫ Two types priority algorithms are used
⚫ Static priority algorithm
⚫ Dynamic priority algorithm

⚫ Static priority algorithm


⚫ Static priority algorithm assume that the task priority does not change within a mode
⚫ Example Rate monotonic algorithm

⚫ Dynamic priority algorithm


⚫ algorithm assume that the task priority can change within a time
⚫ Example Earliest Deadline First (EDF) algorthim

You might also like