Microkernel in Operating System | Operating System
Embedded systems IoT Design UNIT IV PPT.pptx
1. UNIT IV
REALTIME SYSTEMS
Structure of a Real Time System - Estimating program run times –
Task Assignmentand Scheduling – FaultTolerance Techniques –
Reliability, Evaluation – Clock Synchronization.
2. Operating System
⚫An Operating System performs all the basic tasks like managing
file, process, and memory.
⚫Thus operating system acts as managerof all the resources,
i.e. resource manager.
⚫Operating system becomes an interface between userand
machine.
3. Types of Operating Systems
⚫Batch Operating System
⚫Time-Sharing Operating Systems
⚫Distributed Operating System
⚫ Network Operating System
⚫Real-Time Operating System
8. Real-Time Operating System
⚫These types of OSs serves the real-timesystems. The time interval
required to process and respond to inputs isvery small. This time
interval is called response time.
⚫Real-time systems are used when there are time requirementsare
very strict like missilesystems, air trafficcontrol systems, robotsetc
⚫Twotypesof Real-Time Operating System which areas follows:
⚫Hard Real-Time Systems:
⚫Soft Real-Time Systems:
9. ⚫Hard Real-Time Systems:
• These OSs are meant for the applicationswhere time constraints
are very strict and even the shortest possibledelay is not
acceptable.
⚫These systems are built for saving life like automatic parachutes
orair bags which are required to be readily available in caseof any
accident.
⚫ Virtual memory is almost never found in these systems.
⚫Soft Real-Time Systems:
• These OSs are forapplications where for time-
constraint is less strict.
12. Estimating Program Run Times
⚫Real timesystem meetdeadlines, it is important to be able toaccurately
estimate program run times.
⚫Estimating theexecuting timeof anygiven program is averydifficult
task
⚫Itdepend on the following factors
⚫Source code
⚫Compiler-Mapping should be depend on thecompiler used.
⚫Machinearchitecture
⚫Operating system
17. TaskAssignment and Scheduling
⚫A Task requires someexecution timeon a processor
⚫Alsoa task may required certain amountof memoryor access toa bus
⚫Sometimesa resource must be exclusively held by a task
⚫In other cases resource may be exclusive or non exclusivedepending on the
operation to be performed on it
⚫ ReleaseTime
⚫ A task isa timeatwhich all thedata thatarerequired to beginexecuting theTask are
available
⚫ Deadline
⚫ Thedeadline is the time bywhich thetask mustcomplete its execution
⚫ Thedeadline must be hard orsoft
⚫ Task areclassified as
⚫ Periodic
⚫ Sporadic
⚫ Aperiodic
18. ⚫ Periodic
• A task Ti is periodic if it is released periodically. sayevery pi
seconds pi is called the period of task Ti
⚫ SporadicTask
⚫ Sporadic task is a notperiodic task, but may be invoked at irregular interval
⚫ Sporadic tasksarecharacterized byan upper bound on the rateat which they may be
invoked
⚫ APeriodicTask
⚫ Tasks to be those taskswhich are notperiodic and which also have no upper bound on their
invocationrate
19. ⚫Task Assignment / Schedule
⚫All task starts afterthe release timeand complete before theirdeadline
⚫A schedule may be
⚫ Pre-computed(Off linescheduling)
⚫ Dynamically(Online Scheduling)
20. ⚫Pre-computed Scheduling
⚫ Advance theoperation with specification of periodic taskswill be run and slots for the sporadic
/ aperiodic tasks in the event that theyare involved.
⚫Dynamically Scheduling
⚫ Tasks arescheduled as theyarrive in the system
⚫ Thealgorithm used in onlinescheduling must be fast and it takes to meet their
deadlines is clearly useless
⚫ Two types priorityalgorithmsare used
⚫ Static priorityalgorithm
⚫ Dynamic priorityalgorithm
⚫ Static priorityalgorithm
⚫ Staticpriorityalgorithm assume that the task prioritydoes not changewithina mode
⚫ Example Rate monotonicalgorithm
⚫ Dynamicpriorityalgorithm
⚫ algorithm assume that the task prioritycan changewithina time
⚫ Example Earliest Deadline First (EDF) algorthim