You are on page 1of 4

1. What is Aperiodic, Sporadic Job? Explain them shortly.

Give the distinct differences between


them and periodic jobs.
 Aperiodic job is a task or job that doesn’t have a regular or predictable time interval
between occurrences. It lacks a fixed schedule and may occur irregularly. Aperiodic
jobs are scheduled and executed only at times when there are no periodic and
sporadic jobs ready for execution. Aperiodic tasks have irregular arrival times and
either soft or hard deadlines.
 Sporadic job are tasks that occur occasionally or infrequently without a consistent
pattern. They do not follow a regular schedule and are triggered by certain
conditions, events, or external stimuli. Sporadic task are jobs with hard deadlines.
These jobs are executed to accomplish the mode change. Every task is characterized
by arrival time and deadline.
 The differences between them are: Aperiodic jobs are tasks that lack a fixed
schedule, occurring at irregular intervals without a predictable pattern. Sporadic
jobs, while also lacking a regular schedule, happen occasionally based on specific
triggers or conditions rather than following a consistent pattern. In contrast,
periodic jobs are characterized by tasks that occur at regular and fixed time
intervals, adhering to a predictable to a predictable schedule. Each concept plays a
distinct role in various fields, such as computing and task scheduling.

2. Fixed vs. Dynamic Priority Scheduling. EDF and LST are dynamic and RM (rate monotonic)
and DM (deadline monotonic) are not. Define RM and DM with simple examples.

 A fixed-priority algorithm assigns the same priority to all the jobs in each task.
other words, the priority of each periodic task is fixed relative to other tasks. In
contrast, a dynamic-priority algorithm assigns different priorities to the
individual jobs in each task. Hence the priority of the task with respect to that of
other tasks changes as jobs are released and completed.

1
Rate Monotonic (RM)

A well-known fixed priority algorithms is the rate monotonic algorithms. The algorithm assigns
priorities to task based on their periods as shorter period have higher priority. The rate (of job
release) of a task is inverse of periods that means higher rate gets higher priority.

For example: consider a system contains three tasks T1 (4, 1), T2 (5, 2) and T3 (20, 5) then Rate
for task T1 = ¼

Rate for task T2 = 1/5 Rate for task T3 = 1/ 20

So, the priority be assigned as T1>T2>T3

The schedule table be constructed as:

Time Ready to Run Scheduled


0 J11, J21, J31 J11
1 J21, J31 J21
3 J31 J31
4 J12, J31 J12
5 J22, J31 J22
7 J31 J31
8 J13, J31 J13
9 J31 J31
10 J23, J31 J23
12 J14, J31 J14
13 J31 J31
15 J24 J24
16 J15, J24 J15
17 J24 J24

The required schedule be constructed as:

2
Deadline Monotonic (DM)

This algorithm assigns priorities to tasks according to their relative deadlines as the shorter
deadline gets higher priority. When the relative deadlines are arbitrary, DM algorithms performs
better in the sense that it can sometimes produce the feasible schedule if RM algorithms fails that
means RM algorithms always fails if DM algorithms fails.

For example: consider three tasks

• T1 (50, 50, 25, 100)


• T2 (0, 62.5, 10, 20)
• T3 (0, 125, 25, 50)

According to DM priority be assigned as T2> T3 >T1 The schedule table be constructed as:

Time Ready to Run Scheduled


0 J21, J31 J21
10 J31 J31
35 ----------- -----------
50 J11 J11
62.5 J22, J11 J22
72.5 J11 J11
85 ------------ ----------
100 J12 J12
125 J23, J32 J23
135 J32 J32
150 J32, J13 J32
160 J13 J13
185 -------------- ----------
187.5 J24 J24
197.5 ------------- ------------

3
200 J14 J14
225 ---------------- ------------
250 J15, J25, J33 J25

Corresponding Schedule be constructed as:

You might also like