Clock Driven Approach
This chapter provides a brief overview of three commonly used approaches to scheduling real time systems: clock-driven, weighted round-robin and priority-driven. We need to be aware of several important facts about priority-driven scheduling. They are presented here and shown to be true. The weighted round-robin approach is used primarily for scheduling real-time traffic in high-speed switched networks.
Summary
This chapter provides a brief overview of three commonly used approaches to scheduling real time systems: clock-driven, weighted round-robin and priority-driven. We need to be aware of several important facts about priority-driven scheduling. They are presented here and shown to be true. The weighted round-robin approach is used primarily for scheduling real-time traffic in high-speed switched networks.
Things to Remember
1. Clock Driven Approach
- schedule calculated offline, can use complex algorithms
- applicable to deterministic systems
- since the parameters of all jobs are with hard deadlines are known, can construct a singel cyclic schedule in advance
2. Weighted Round Robin Scheduling
- parameter is known before, so online scheduling can be done
- minimum runtime ahead
- response time of preemptive > non-preemptive
- also called greedy algorithm
3. Priority Driven Scheduling
- list the priority of diffrent jobs
- FIFO, LIFO, SETF, LETF
MCQs
No MCQs found.
Subjective Questions
Q1:
Define otitis media?
Type: Very_short Difficulty: Easy
<p>Ear infections frequently are painful because of inflammation and buildup of fluids in the middle ear.</p>
Q2:
What are the causes of otitis media?
Type: Short Difficulty: Easy
<p>Other causes include;</p>
<p>_ bacterial infection with streptococcus pneumoniae.</p>
<p>_ group of beta-hemolytic streptococci</p>
<p>_ Hemophilus influenza</p>
Q3:
List out the symptoms of the otitis media?
Type: Short Difficulty: Easy
<p>Children</p>
<p>Signs and symptoms common in children include:</p>
<p>- Ear pain, especially when lying down</p>
<p>- Tugging or pulling at an ear</p>
<p>- Difficulty sleeping</p>
<p>- Crying more than usual</p>
<p>- Acting more irritable than usual</p>
<p>- Drainage of fluid from the ear</p>
<p>- Headache</p>
<p>- Loss of appetite</p>
<p> </p>
<p>Adults</p>
<p>Common signs and symptoms in adults include:</p>
<p>- Ear pain</p>
<p>- Drainage of fluid from the ear</p>
<p>- Diminished hearing</p>
Q4:
Describe the risk factors of otitis media and how it can be diagnosed?
Type: Long Difficulty: Easy
<p>- Age. Children between the ages of 6 months and 2 years are more susceptible to ear infections because of the size and shape of the eustachian tubes and because of their poorly developed immune systems.</p>
<p>- Infant feeding. Babies who drink from a bottle, especially while lying down, tend to have more ear infections than do babies who are breast-fed.</p>
<p>- Seasonal factors. Ear infections are most common during the fall and winter when colds and flu are prevalent. People with seasonal allergies may have a greater risk of ear infections during seasonal high pollen counts.</p>
<p>- Poor air quality. Exposure to tobacco smoke or high levels of air pollution can increase the risk of ear infection.</p>
<p> </p>
<p>Tests and diagnosis</p>
<p>_ Physical examination- fever, painless, purulent discharge.</p>
<p>_ History taking - allergies, dizziness , a sensation of fullness in ear etc.</p>
<p>_ Tympanometry - This test measures the movement of the eardrum. The device, which seals off the ear canal, adjusts the air pressure in the canal, thereby causing the eardrum to move.</p>
<p>_ Acoustic reflectometry - This test measures how much sound emitted from a device is reflected back from the eardrum ; an indirect measure of fluids in the middle ear.</p>
<p> </p>
Q5:
How it can be treated and write the nursing management and patient teaching for otitis media?
Type: Short Difficulty: Easy
<ol>
<li>Treatment of underlying causes.</li>
<li>Elimination of eustachian tube obstruction.</li>
<li>Antibiotic therapy</li>
<li>Surgery</li>
</ol>
<p>_ myringotomy ( surgical incision of the eardrum )</p>
<p> </p>
<p><strong>Nursing management And patient teaching</strong></p>
<ol>
<li>Proper instillation of ointment, drop and ear wash as ordered.</li>
<li>Drug administration, dosage and possible adverse effects.</li>
<li>Encourage for adequate fluid intake.</li>
<li>If the ear is draining, the external canal may be cleaned with sterile cotton swabs or pledget soaked in hydrogen peroxide.</li>
<li>The wicks need to stay dry during shampoos or baths.</li>
<li>Give antibiotic as per prescription.</li>
<li>Eliminating tobacco smoke and known allergens is also recommended.</li>
</ol>
<p> </p>
Videos
No videos found.

Clock Driven Approach
Clock-Driven Approach
As the name suggests, when scheduling is clock-driven (also called time-driven), decisions on what jobs execute at what times are made at speciï¬ÂÂÂÂÂÂÂc time instants. These instants are chosen a priori before the execution of the system begins. Typically, in a system that uses clock-driven scheduling, all the parameters of hard real-time jobs are ï¬ÂÂÂÂÂÂÂxed and known. A schedule of the jobs is computed off-line and is stored for use at run time. At each scheduling decision time, the scheduler schedules the jobs according to this schedule. This way, scheduling overhead during run-time can be minimized.
A frequently adopted choice is to make scheduling decisions at regularly spaced time instants. One way to implement a scheduler that makes scheduling decisions periodically is to use a hardware timer. The timer is set to expire periodically without the intervention of the scheduler. When the system is initialized, the scheduler selects and schedules the job(s) that will execute until the next scheduling decision time and then blocks itself waiting for the expiration of the timer. When the timer expires, the scheduler awakes and repeats these actions. (Liu 60)
Weighted Round Robin Scheduling
The round-robin approach is normally used for scheduling time-shared applications. When jobs are scheduled on a round-robin basis, every job joins a First-in-ï¬ÂÂÂÂÂÂÂrst-out, FIFO queue when it becomes ready for execution. The job at the head of the queue executes for at most one-time slice. (A time slice is the basic granule of time that is allocated to jobs. In a time shared environment, a time slice is typically in the order of tens of milliseconds.) If the job isn’t complete by the end of the time slice, it is preempted and is placed at the end of the queue where it waits for its next turn. When there are n number of ready jobs in the queue, each job gets one-time slice every n time slices, i.e., every round. Because the length of the time slice is short, the execution of every job begins immediately after it becomes ready. Each job gets 1/n th share of the processor when there are n jobs ready for execution. Due to this reason, the round-robin algorithm is also known as the processor-sharing algorithm.
The weighted round-robin algorithm has been used for scheduling real-time trafï¬ÂÂÂÂÂÂÂc in high-speed switched networks. It is built on the basic round-robin scheme. Rather than giving all the ready jobs equal shares of the processor, different jobs may be given different weights. Here, the weight of a job means the fraction of processor time allocated to the job. Speciï¬ÂÂÂÂÂÂÂcally, a job with weight wt gets wt time slices every round, and the length of a round is equal to the sum of the weights of all the jobs ready. We can speed up or retard the progress of each job toward its completion by adjusting the weights of jobs. (Liu ,61)
For example, consider two sets of jobs, J1 ={J1,1, J1,2}and J2 ={J2,1, J2,2}, shown in below. The release times of all jobs are 0, and their execution times are 1. J1,1 and J2,1 execute on processor P1, andJ1,2 and J2,2 execute on processor P2. Suppose that J1,1 is the predecessor of J1,2, and J2,1 is the predecessor of J2,2 .
1.png)
Priority-driven scheduling
The priority-driven algorithms refers to a large class of scheduling algorithms that never leave any resource idle intentionally. It can be stated in another way as, a resource idles only when no job requiring their source is ready for execution. Scheduling decisions are made when events such as releases and completions of jobs occur. Therefore, priority-driven algorithms are event-driven.
Other names for this approach are greedy scheduling, list scheduling and work-conserving scheduling. A priority-driven algorithm is said to be greedy because it tries to make locally optimal decisions. Leaving a resource idle while some job is ready to use the resource is not locally optimal. So, when a processor or resource is available and some job can use it to make progress, such an algorithm never makes the job wait.
The term list scheduling is also descriptive because any priority-driven algorithm can be executed by assigning priorities to jobs. Jobs that are ready for execution are placed in one or more queues in the order of the priorities of the jobs. At any scheduling decision time, the jobs with the highest priorities are scheduled and executed on the available processors. Hence, a priority-driven scheduling algorithm is deï¬ÂÂÂÂÂÂÂned to a great extent by the list of priorities it assigns to jobs; the priority list and other rules, such as whether preemption is allowed, deï¬ÂÂÂÂÂÂÂne the scheduling algorithm completely. Most scheduling algorithms used in non-real-time systems are priority-driven. The examples include the FIFO (First-In-First-Out) and LIFO (Last-In-First-Out) algorithms, that assign priorities to jobs according their release times, and the SETF (Shortest-Execution-Time-First) and LETF (Longest-Execution-Time-First) algorithms, that assign priorities on the basis of job execution times. Because the priorities of jobs can be dynamically changed, even round robin scheduling can be thought of as priority-driven. The priority of the executing a job is lowered to the minimum value among all jobs waiting for execution after the job has executed for a time slice. (Liu , 62)
.png)
Dynamic System vs. Static System
If the jobs are scheduled on multiple processors and a job can be dispatched from the priority run queue to any of the processor, then the system is called dynamic. A job can migrate in a dynamic system. The migration occurs if the job starts execution on one processor and resumes on a different processors.
If the jobs are partitioned into subsystems and each subsystem is bound statically to a single processor then the system is called static system. There is no possibility of job migration in static system. The static system has inferior performance in terms of overall response time relative to dynamic system. But, it is possible to validate static system, whereas there is no possibility of such validation in dynamic system. For this reason, most of the hard real time systems are static and soft real time system can be dynamic.
References
Liu, Jane W. S. Real Time Systems. Integre Technical Publishing Co., Inc, January 10, 2000. Print.
Lesson
Approaches to Real-Time Scheduling
Subject
Real Time System
Grade
IT
Recent Notes
No recent notes.
Related Notes
No related notes.