SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Downloaden Sie, um offline zu lesen
Slot Shifting
L J GOKUL VASAN
INTRODUCTION
• An algorithm that tries to give schedulable guarantee
for Event Based tasks within the periodic task-set that
is offline guaranteed.
• Event Based Tasks can be classified as
– Soft aperiodics
• tasks with no deadline
– Firm aperiodics
• tasks with deadlines but dl miss will not collapse system
– Hard aperiodics
• Task with deadlines but dl miss will collapse/cause fatal system
failure.
• Slot shifting can only support Soft and Firm aperiodics.
Overview on Working
• The Algorithm Works in 2 phases
1. Offline Phase
2. Online Phase
• Fundamentals of online Selection Function is
EDF.
• The Decision Function is based on uniform
time intervals called SLOTS.
1. OFFLINE PHASE
• Basic schedulable test is done on periodics .
• A layer of certainty is applied on periodics called Interval notated as I
defined with following terms.
 End(I) : deadline(Ji). i  all jobs with same deadline
 Est(I) : min ( est(Ji)). i  all jobs with same deadline
 Start(I): max( est(Ii), end(Ii-1))
 Length(I): | Ii |  End(Ii) – Start(Ii).
 SC(I) : | Ii | - ∑WCET(Ji) + min(SC(Ii+1),0) , Spare Capacity of the interval I
 So Basic record of interval looks like:
struct interval {
int id; /// unique ID for the interval
int start; /// start of interval
int end; ///end of interval
int sc; /// spare capacity of interval
list *jobs; /// list of jobs that belong to this interval
list *nxt; /// reference to next interval / NULL
};
1. OFFLINE PHASE
function create_new_interval()
input s, e: s is the start of interval
e is the end of interval
output i: i is the created new interval
i := allocate memory for new record of type struct interval
i.start := s;
i.end := e;
i.jobs := NULL;
i.nxt := NULL;
return i;
------------------------------------------------------------------------------------------
function get_first_job_dl()
input j: j is list of jobs
output j0: j0 is the 1st job in the list / NULL.
if(j) return j[0]; else return NULL;
-----------------------------------------------------------------------------------------
function get_rmv_1st _job()
input j: j is list of jobs
output j0 : j0 is the 1st job in list , removed from list / NULL
if(j)
j0 = get_first_job_dl(j);
remove_job(j, j0 ); /// removes job j0 from list j
return j0 ;
else return NULL;
----------------------------------------------------------------------------------------
function CreateInterval()
input T: T is schedulable periodic task-set
output t,I: t is list of jobs sorted based on dl.
I is list of intervals
st := sort jobs of task-set based on deadline.
t := st ///duplicate list of st on t
while(st) //CREATE INTERVAL
I.nxt = create_new_interval(0,0);
I.end = get_first_job_dl(st);
while(I.end == get_first_job_dl(st))
I.jobs.nxt = Get_rmve_1st_job(st);
est_i = min(I.jobs.est);
I.start = max( est_i, Ii-1.end);
I.sc = |I| - ∑ WCET(I.jobs) ;
while(I) //CREATE SC OF INTERVAL
I.sc = I.sc + min(Ii+1 .sc, 0);
I = I.nxt;
return t,I;
2. ONLINE PHASE
• Basic selection function is based on EDF on
Guaranteed ready list or FCFS on !Guaranteed list.
• Selection function also manages updating
intervals and its spare capacity.
• It checks Firm aperiodics arrival; if the presence is
detected then acceptance test is run and if it can
be guaranteed then guarantee algorithm is run.
• If Soft aperiodics arrives, then simply add the task
to not-guaranteed list and schedule them when
slot is empty after guaranteed EDF function.
2. ONLINE PHASE
Selection_function ( )
input tprev : tprev is the previous task that was scheduled.
output tnxt : tnxt is the next task to be scheduled.
/// 1.INTERVAL UPDATE
update_sc (tprev); /// update spare capacity of the current interval based on prev scheduled task.
I = Get_current_interval();
if(slot_count > I.end) /// check we are on end of interval, if so move to next interval
move_to_next_interval();
end if
/// 2.APERIODIC CHECK
If(aperiodic_task) ///check on aperiodics task
if(FIRM == aperiodic_task`.type)
acceptance_guarantee_algorithm(aperiodic_task); /// run acceptance and guarantee algorithm
else if(SOFT == aperiodic_task.type )
add_to_notGuaranteed_list(aperiodic_task);
` end if
///3.EDF
tnxt = get_nxt_guaranteed_ready_task(); /// EDF on ready list
if(!tnxt )
tnxt = get_nxt_notGuaranteed_ready_task(); ///FCFS on not guaranteed ready list
end if
return tnxt ;
2. ONLINE PHASE
function Update_till_positive()
Input I : I is the interval from where sc needs update in
backwards.
i_tmp = I;
do{
i_tmp.sc++;
i_tmp = get_prev_interval(i_tmp);
if(i_tmp == get_current_interval())
break;
end if
}while(i_tmp.sc < 0);
i_tmp.sc++;
function Update_sc()
input t: t is the job that got scheduled
I := get_current_interval();
while(I.job)
if(I.job == t) return;
I.job = I.job.nxt;
i_tmp = get_task_interval(t);
if(i_tmp .sc < 0)
update_till_positive(i_tmp);
end if
negate_sc(I);
2. ONLINE PHASE
FIRM APERIODIC ARRIVAL (JA): acceptance_guarantee_algorithm(JA)
• On Firm aperiodic arrival acceptance test needs to run on task to check whether it can
be admitted.
• To run the acceptance test we traverse through 3 kinds intervals and sum there SC.
1. SC(IC) : Spare capacity of current interval.
2. SC(Ii) . C < i <= l. end(Il) <= dl(JA)  end(Il+1) > dl(JA).
• All intervals that are between current and last interval.
3. Min[SC(Il+1), dl(JA) – start(Il+1) ]
• Required spare capacity in the last interval within dl(JA).
If( 1+2 +3 >= WCET(JA) ) then JA can be accepted i.e. return true.
• Simple snippet of acceptance guarantee Algorithm :
Acceptance_guarantee_algorithm(JA)
if(acceptance_test(JA))
guarantee_algorithm(JA);
else
move_to_notGuaranteed_list(JA);
2. ONLINE PHASE
TRADITIONAL GUARANTEE ALGORITHM:
Function Guarantee_algorithm(JA)
if(dl(JA) < end(Il+1))
split_interval(Il+1 , JA);
Ii = Il+1 ;
while(Ii != Ic )
sc(Ii) = | Ii | - ∑WCET(Ji) + min(SC(Ii+1),0);
Ii = get_prev_interval(Ii);
Complexity : O(N.t) where N is the number of intervals and t is the jobs in that intervals.
• Redoing what we did offline and traversing both vertically and horizontally in a list is very
cumbersome to implement.
• We tried to use this offline effort to recalculate online change in SC without having vertical
traversal. Giving us O(N) guarantee algorithm.

Weitere ähnliche Inhalte

Was ist angesagt?

Semaphores OS Basics
Semaphores OS BasicsSemaphores OS Basics
Semaphores OS BasicsShijin Raj P
 
Chapter 1 : Balagurusamy_ Programming ANsI in C
Chapter 1  :  Balagurusamy_ Programming ANsI in C Chapter 1  :  Balagurusamy_ Programming ANsI in C
Chapter 1 : Balagurusamy_ Programming ANsI in C BUBT
 
Reverse Engineering automation
Reverse Engineering automationReverse Engineering automation
Reverse Engineering automationPositive Hack Days
 
UVM: Basic Sequences
UVM: Basic SequencesUVM: Basic Sequences
UVM: Basic SequencesArrow Devices
 
Peterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionPeterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionBipul Chandra Kar
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process SynchronizationSonali Chauhan
 
Lecture 12 ME 176 6 Steady State Error
Lecture 12 ME 176 6 Steady State ErrorLecture 12 ME 176 6 Steady State Error
Lecture 12 ME 176 6 Steady State ErrorLeonides De Ocampo
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilogJITU MISTRY
 
System verilog assertions
System verilog assertionsSystem verilog assertions
System verilog assertionsHARINATH REDDY
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronizationvinay arora
 
Notes: Verilog Part 4- Behavioural Modelling
Notes: Verilog Part 4- Behavioural ModellingNotes: Verilog Part 4- Behavioural Modelling
Notes: Verilog Part 4- Behavioural ModellingJay Baxi
 
ITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded bufferITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded bufferSneh Prabha
 
Chapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationChapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationWayne Jones Jnr
 
Control Flow Analysis
Control Flow AnalysisControl Flow Analysis
Control Flow AnalysisEdgar Barbosa
 

Was ist angesagt? (20)

Semaphores OS Basics
Semaphores OS BasicsSemaphores OS Basics
Semaphores OS Basics
 
Chapter 1 : Balagurusamy_ Programming ANsI in C
Chapter 1  :  Balagurusamy_ Programming ANsI in C Chapter 1  :  Balagurusamy_ Programming ANsI in C
Chapter 1 : Balagurusamy_ Programming ANsI in C
 
Reverse Engineering automation
Reverse Engineering automationReverse Engineering automation
Reverse Engineering automation
 
UVM: Basic Sequences
UVM: Basic SequencesUVM: Basic Sequences
UVM: Basic Sequences
 
OS_Ch7
OS_Ch7OS_Ch7
OS_Ch7
 
Peterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionPeterson Critical Section Problem Solution
Peterson Critical Section Problem Solution
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronization
 
Lecture 12 ME 176 6 Steady State Error
Lecture 12 ME 176 6 Steady State ErrorLecture 12 ME 176 6 Steady State Error
Lecture 12 ME 176 6 Steady State Error
 
Operating system critical section
Operating system   critical sectionOperating system   critical section
Operating system critical section
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilog
 
System verilog assertions
System verilog assertionsSystem verilog assertions
System verilog assertions
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronization
 
Notes: Verilog Part 4- Behavioural Modelling
Notes: Verilog Part 4- Behavioural ModellingNotes: Verilog Part 4- Behavioural Modelling
Notes: Verilog Part 4- Behavioural Modelling
 
Appsec obfuscator reloaded
Appsec obfuscator reloadedAppsec obfuscator reloaded
Appsec obfuscator reloaded
 
ITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded bufferITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded buffer
 
Matlab isim link
Matlab isim linkMatlab isim link
Matlab isim link
 
UVM TUTORIAL;
UVM TUTORIAL;UVM TUTORIAL;
UVM TUTORIAL;
 
3 Function & Storage Class.pptx
3 Function & Storage Class.pptx3 Function & Storage Class.pptx
3 Function & Storage Class.pptx
 
Chapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationChapter 6 - Process Synchronization
Chapter 6 - Process Synchronization
 
Control Flow Analysis
Control Flow AnalysisControl Flow Analysis
Control Flow Analysis
 

Ähnlich wie Slot shifting1

Object oriented programming system with C++
Object oriented programming system with C++Object oriented programming system with C++
Object oriented programming system with C++msharshitha03s
 
Clock driven scheduling
Clock driven schedulingClock driven scheduling
Clock driven schedulingKamal Acharya
 
Algorithm analysis.pptx
Algorithm analysis.pptxAlgorithm analysis.pptx
Algorithm analysis.pptxDrBashirMSaad
 
The Art of Java Benchmarking
The Art of Java BenchmarkingThe Art of Java Benchmarking
The Art of Java BenchmarkingAzul Systems Inc.
 
NDC Sydney 2019 - Async Demystified -- Karel Zikmund
NDC Sydney 2019 - Async Demystified -- Karel ZikmundNDC Sydney 2019 - Async Demystified -- Karel Zikmund
NDC Sydney 2019 - Async Demystified -- Karel ZikmundKarel Zikmund
 
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel ZikmundKarel Zikmund
 
Timers in Unix/Linux
Timers in Unix/LinuxTimers in Unix/Linux
Timers in Unix/Linuxgeeksrik
 
PQTimer.java A simple driver program to run timing t.docx
  PQTimer.java     A simple driver program to run timing t.docx  PQTimer.java     A simple driver program to run timing t.docx
PQTimer.java A simple driver program to run timing t.docxjoyjonna282
 
Advanced patterns in asynchronous programming
Advanced patterns in asynchronous programmingAdvanced patterns in asynchronous programming
Advanced patterns in asynchronous programmingMichael Arenzon
 
Real Time most famous algorithms
Real Time most famous algorithmsReal Time most famous algorithms
Real Time most famous algorithmsAndrea Tino
 
9 11 25 14 44 6 41 15 57 9 39 16 41 2 58 8 43 12 4.docx
9 11 25 14 44 6 41 15 57 9 39 16 41 2 58 8 43 12 4.docx9 11 25 14 44 6 41 15 57 9 39 16 41 2 58 8 43 12 4.docx
9 11 25 14 44 6 41 15 57 9 39 16 41 2 58 8 43 12 4.docxransayo
 
Lecture 1_Functions in C.pptx
Lecture 1_Functions in C.pptxLecture 1_Functions in C.pptx
Lecture 1_Functions in C.pptxKhurramKhan173
 
TLA+ and PlusCal / An engineer's perspective
TLA+ and PlusCal / An engineer's perspectiveTLA+ and PlusCal / An engineer's perspective
TLA+ and PlusCal / An engineer's perspectiveTorao Takami
 
Unit II - LINEAR DATA STRUCTURES
Unit II -  LINEAR DATA STRUCTURESUnit II -  LINEAR DATA STRUCTURES
Unit II - LINEAR DATA STRUCTURESUsha Mahalingam
 

Ähnlich wie Slot shifting1 (20)

Object oriented programming system with C++
Object oriented programming system with C++Object oriented programming system with C++
Object oriented programming system with C++
 
Clock driven scheduling
Clock driven schedulingClock driven scheduling
Clock driven scheduling
 
Microkernel Development
Microkernel DevelopmentMicrokernel Development
Microkernel Development
 
CH05.pdf
CH05.pdfCH05.pdf
CH05.pdf
 
Algorithm analysis.pptx
Algorithm analysis.pptxAlgorithm analysis.pptx
Algorithm analysis.pptx
 
The Art of Java Benchmarking
The Art of Java BenchmarkingThe Art of Java Benchmarking
The Art of Java Benchmarking
 
NDC Sydney 2019 - Async Demystified -- Karel Zikmund
NDC Sydney 2019 - Async Demystified -- Karel ZikmundNDC Sydney 2019 - Async Demystified -- Karel Zikmund
NDC Sydney 2019 - Async Demystified -- Karel Zikmund
 
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
.NET Core Summer event 2019 in Brno, CZ - Async demystified -- Karel Zikmund
 
Timers in Unix/Linux
Timers in Unix/LinuxTimers in Unix/Linux
Timers in Unix/Linux
 
Os3
Os3Os3
Os3
 
Unit - 2.ppt
Unit - 2.pptUnit - 2.ppt
Unit - 2.ppt
 
PQTimer.java A simple driver program to run timing t.docx
  PQTimer.java     A simple driver program to run timing t.docx  PQTimer.java     A simple driver program to run timing t.docx
PQTimer.java A simple driver program to run timing t.docx
 
Advanced patterns in asynchronous programming
Advanced patterns in asynchronous programmingAdvanced patterns in asynchronous programming
Advanced patterns in asynchronous programming
 
Real Time most famous algorithms
Real Time most famous algorithmsReal Time most famous algorithms
Real Time most famous algorithms
 
9 11 25 14 44 6 41 15 57 9 39 16 41 2 58 8 43 12 4.docx
9 11 25 14 44 6 41 15 57 9 39 16 41 2 58 8 43 12 4.docx9 11 25 14 44 6 41 15 57 9 39 16 41 2 58 8 43 12 4.docx
9 11 25 14 44 6 41 15 57 9 39 16 41 2 58 8 43 12 4.docx
 
85ec7 session2 c++
85ec7 session2 c++85ec7 session2 c++
85ec7 session2 c++
 
Four elevator controller
Four elevator controllerFour elevator controller
Four elevator controller
 
Lecture 1_Functions in C.pptx
Lecture 1_Functions in C.pptxLecture 1_Functions in C.pptx
Lecture 1_Functions in C.pptx
 
TLA+ and PlusCal / An engineer's perspective
TLA+ and PlusCal / An engineer's perspectiveTLA+ and PlusCal / An engineer's perspective
TLA+ and PlusCal / An engineer's perspective
 
Unit II - LINEAR DATA STRUCTURES
Unit II -  LINEAR DATA STRUCTURESUnit II -  LINEAR DATA STRUCTURES
Unit II - LINEAR DATA STRUCTURES
 

Kürzlich hochgeladen

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Kürzlich hochgeladen (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

Slot shifting1

  • 1. Slot Shifting L J GOKUL VASAN
  • 2. INTRODUCTION • An algorithm that tries to give schedulable guarantee for Event Based tasks within the periodic task-set that is offline guaranteed. • Event Based Tasks can be classified as – Soft aperiodics • tasks with no deadline – Firm aperiodics • tasks with deadlines but dl miss will not collapse system – Hard aperiodics • Task with deadlines but dl miss will collapse/cause fatal system failure. • Slot shifting can only support Soft and Firm aperiodics.
  • 3. Overview on Working • The Algorithm Works in 2 phases 1. Offline Phase 2. Online Phase • Fundamentals of online Selection Function is EDF. • The Decision Function is based on uniform time intervals called SLOTS.
  • 4. 1. OFFLINE PHASE • Basic schedulable test is done on periodics . • A layer of certainty is applied on periodics called Interval notated as I defined with following terms.  End(I) : deadline(Ji). i  all jobs with same deadline  Est(I) : min ( est(Ji)). i  all jobs with same deadline  Start(I): max( est(Ii), end(Ii-1))  Length(I): | Ii |  End(Ii) – Start(Ii).  SC(I) : | Ii | - ∑WCET(Ji) + min(SC(Ii+1),0) , Spare Capacity of the interval I  So Basic record of interval looks like: struct interval { int id; /// unique ID for the interval int start; /// start of interval int end; ///end of interval int sc; /// spare capacity of interval list *jobs; /// list of jobs that belong to this interval list *nxt; /// reference to next interval / NULL };
  • 5. 1. OFFLINE PHASE function create_new_interval() input s, e: s is the start of interval e is the end of interval output i: i is the created new interval i := allocate memory for new record of type struct interval i.start := s; i.end := e; i.jobs := NULL; i.nxt := NULL; return i; ------------------------------------------------------------------------------------------ function get_first_job_dl() input j: j is list of jobs output j0: j0 is the 1st job in the list / NULL. if(j) return j[0]; else return NULL; ----------------------------------------------------------------------------------------- function get_rmv_1st _job() input j: j is list of jobs output j0 : j0 is the 1st job in list , removed from list / NULL if(j) j0 = get_first_job_dl(j); remove_job(j, j0 ); /// removes job j0 from list j return j0 ; else return NULL; ---------------------------------------------------------------------------------------- function CreateInterval() input T: T is schedulable periodic task-set output t,I: t is list of jobs sorted based on dl. I is list of intervals st := sort jobs of task-set based on deadline. t := st ///duplicate list of st on t while(st) //CREATE INTERVAL I.nxt = create_new_interval(0,0); I.end = get_first_job_dl(st); while(I.end == get_first_job_dl(st)) I.jobs.nxt = Get_rmve_1st_job(st); est_i = min(I.jobs.est); I.start = max( est_i, Ii-1.end); I.sc = |I| - ∑ WCET(I.jobs) ; while(I) //CREATE SC OF INTERVAL I.sc = I.sc + min(Ii+1 .sc, 0); I = I.nxt; return t,I;
  • 6. 2. ONLINE PHASE • Basic selection function is based on EDF on Guaranteed ready list or FCFS on !Guaranteed list. • Selection function also manages updating intervals and its spare capacity. • It checks Firm aperiodics arrival; if the presence is detected then acceptance test is run and if it can be guaranteed then guarantee algorithm is run. • If Soft aperiodics arrives, then simply add the task to not-guaranteed list and schedule them when slot is empty after guaranteed EDF function.
  • 7. 2. ONLINE PHASE Selection_function ( ) input tprev : tprev is the previous task that was scheduled. output tnxt : tnxt is the next task to be scheduled. /// 1.INTERVAL UPDATE update_sc (tprev); /// update spare capacity of the current interval based on prev scheduled task. I = Get_current_interval(); if(slot_count > I.end) /// check we are on end of interval, if so move to next interval move_to_next_interval(); end if /// 2.APERIODIC CHECK If(aperiodic_task) ///check on aperiodics task if(FIRM == aperiodic_task`.type) acceptance_guarantee_algorithm(aperiodic_task); /// run acceptance and guarantee algorithm else if(SOFT == aperiodic_task.type ) add_to_notGuaranteed_list(aperiodic_task); ` end if ///3.EDF tnxt = get_nxt_guaranteed_ready_task(); /// EDF on ready list if(!tnxt ) tnxt = get_nxt_notGuaranteed_ready_task(); ///FCFS on not guaranteed ready list end if return tnxt ;
  • 8. 2. ONLINE PHASE function Update_till_positive() Input I : I is the interval from where sc needs update in backwards. i_tmp = I; do{ i_tmp.sc++; i_tmp = get_prev_interval(i_tmp); if(i_tmp == get_current_interval()) break; end if }while(i_tmp.sc < 0); i_tmp.sc++; function Update_sc() input t: t is the job that got scheduled I := get_current_interval(); while(I.job) if(I.job == t) return; I.job = I.job.nxt; i_tmp = get_task_interval(t); if(i_tmp .sc < 0) update_till_positive(i_tmp); end if negate_sc(I);
  • 9. 2. ONLINE PHASE FIRM APERIODIC ARRIVAL (JA): acceptance_guarantee_algorithm(JA) • On Firm aperiodic arrival acceptance test needs to run on task to check whether it can be admitted. • To run the acceptance test we traverse through 3 kinds intervals and sum there SC. 1. SC(IC) : Spare capacity of current interval. 2. SC(Ii) . C < i <= l. end(Il) <= dl(JA)  end(Il+1) > dl(JA). • All intervals that are between current and last interval. 3. Min[SC(Il+1), dl(JA) – start(Il+1) ] • Required spare capacity in the last interval within dl(JA). If( 1+2 +3 >= WCET(JA) ) then JA can be accepted i.e. return true. • Simple snippet of acceptance guarantee Algorithm : Acceptance_guarantee_algorithm(JA) if(acceptance_test(JA)) guarantee_algorithm(JA); else move_to_notGuaranteed_list(JA);
  • 10. 2. ONLINE PHASE TRADITIONAL GUARANTEE ALGORITHM: Function Guarantee_algorithm(JA) if(dl(JA) < end(Il+1)) split_interval(Il+1 , JA); Ii = Il+1 ; while(Ii != Ic ) sc(Ii) = | Ii | - ∑WCET(Ji) + min(SC(Ii+1),0); Ii = get_prev_interval(Ii); Complexity : O(N.t) where N is the number of intervals and t is the jobs in that intervals. • Redoing what we did offline and traversing both vertically and horizontally in a list is very cumbersome to implement. • We tried to use this offline effort to recalculate online change in SC without having vertical traversal. Giving us O(N) guarantee algorithm.