SlideShare a Scribd company logo
1 of 54
Download to read offline
Resource Sharing in Real-Time
Uni/Multiprocessor Embedded Systems
Sara Afshar
sara.afshar@mdh.se
Stockhol
m
Umeå
Göteborg
Malmö
Västerås
Eskilstuna
About Me!
• BSc. in Electrical Engineering in Tabriz University
• Master in Intelligent Embedded Systems
• Mälardalen University, Västerås, Sweden
• Currently, PhD candidate (3rd year)
• Research topic:
Resource sharing in real-time multiprocessors
About MRTC!
Professors: 29
Senior researchers: 52
PhD Students: 76
Research Groups: 16
Reference: www.es.mdh.se
Outline
• Embedded systems
• Real-time systems
• Scheduling and timing analysis
• Resource sharing in uniprocessors
• Multiprocessors
• Open problems
Daily Computers
• A special-purpose computer
• Computers perform the functionality
Embedded Systems
A special-purpose computer that performs a few
dedicated functions, usually with very specific
requirements.
Real-Time Systems
Embedded systems:
– Specialized
– Efficient
But in many cases it is not enough. The system
has to react to the environment at the right time
instance.
Timing Requirements
Real-Time System
Non-Real-Time Systems
Real-Time Systems
The system does the right thing
The system does the right thing It is on-time
&
Example
Airbag example (a very classical example!)
time
Too early Too late
Collision
Real-Time ≠ Fast
Real-Time = Predictable
Hard vs. Soft Real-Time
Each program has a deadline which should not
be missed.
Hard Real-Time
– Missing the deadline cause catastrophe
– E.g., automotive, airplane, industrial control
Soft-Real-Time
– Can miss some deadlines
– E.g., TV, video streaming
Real-Time Tasks
• Program is written by means of different tasks
• On a single-core processor two tasks cannot execute
in parallel
– Some tasks are preempted in order that all tasks execute on time
– Scheduler is responsible to schedule tasks in a processor
sens
Task A
sens sens sens sens
sens sens sens sens sens
Real-Time Tasks
Periodic Tasks: repeat in periodic intervals
e.g., control loops, sensor reading, etc.
Execute Execute ExecuteSleeping Sleeping
𝑇𝑖 𝑇𝑖
Real-Time Tasks
Aperiodic Task: tasks may arrive at any point in
time
e.g., alarm tasks, emergency button, etc.
Execute
The task executes once
An interrupt
event occurs,
e.g., a button
is pushed!
Task may be
trigerred
again at some
point in time!
Real-Time Tasks
Sporadic Task: Similar to aperiodic tasks, however,
minimum time for task’s next activation is known
e.g., task handling keyboard input- minimum time
between pressing two keys known
Minimum inter arrival time = known
Execute𝑇𝑖
Execute
?
Scheduling
The process of deciding the execution order of real-
time tasks, depends of the priority of the task.
There are different mechanism to do that.
Task A misses its deadline Both deadlines are met
Scheduling algorithms
Scheduling algorithms
• Fixed Priority
– RM: smaller priod higher priority
– DM: smaller deadline higher priority
• Dynamic Priority
– EDF: earliest deadline first
Task Model
𝑎𝑖
𝐷𝑖
𝑓𝑖𝑇𝑖
• Arrival time (release time): 𝑎𝑖 = 1
• Execution time: 𝐶𝑖 = 3
• Finishing time: 𝑓𝑖 =7
• Deadline: 𝐷𝑖 = 7
• Period: 𝑇𝑖 = 8
• Response time: 𝑅𝑖 = 𝑓𝑖 − 𝑎𝑖 = 6
𝜏𝑖 𝜏𝑖 𝜏𝑖
Response Time Analysis
A A A A A
H H H H
Response Time of Task A
Ready
time of A
Finishing
time of A
W𝑅 𝐴 = 𝐶𝐴 + ∀𝑗∈ℎ𝑝(𝐴)
𝑊𝑅 𝐴
𝑇 𝑗
× 𝐶𝑗
Interference from higher
priority tasks
Worst-case response time
Resource Sharing
• Some tasks are independent
• Some tasks are aware of each other
– E.g., using a shared memory
– E.g., two tasks writing in a same buffer
Resource Sharing
• Tasks may use hardware/software components
such as a database, hard-drive, sensor etc.
PROBLEM
critical section = part of the task execution that access to a resource
• In real-time systems, semaphore-based locking
synchronization techniques handles mutually-
exclusive access to resources among tasks
– Every task that wants to use a resource first has to lock the resource,
use it and then unlock (release) the resource
Resource Sharing
critical section
Resource Sharing
• Tasks may experience delay due to resource
sharing
– E.g., the task that needs the same resource has to wait for the resource to
be released by other tasks
critical section
BLOCK
Resource Sharing
• Blocking can endanger system correctness
– Priority inversion: a high priority task (in this example task 1) is
forced to wait for a lower priority task (in this example task 2) for an
unbounded amount of time
http://www.idt.mdh.se/kurser/CDT315/index.php?choice=contents
critical section
high priority task already missed its
deadline due to extra waiting for
middle prio. task
Task 1: priority = Low
Task 2 priority = Middle
Task 3: priority = High
deadline
extra delay due to normal execution
of middle prio. task which can be
considerably long compared to
critical sections
high prio. task requests the same
resource which is not available and
is blocked
high prio. task arrives and
preempt the low priority task
middle prio. task
arrives and preempts
low priority task
low prio. task continues
middle prio. task finishes
low prio. task continues and
then releases th resource
Resource Sharing
• Blocking can endanger system correctness
– Priority inversion: high priority task is forced to wait for a lower
priority task for an unbounded amount of time
• Mars Pathfinder
– Landing on July 4, 1997
– Pathfinder experiences repeated resets after staring gathering of
meteorological data.
– Resets caused by timing overruns when using shared communication
buss- a classical case of priority inversion problem.
PIP
• Priority Inheritance Protocol (PIP)
– High priority task cannot be delayed by middle priority task
http://www.idt.mdh.se/kurser/CDT315/index.php?choice=contents
critical section
Task 1: priority = Low
Low priority task
inherits priotiy of
high priority task
Middle priority task arrives
prio. = Low prio. = High prio. = Low
Task 2 priority = Middle
Task 3: priority = High
Low priority task
gets back its own
priotiy
:high priority task meets its deadline
deadline
Synchronization Protocols
• PIP: priority inversion
• PCP: deadlock, chain blocking
• IPIP, IPCP, SRP: blocking only in the beginning
Ready time of A
• By enabling resource sharing, a blocking term is added to the worst-case
response time of a task
Response Time Analysis
A A A A A
H H H H
Response Time of Task A
Finishing time of A
L
W𝑅 𝐴 = 𝐶𝐴 + 𝐵𝐴 + ∀𝑗∈ℎ𝑝(𝐴)
𝑊𝑅 𝐴
𝑇 𝑗
× 𝐶𝑗
Blocking incurred to task A
Power Wall Problem
[Patterson & Hennessy]
Multiprocessors
• Integration of multiple processors on a chip
• Multiprocessors platforms have become
popular in the industry
– Power consumption
– Performance
Multiprocessors
• Integration of multiple processors on a chip
• Multiprocessors platforms have become
popular in the industry
– Power consumption
– Performance
• Migrating to multiprocessor technology
– Immature scheduling and synchronization techniques
– Over simplification
Multiprocessor Scheduling
• Partitioned scheduling:
– Tasks are fixed assigned to processors in design time
– Each processor has its own scheduler and ready queue
– Task migration among processors is not allowed in run-time
local ready queues
per-processor schedulers
processors
Multiprocessor Scheduling
• Global scheduling
– Only one scheduler and one ready queue
– Scheduler assign tasks to processors in run-time
– Task migration among processors is allowed
global ready queue
global scheduler
processors
Multiprocessor Scheduling
• Hybrid scheduling, semi-partitioned scheduling
– Combination of partitioned and global scheduling
• Most tasks are fixed assigned to processor in design time
• A few tasks can migrate among processors in run-time
– Benefits from advantages of both approaches
…
task partitions local ready queues
per-processor schedulers
…
…
processors
partitioned task
migrating task
Resource Sharing
critical section
L
M
H
P1
P2
• More complex problem in multiprocessors
– Remote Blocking is added besides local blocking
deadline
!:high priority task misses its deadline
Response Time Analysis
W𝑅𝑖 = 𝐶𝑖 + 𝐵𝑖 + ∀𝑗∈ℎ𝑝(𝑖)
𝑊𝑅 𝑖
𝑇 𝑗
× 𝐶𝑗
• Two type of blocking in multiprocessors:
– Local blocking
– Remote blocking
𝐵𝑖
𝐿
𝐵𝑖
𝑅
Synchronization Protocol
• Various synchronization protocols:
– MSRP: P-EDF
– M-BWI: G-EDF
– FMLP short: P/G-EDF
– MrsP: P-FP
– MPCP: P-RM
– FMLP long: P/G-EDF
– OMLP: P/G-EDF, P-FP
– MSOS: P-FP
Synchronization Protocol
• Queue type: access priority to the resource
– FIFO, LIFO, PR-Based, Hybrid
• Task behavior during waiting
– Spin-based, suspension-based
• Task priority changes
– Inherited, boosted
Synchronization Protocol
• These protocols proposed for global and
partitioned scheduling
• No protocol for hybrid (semi-partitioned)
scheduling
Our Contributions
4
Semi-Partitioned Scheduling
• Partitioned tasks: tasks that are fixed assigned to
processors and execute only on those processors, i.e.,
they fit (utilization-wise) on processors during
partitioning (𝜏1, … , 𝜏8)
• Migrating tasks: Task(s) that do(es) not fit on any
processor (𝜏9)
𝜏1
𝜏2
𝜏3
𝜏4
𝜏5
𝜏6
𝜏7
𝑃1 𝑃2 𝑃3
𝜏8
𝜏9
Semi-Partitioned Scheduling
• Migrating tasks split among processors which can
provide capacity remained from partitioning (𝜏9 splits
among processors 1 to 3)
𝜏1
𝜏2
𝜏3
𝜏4
𝜏5
𝜏6
𝜏7
𝑃1 𝑃2 𝑃3
𝜏8
𝜏9
Resource Sharing
• Variation in execution time of tasks
• May cause critical sections to happen at any point during
task execution
• In case of semi-partitioned scheduling, critical sections may
happen in any part of a split task and therefore on any
processor that the task is split over
cs1
P1 P2
cs2
P3
cs2
P1 P2
cs1
P3 P1 P2
cs1
P3
cs2
cs1
Case 1 Case 2 Case 3
Resource Sharing
• Therefore, in semi-partitioned scheduling,
existing synchronization protocols cannot be
used directly
cs1
P1 P2
cs2
P3
cs2
P1 P2
cs1
P3 P1 P2
cs1
P3
cs2
cs1
Case 1 Case 2 Case 3
Centralized Solution
• Critical sections migrate to marked processor
• Advantages:
– Centralize resource access
– Remote blocking on marked processor
• Disadvantages:
– Extra migration overhead
P1 P2
Rs

1
i

2
i
marked
processor

2
i 
2
i

2
i
P2
P1
migration overhead
non-split tasks
split task
Decentralized Solution
• Critical sections served where they occur
• Advantages:
– Decreased migration overhead
• Disadvantages:
– Introduced blocking to local tasks
– Increases remote blocking non-split tasks
split task
P1 P2
Rs

1
i

2
i

2
i 
2
i
P2
P1Rs

1
i 
1
i
Analysis
• Local blocking due to local resources
𝐵𝑖,1 = min{𝑛𝑖
𝐺
+ 1,
𝜌 𝑖<𝜌 𝑗
𝑇𝑖
𝑇𝑗
+ 1 𝑛𝑗
𝐿
(𝜏𝑖)} max
𝜌 𝑖<𝜌 𝑗
𝜋 𝑖,𝜋 𝑗∈𝑃 𝑘
𝑅 𝑙∈𝑅 𝑃 𝑘
𝐿
𝜌 𝑖≤𝑐𝑒𝑖𝑙(𝑅 𝑙)
{𝐶𝑠𝑗,𝑙}
𝑐𝑒𝑖𝑙 𝑅𝑙 = max{𝜌2 𝜏2 ∈ 𝜏𝑙,1}
Analysis
• Local blocking due to global resources
𝐵𝑖,2 =
∀𝜌 𝑗<𝜌𝑖
𝜏 𝑖,𝜏 𝑗 𝜖𝑃 𝑘
min{𝑛𝑖
𝐺
+ 1, (
𝑇𝑖
𝑇𝑗
+ 1)𝑛𝑗
𝐺
} max
𝑅 𝑞∈𝑅 𝑃 𝑘
𝐺
{𝐶𝑠𝑗,𝑞}
Analysis
• Remote blocking due to lower priority tasks
𝐵𝑖,3 =
∀𝑅 𝑞∈𝑅 𝑃 𝑘
𝐺
𝜏 𝑖 𝜖𝜏 𝑞,𝑘
𝑛𝑖,𝑞
𝐺
max
∀𝜌 𝑗<𝜌𝑖
𝜏 𝑗 𝜖𝜏 𝑞,𝑟
𝑘≠𝑟
{𝐶𝑠𝑗,𝑞 + 𝜌ℎ,𝑗 𝑅 𝑞
′
max
𝜏 𝑡∈𝑃𝑟
𝜌 𝑡>𝜌 𝑗
𝑅 𝑠∈𝑅 𝑟
𝐺
𝑠≠𝑞
{𝐶𝑠𝑡,𝑠}}
Analysis
• Remote blocking due to higher priority tasks
𝐵𝑖,4 =
∀𝑅 𝑞∈𝑅 𝑃 𝑘
𝐺
𝜏 𝑖 𝜖𝜏 𝑞,𝑘
∀𝜌 𝑗>𝜌 𝑖
𝜏 𝑗 𝜖𝜏 𝑞,𝑟
𝑘≠𝑟
𝑛𝑗,𝑞
𝐺
(
𝑇𝑖
𝑇𝑗
+ 1)(𝐶𝑠𝑗,𝑞 + 𝜌ℎ,𝑗 𝑅 𝑞
′ max
𝜏 𝑡∈𝑃𝑟
𝜌 𝑡>𝜌 𝑡𝑗
𝑅 𝑠∈𝑅 𝑟
𝐺
𝑠≠𝑞
{𝐶𝑠𝑡,𝑠})
Evaluation results
(a) Overhead = 0 µs
(b) Overhead = 140 µs
0,0
0,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
1,0
5 25 45 65 85 105 125 145 165 185 205
Schedulability
Critical Section Length (µs)
MLPS
NMLPS
0,0
0,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
1,0
5 25 45 65 85 105 125 145 165 185 205
Schedulability
Critical Section Length (µs)
MLPS
NMLPS
: centralized solution
: decentralized solution
: centralized solution
: decentralized solution
Details in Paper
“A Resource Sharing under Multiprocessor Semi-
Partitioned Scheduling.”
Sara Afshar, Farhang Nemati, Thomas Nolte. In proceedings of the
18th IEEE International Conference on Embedded and Real-Time
Computing Systems and Applications (RTCSA), 2012, August.
Open Problems
• Improving synchronization techniques
– Improving of analysis
– Improving of protocols
• Blocking aware partitioning
• Compositional scheduling
THANK YOU!
54

More Related Content

What's hot

Multi core-architecture
Multi core-architectureMulti core-architecture
Multi core-architecturePiyush Mittal
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory managementrprajat007
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time SystemsDeepak John
 
MULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULINGMULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULINGgarishma bhatia
 
Join ordering in fragment queries
Join ordering in fragment queriesJoin ordering in fragment queries
Join ordering in fragment queriesIfzalhussainkhan
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processingKamal Acharya
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process managementArnav Chowdhury
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And CorrectionRenu Kewalramani
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed systemSunita Sahu
 
Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocaltes31
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process ConceptsMukesh Chinta
 
Threads in Operating System | Multithreading | Interprocess Communication
Threads in Operating System | Multithreading | Interprocess CommunicationThreads in Operating System | Multithreading | Interprocess Communication
Threads in Operating System | Multithreading | Interprocess CommunicationShivam Mitra
 
Deadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbianDeadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbiansaad symbian
 

What's hot (20)

Multi core-architecture
Multi core-architectureMulti core-architecture
Multi core-architecture
 
message passing
 message passing message passing
message passing
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Branch prediction
Branch predictionBranch prediction
Branch prediction
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
Memory management
Memory managementMemory management
Memory management
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
File allocation methods (1)
File allocation methods (1)File allocation methods (1)
File allocation methods (1)
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
MULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULINGMULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULING
 
Memory management
Memory managementMemory management
Memory management
 
Join ordering in fragment queries
Join ordering in fragment queriesJoin ordering in fragment queries
Join ordering in fragment queries
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processing
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process management
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And Correction
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocal
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Threads in Operating System | Multithreading | Interprocess Communication
Threads in Operating System | Multithreading | Interprocess CommunicationThreads in Operating System | Multithreading | Interprocess Communication
Threads in Operating System | Multithreading | Interprocess Communication
 
Deadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbianDeadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbian
 

Viewers also liked

(Slides) Task scheduling algorithm for multicore processor system for minimiz...
(Slides) Task scheduling algorithm for multicore processor system for minimiz...(Slides) Task scheduling algorithm for multicore processor system for minimiz...
(Slides) Task scheduling algorithm for multicore processor system for minimiz...Naoki Shibata
 
TASK SCHEDULING ON ADAPTIVE MULTI-CORE
TASK SCHEDULING ON ADAPTIVE MULTI-CORETASK SCHEDULING ON ADAPTIVE MULTI-CORE
TASK SCHEDULING ON ADAPTIVE MULTI-COREHaris Muhammed
 
Partitioning CCGrid 2012
Partitioning CCGrid 2012Partitioning CCGrid 2012
Partitioning CCGrid 2012Weiwei Chen
 
C# Parallel programming
C# Parallel programmingC# Parallel programming
C# Parallel programmingUmeshwaran V
 
Scheduling for cloud systems with multi level data locality
Scheduling for cloud systems with multi level data localityScheduling for cloud systems with multi level data locality
Scheduling for cloud systems with multi level data localityknowdiff
 
Wait-free data structures on embedded multi-core systems
Wait-free data structures on embedded multi-core systemsWait-free data structures on embedded multi-core systems
Wait-free data structures on embedded multi-core systemsMenlo Systems GmbH
 
Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)
Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)
Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)Anne Nicolas
 
Python Programming Essentials - M16 - Control Flow Statements and Loops
Python Programming Essentials - M16 - Control Flow Statements and LoopsPython Programming Essentials - M16 - Control Flow Statements and Loops
Python Programming Essentials - M16 - Control Flow Statements and LoopsP3 InfoTech Solutions Pvt. Ltd.
 
6 multiprogramming & time sharing
6 multiprogramming & time sharing6 multiprogramming & time sharing
6 multiprogramming & time sharingmyrajendra
 
Introduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed ComputingIntroduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed ComputingSayed Chhattan Shah
 
Real time system in Multicore/Multiprocessor system
Real time system in Multicore/Multiprocessor systemReal time system in Multicore/Multiprocessor system
Real time system in Multicore/Multiprocessor systemMayank Garg
 
Python Programming Essentials - M18 - Modules and Packages
Python Programming Essentials - M18 - Modules and PackagesPython Programming Essentials - M18 - Modules and Packages
Python Programming Essentials - M18 - Modules and PackagesP3 InfoTech Solutions Pvt. Ltd.
 
10 Multicore 07
10 Multicore 0710 Multicore 07
10 Multicore 07timcrack
 
Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic conceptsStudent
 
Memory allocation for real time operating system
Memory allocation for real time operating systemMemory allocation for real time operating system
Memory allocation for real time operating systemAsma'a Lafi
 
Critical Chain Project Management
Critical Chain Project ManagementCritical Chain Project Management
Critical Chain Project ManagementFred Wiersma
 
Distributed & parallel system
Distributed & parallel systemDistributed & parallel system
Distributed & parallel systemManish Singh
 
Using Python Packages - An Overview
Using Python Packages - An OverviewUsing Python Packages - An Overview
Using Python Packages - An OverviewDaniel Hepper
 

Viewers also liked (20)

(Slides) Task scheduling algorithm for multicore processor system for minimiz...
(Slides) Task scheduling algorithm for multicore processor system for minimiz...(Slides) Task scheduling algorithm for multicore processor system for minimiz...
(Slides) Task scheduling algorithm for multicore processor system for minimiz...
 
TASK SCHEDULING ON ADAPTIVE MULTI-CORE
TASK SCHEDULING ON ADAPTIVE MULTI-CORETASK SCHEDULING ON ADAPTIVE MULTI-CORE
TASK SCHEDULING ON ADAPTIVE MULTI-CORE
 
Partitioning CCGrid 2012
Partitioning CCGrid 2012Partitioning CCGrid 2012
Partitioning CCGrid 2012
 
C# Parallel programming
C# Parallel programmingC# Parallel programming
C# Parallel programming
 
Scheduling for cloud systems with multi level data locality
Scheduling for cloud systems with multi level data localityScheduling for cloud systems with multi level data locality
Scheduling for cloud systems with multi level data locality
 
Wait-free data structures on embedded multi-core systems
Wait-free data structures on embedded multi-core systemsWait-free data structures on embedded multi-core systems
Wait-free data structures on embedded multi-core systems
 
Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)
Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)
Kernel Recipes 2016 - Understanding a Real-Time System (more than just a kernel)
 
Python Programming Essentials - M16 - Control Flow Statements and Loops
Python Programming Essentials - M16 - Control Flow Statements and LoopsPython Programming Essentials - M16 - Control Flow Statements and Loops
Python Programming Essentials - M16 - Control Flow Statements and Loops
 
6 multiprogramming & time sharing
6 multiprogramming & time sharing6 multiprogramming & time sharing
6 multiprogramming & time sharing
 
Introduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed ComputingIntroduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed Computing
 
Real time system in Multicore/Multiprocessor system
Real time system in Multicore/Multiprocessor systemReal time system in Multicore/Multiprocessor system
Real time system in Multicore/Multiprocessor system
 
Python Programming Essentials - M18 - Modules and Packages
Python Programming Essentials - M18 - Modules and PackagesPython Programming Essentials - M18 - Modules and Packages
Python Programming Essentials - M18 - Modules and Packages
 
10 Multicore 07
10 Multicore 0710 Multicore 07
10 Multicore 07
 
Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic concepts
 
Batch operating system
Batch operating system Batch operating system
Batch operating system
 
Memory allocation for real time operating system
Memory allocation for real time operating systemMemory allocation for real time operating system
Memory allocation for real time operating system
 
Critical Chain Project Management
Critical Chain Project ManagementCritical Chain Project Management
Critical Chain Project Management
 
Distributed & parallel system
Distributed & parallel systemDistributed & parallel system
Distributed & parallel system
 
Using Python Packages - An Overview
Using Python Packages - An OverviewUsing Python Packages - An Overview
Using Python Packages - An Overview
 
Multicore scheduling in automotive ECUs
Multicore scheduling in automotive ECUsMulticore scheduling in automotive ECUs
Multicore scheduling in automotive ECUs
 

Similar to Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems

Similar to Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems (20)

Planificacion
PlanificacionPlanificacion
Planificacion
 
ESC UNIT 3.ppt
ESC UNIT 3.pptESC UNIT 3.ppt
ESC UNIT 3.ppt
 
Hadoop scheduler
Hadoop schedulerHadoop scheduler
Hadoop scheduler
 
RTOS
RTOSRTOS
RTOS
 
multiprocessor real_ time scheduling.ppt
multiprocessor real_ time scheduling.pptmultiprocessor real_ time scheduling.ppt
multiprocessor real_ time scheduling.ppt
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptx
 
Operating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingOperating system 31 multiple processor scheduling
Operating system 31 multiple processor scheduling
 
Lecture1
Lecture1Lecture1
Lecture1
 
Os2
Os2Os2
Os2
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
 
cs1311lecture25wdl.ppt
cs1311lecture25wdl.pptcs1311lecture25wdl.ppt
cs1311lecture25wdl.ppt
 
Sceduling
ScedulingSceduling
Sceduling
 
Section05 scheduling
Section05 schedulingSection05 scheduling
Section05 scheduling
 
Real Time System
Real Time SystemReal Time System
Real Time System
 
Ch5 process synchronization
Ch5   process synchronizationCh5   process synchronization
Ch5 process synchronization
 
Operating system
Operating systemOperating system
Operating system
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
May14ProcessScheduling.ppt
May14ProcessScheduling.pptMay14ProcessScheduling.ppt
May14ProcessScheduling.ppt
 
pscheduling.ppt
pscheduling.pptpscheduling.ppt
pscheduling.ppt
 
UNIT II PPT.pptx
UNIT II PPT.pptxUNIT II PPT.pptx
UNIT II PPT.pptx
 

More from knowdiff

Ut talk feb 2017
Ut talk   feb 2017Ut talk   feb 2017
Ut talk feb 2017knowdiff
 
Ali khalili: Towards an Open Linked Data-based Infrastructure for Studying Sc...
Ali khalili: Towards an Open Linked Data-based Infrastructure for Studying Sc...Ali khalili: Towards an Open Linked Data-based Infrastructure for Studying Sc...
Ali khalili: Towards an Open Linked Data-based Infrastructure for Studying Sc...knowdiff
 
Amin Milani Fard: Directed Model Inference for Testing and Analysis of Web Ap...
Amin Milani Fard: Directed Model Inference for Testing and Analysis of Web Ap...Amin Milani Fard: Directed Model Inference for Testing and Analysis of Web Ap...
Amin Milani Fard: Directed Model Inference for Testing and Analysis of Web Ap...knowdiff
 
Knowledge based economy and power of crowd sourcing
Knowledge based economy and power of crowd sourcing Knowledge based economy and power of crowd sourcing
Knowledge based economy and power of crowd sourcing knowdiff
 
Amin tayyebi: Big Data and Land Use Change Science
Amin tayyebi: Big Data and Land Use Change ScienceAmin tayyebi: Big Data and Land Use Change Science
Amin tayyebi: Big Data and Land Use Change Scienceknowdiff
 
Mehdi Rezagholizadeh: Image Sensor Modeling: Color Measurement at Low Light L...
Mehdi Rezagholizadeh: Image Sensor Modeling: Color Measurement at Low Light L...Mehdi Rezagholizadeh: Image Sensor Modeling: Color Measurement at Low Light L...
Mehdi Rezagholizadeh: Image Sensor Modeling: Color Measurement at Low Light L...knowdiff
 
Seyed Mehdi mohaghegh: Modelling material use within the low carbon energy pa...
Seyed Mehdi mohaghegh: Modelling material use within the low carbon energy pa...Seyed Mehdi mohaghegh: Modelling material use within the low carbon energy pa...
Seyed Mehdi mohaghegh: Modelling material use within the low carbon energy pa...knowdiff
 
Narjess Afzaly: Model Your Problem with Graphs and Generate your objects
Narjess Afzaly: Model Your Problem with Graphs and Generate your objectsNarjess Afzaly: Model Your Problem with Graphs and Generate your objects
Narjess Afzaly: Model Your Problem with Graphs and Generate your objectsknowdiff
 
Computational methods applications in air pollution modeling (Dr. Yadghar)
Computational methods applications in air pollution modeling (Dr. Yadghar)Computational methods applications in air pollution modeling (Dr. Yadghar)
Computational methods applications in air pollution modeling (Dr. Yadghar)knowdiff
 
Somaz Kolahi : Functional Dependencies: Redundancy Analysis and Correcting Vi...
Somaz Kolahi : Functional Dependencies: Redundancy Analysis and Correcting Vi...Somaz Kolahi : Functional Dependencies: Redundancy Analysis and Correcting Vi...
Somaz Kolahi : Functional Dependencies: Redundancy Analysis and Correcting Vi...knowdiff
 
Uncalibrated Image-Based Robotic Visual Servoing (knowdiff.net)
Uncalibrated Image-Based Robotic Visual Servoing (knowdiff.net)Uncalibrated Image-Based Robotic Visual Servoing (knowdiff.net)
Uncalibrated Image-Based Robotic Visual Servoing (knowdiff.net)knowdiff
 
Knowdiff visiting lecturer 140 (Azad Shademan): Uncalibrated Image-Based Robo...
Knowdiff visiting lecturer 140 (Azad Shademan): Uncalibrated Image-Based Robo...Knowdiff visiting lecturer 140 (Azad Shademan): Uncalibrated Image-Based Robo...
Knowdiff visiting lecturer 140 (Azad Shademan): Uncalibrated Image-Based Robo...knowdiff
 
Mehran Shaghaghi: Quantum Mechanics Dilemmas
Mehran Shaghaghi: Quantum Mechanics DilemmasMehran Shaghaghi: Quantum Mechanics Dilemmas
Mehran Shaghaghi: Quantum Mechanics Dilemmasknowdiff
 
Hossein Taghavi : Codes on Graphs
Hossein Taghavi : Codes on GraphsHossein Taghavi : Codes on Graphs
Hossein Taghavi : Codes on Graphsknowdiff
 
Dr. Amir Nejat
Dr. Amir NejatDr. Amir Nejat
Dr. Amir Nejatknowdiff
 

More from knowdiff (16)

Ut talk feb 2017
Ut talk   feb 2017Ut talk   feb 2017
Ut talk feb 2017
 
Ali khalili: Towards an Open Linked Data-based Infrastructure for Studying Sc...
Ali khalili: Towards an Open Linked Data-based Infrastructure for Studying Sc...Ali khalili: Towards an Open Linked Data-based Infrastructure for Studying Sc...
Ali khalili: Towards an Open Linked Data-based Infrastructure for Studying Sc...
 
Amin Milani Fard: Directed Model Inference for Testing and Analysis of Web Ap...
Amin Milani Fard: Directed Model Inference for Testing and Analysis of Web Ap...Amin Milani Fard: Directed Model Inference for Testing and Analysis of Web Ap...
Amin Milani Fard: Directed Model Inference for Testing and Analysis of Web Ap...
 
Knowledge based economy and power of crowd sourcing
Knowledge based economy and power of crowd sourcing Knowledge based economy and power of crowd sourcing
Knowledge based economy and power of crowd sourcing
 
Amin tayyebi: Big Data and Land Use Change Science
Amin tayyebi: Big Data and Land Use Change ScienceAmin tayyebi: Big Data and Land Use Change Science
Amin tayyebi: Big Data and Land Use Change Science
 
Mehdi Rezagholizadeh: Image Sensor Modeling: Color Measurement at Low Light L...
Mehdi Rezagholizadeh: Image Sensor Modeling: Color Measurement at Low Light L...Mehdi Rezagholizadeh: Image Sensor Modeling: Color Measurement at Low Light L...
Mehdi Rezagholizadeh: Image Sensor Modeling: Color Measurement at Low Light L...
 
Seyed Mehdi mohaghegh: Modelling material use within the low carbon energy pa...
Seyed Mehdi mohaghegh: Modelling material use within the low carbon energy pa...Seyed Mehdi mohaghegh: Modelling material use within the low carbon energy pa...
Seyed Mehdi mohaghegh: Modelling material use within the low carbon energy pa...
 
Narjess Afzaly: Model Your Problem with Graphs and Generate your objects
Narjess Afzaly: Model Your Problem with Graphs and Generate your objectsNarjess Afzaly: Model Your Problem with Graphs and Generate your objects
Narjess Afzaly: Model Your Problem with Graphs and Generate your objects
 
Computational methods applications in air pollution modeling (Dr. Yadghar)
Computational methods applications in air pollution modeling (Dr. Yadghar)Computational methods applications in air pollution modeling (Dr. Yadghar)
Computational methods applications in air pollution modeling (Dr. Yadghar)
 
Somaz Kolahi : Functional Dependencies: Redundancy Analysis and Correcting Vi...
Somaz Kolahi : Functional Dependencies: Redundancy Analysis and Correcting Vi...Somaz Kolahi : Functional Dependencies: Redundancy Analysis and Correcting Vi...
Somaz Kolahi : Functional Dependencies: Redundancy Analysis and Correcting Vi...
 
Uncalibrated Image-Based Robotic Visual Servoing (knowdiff.net)
Uncalibrated Image-Based Robotic Visual Servoing (knowdiff.net)Uncalibrated Image-Based Robotic Visual Servoing (knowdiff.net)
Uncalibrated Image-Based Robotic Visual Servoing (knowdiff.net)
 
Knowdiff visiting lecturer 140 (Azad Shademan): Uncalibrated Image-Based Robo...
Knowdiff visiting lecturer 140 (Azad Shademan): Uncalibrated Image-Based Robo...Knowdiff visiting lecturer 140 (Azad Shademan): Uncalibrated Image-Based Robo...
Knowdiff visiting lecturer 140 (Azad Shademan): Uncalibrated Image-Based Robo...
 
Mehran Shaghaghi: Quantum Mechanics Dilemmas
Mehran Shaghaghi: Quantum Mechanics DilemmasMehran Shaghaghi: Quantum Mechanics Dilemmas
Mehran Shaghaghi: Quantum Mechanics Dilemmas
 
Hossein Taghavi : Codes on Graphs
Hossein Taghavi : Codes on GraphsHossein Taghavi : Codes on Graphs
Hossein Taghavi : Codes on Graphs
 
Dr. Amir Nejat
Dr. Amir NejatDr. Amir Nejat
Dr. Amir Nejat
 
Alborz
AlborzAlborz
Alborz
 

Recently uploaded

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 

Recently uploaded (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 

Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems

  • 1. Resource Sharing in Real-Time Uni/Multiprocessor Embedded Systems Sara Afshar sara.afshar@mdh.se
  • 2. Stockhol m Umeå Göteborg Malmö Västerås Eskilstuna About Me! • BSc. in Electrical Engineering in Tabriz University • Master in Intelligent Embedded Systems • Mälardalen University, Västerås, Sweden • Currently, PhD candidate (3rd year) • Research topic: Resource sharing in real-time multiprocessors
  • 3. About MRTC! Professors: 29 Senior researchers: 52 PhD Students: 76 Research Groups: 16 Reference: www.es.mdh.se
  • 4. Outline • Embedded systems • Real-time systems • Scheduling and timing analysis • Resource sharing in uniprocessors • Multiprocessors • Open problems
  • 5. Daily Computers • A special-purpose computer • Computers perform the functionality
  • 6. Embedded Systems A special-purpose computer that performs a few dedicated functions, usually with very specific requirements.
  • 7. Real-Time Systems Embedded systems: – Specialized – Efficient But in many cases it is not enough. The system has to react to the environment at the right time instance. Timing Requirements
  • 8. Real-Time System Non-Real-Time Systems Real-Time Systems The system does the right thing The system does the right thing It is on-time &
  • 9. Example Airbag example (a very classical example!) time Too early Too late Collision Real-Time ≠ Fast Real-Time = Predictable
  • 10. Hard vs. Soft Real-Time Each program has a deadline which should not be missed. Hard Real-Time – Missing the deadline cause catastrophe – E.g., automotive, airplane, industrial control Soft-Real-Time – Can miss some deadlines – E.g., TV, video streaming
  • 11. Real-Time Tasks • Program is written by means of different tasks • On a single-core processor two tasks cannot execute in parallel – Some tasks are preempted in order that all tasks execute on time – Scheduler is responsible to schedule tasks in a processor sens Task A sens sens sens sens sens sens sens sens sens
  • 12. Real-Time Tasks Periodic Tasks: repeat in periodic intervals e.g., control loops, sensor reading, etc. Execute Execute ExecuteSleeping Sleeping 𝑇𝑖 𝑇𝑖
  • 13. Real-Time Tasks Aperiodic Task: tasks may arrive at any point in time e.g., alarm tasks, emergency button, etc. Execute The task executes once An interrupt event occurs, e.g., a button is pushed! Task may be trigerred again at some point in time!
  • 14. Real-Time Tasks Sporadic Task: Similar to aperiodic tasks, however, minimum time for task’s next activation is known e.g., task handling keyboard input- minimum time between pressing two keys known Minimum inter arrival time = known Execute𝑇𝑖 Execute ?
  • 15. Scheduling The process of deciding the execution order of real- time tasks, depends of the priority of the task. There are different mechanism to do that. Task A misses its deadline Both deadlines are met
  • 17. Scheduling algorithms • Fixed Priority – RM: smaller priod higher priority – DM: smaller deadline higher priority • Dynamic Priority – EDF: earliest deadline first
  • 18. Task Model 𝑎𝑖 𝐷𝑖 𝑓𝑖𝑇𝑖 • Arrival time (release time): 𝑎𝑖 = 1 • Execution time: 𝐶𝑖 = 3 • Finishing time: 𝑓𝑖 =7 • Deadline: 𝐷𝑖 = 7 • Period: 𝑇𝑖 = 8 • Response time: 𝑅𝑖 = 𝑓𝑖 − 𝑎𝑖 = 6 𝜏𝑖 𝜏𝑖 𝜏𝑖
  • 19. Response Time Analysis A A A A A H H H H Response Time of Task A Ready time of A Finishing time of A W𝑅 𝐴 = 𝐶𝐴 + ∀𝑗∈ℎ𝑝(𝐴) 𝑊𝑅 𝐴 𝑇 𝑗 × 𝐶𝑗 Interference from higher priority tasks Worst-case response time
  • 20. Resource Sharing • Some tasks are independent • Some tasks are aware of each other – E.g., using a shared memory – E.g., two tasks writing in a same buffer
  • 21. Resource Sharing • Tasks may use hardware/software components such as a database, hard-drive, sensor etc. PROBLEM critical section = part of the task execution that access to a resource
  • 22. • In real-time systems, semaphore-based locking synchronization techniques handles mutually- exclusive access to resources among tasks – Every task that wants to use a resource first has to lock the resource, use it and then unlock (release) the resource Resource Sharing critical section
  • 23. Resource Sharing • Tasks may experience delay due to resource sharing – E.g., the task that needs the same resource has to wait for the resource to be released by other tasks critical section BLOCK
  • 24. Resource Sharing • Blocking can endanger system correctness – Priority inversion: a high priority task (in this example task 1) is forced to wait for a lower priority task (in this example task 2) for an unbounded amount of time http://www.idt.mdh.se/kurser/CDT315/index.php?choice=contents critical section high priority task already missed its deadline due to extra waiting for middle prio. task Task 1: priority = Low Task 2 priority = Middle Task 3: priority = High deadline extra delay due to normal execution of middle prio. task which can be considerably long compared to critical sections high prio. task requests the same resource which is not available and is blocked high prio. task arrives and preempt the low priority task middle prio. task arrives and preempts low priority task low prio. task continues middle prio. task finishes low prio. task continues and then releases th resource
  • 25. Resource Sharing • Blocking can endanger system correctness – Priority inversion: high priority task is forced to wait for a lower priority task for an unbounded amount of time • Mars Pathfinder – Landing on July 4, 1997 – Pathfinder experiences repeated resets after staring gathering of meteorological data. – Resets caused by timing overruns when using shared communication buss- a classical case of priority inversion problem.
  • 26. PIP • Priority Inheritance Protocol (PIP) – High priority task cannot be delayed by middle priority task http://www.idt.mdh.se/kurser/CDT315/index.php?choice=contents critical section Task 1: priority = Low Low priority task inherits priotiy of high priority task Middle priority task arrives prio. = Low prio. = High prio. = Low Task 2 priority = Middle Task 3: priority = High Low priority task gets back its own priotiy :high priority task meets its deadline deadline
  • 27. Synchronization Protocols • PIP: priority inversion • PCP: deadlock, chain blocking • IPIP, IPCP, SRP: blocking only in the beginning
  • 28. Ready time of A • By enabling resource sharing, a blocking term is added to the worst-case response time of a task Response Time Analysis A A A A A H H H H Response Time of Task A Finishing time of A L W𝑅 𝐴 = 𝐶𝐴 + 𝐵𝐴 + ∀𝑗∈ℎ𝑝(𝐴) 𝑊𝑅 𝐴 𝑇 𝑗 × 𝐶𝑗 Blocking incurred to task A
  • 30. Multiprocessors • Integration of multiple processors on a chip • Multiprocessors platforms have become popular in the industry – Power consumption – Performance
  • 31. Multiprocessors • Integration of multiple processors on a chip • Multiprocessors platforms have become popular in the industry – Power consumption – Performance • Migrating to multiprocessor technology – Immature scheduling and synchronization techniques – Over simplification
  • 32. Multiprocessor Scheduling • Partitioned scheduling: – Tasks are fixed assigned to processors in design time – Each processor has its own scheduler and ready queue – Task migration among processors is not allowed in run-time local ready queues per-processor schedulers processors
  • 33. Multiprocessor Scheduling • Global scheduling – Only one scheduler and one ready queue – Scheduler assign tasks to processors in run-time – Task migration among processors is allowed global ready queue global scheduler processors
  • 34. Multiprocessor Scheduling • Hybrid scheduling, semi-partitioned scheduling – Combination of partitioned and global scheduling • Most tasks are fixed assigned to processor in design time • A few tasks can migrate among processors in run-time – Benefits from advantages of both approaches … task partitions local ready queues per-processor schedulers … … processors partitioned task migrating task
  • 35. Resource Sharing critical section L M H P1 P2 • More complex problem in multiprocessors – Remote Blocking is added besides local blocking deadline !:high priority task misses its deadline
  • 36. Response Time Analysis W𝑅𝑖 = 𝐶𝑖 + 𝐵𝑖 + ∀𝑗∈ℎ𝑝(𝑖) 𝑊𝑅 𝑖 𝑇 𝑗 × 𝐶𝑗 • Two type of blocking in multiprocessors: – Local blocking – Remote blocking 𝐵𝑖 𝐿 𝐵𝑖 𝑅
  • 37. Synchronization Protocol • Various synchronization protocols: – MSRP: P-EDF – M-BWI: G-EDF – FMLP short: P/G-EDF – MrsP: P-FP – MPCP: P-RM – FMLP long: P/G-EDF – OMLP: P/G-EDF, P-FP – MSOS: P-FP
  • 38. Synchronization Protocol • Queue type: access priority to the resource – FIFO, LIFO, PR-Based, Hybrid • Task behavior during waiting – Spin-based, suspension-based • Task priority changes – Inherited, boosted
  • 39. Synchronization Protocol • These protocols proposed for global and partitioned scheduling • No protocol for hybrid (semi-partitioned) scheduling
  • 41. Semi-Partitioned Scheduling • Partitioned tasks: tasks that are fixed assigned to processors and execute only on those processors, i.e., they fit (utilization-wise) on processors during partitioning (𝜏1, … , 𝜏8) • Migrating tasks: Task(s) that do(es) not fit on any processor (𝜏9) 𝜏1 𝜏2 𝜏3 𝜏4 𝜏5 𝜏6 𝜏7 𝑃1 𝑃2 𝑃3 𝜏8 𝜏9
  • 42. Semi-Partitioned Scheduling • Migrating tasks split among processors which can provide capacity remained from partitioning (𝜏9 splits among processors 1 to 3) 𝜏1 𝜏2 𝜏3 𝜏4 𝜏5 𝜏6 𝜏7 𝑃1 𝑃2 𝑃3 𝜏8 𝜏9
  • 43. Resource Sharing • Variation in execution time of tasks • May cause critical sections to happen at any point during task execution • In case of semi-partitioned scheduling, critical sections may happen in any part of a split task and therefore on any processor that the task is split over cs1 P1 P2 cs2 P3 cs2 P1 P2 cs1 P3 P1 P2 cs1 P3 cs2 cs1 Case 1 Case 2 Case 3
  • 44. Resource Sharing • Therefore, in semi-partitioned scheduling, existing synchronization protocols cannot be used directly cs1 P1 P2 cs2 P3 cs2 P1 P2 cs1 P3 P1 P2 cs1 P3 cs2 cs1 Case 1 Case 2 Case 3
  • 45. Centralized Solution • Critical sections migrate to marked processor • Advantages: – Centralize resource access – Remote blocking on marked processor • Disadvantages: – Extra migration overhead P1 P2 Rs  1 i  2 i marked processor  2 i  2 i  2 i P2 P1 migration overhead non-split tasks split task
  • 46. Decentralized Solution • Critical sections served where they occur • Advantages: – Decreased migration overhead • Disadvantages: – Introduced blocking to local tasks – Increases remote blocking non-split tasks split task P1 P2 Rs  1 i  2 i  2 i  2 i P2 P1Rs  1 i  1 i
  • 47. Analysis • Local blocking due to local resources 𝐵𝑖,1 = min{𝑛𝑖 𝐺 + 1, 𝜌 𝑖<𝜌 𝑗 𝑇𝑖 𝑇𝑗 + 1 𝑛𝑗 𝐿 (𝜏𝑖)} max 𝜌 𝑖<𝜌 𝑗 𝜋 𝑖,𝜋 𝑗∈𝑃 𝑘 𝑅 𝑙∈𝑅 𝑃 𝑘 𝐿 𝜌 𝑖≤𝑐𝑒𝑖𝑙(𝑅 𝑙) {𝐶𝑠𝑗,𝑙} 𝑐𝑒𝑖𝑙 𝑅𝑙 = max{𝜌2 𝜏2 ∈ 𝜏𝑙,1}
  • 48. Analysis • Local blocking due to global resources 𝐵𝑖,2 = ∀𝜌 𝑗<𝜌𝑖 𝜏 𝑖,𝜏 𝑗 𝜖𝑃 𝑘 min{𝑛𝑖 𝐺 + 1, ( 𝑇𝑖 𝑇𝑗 + 1)𝑛𝑗 𝐺 } max 𝑅 𝑞∈𝑅 𝑃 𝑘 𝐺 {𝐶𝑠𝑗,𝑞}
  • 49. Analysis • Remote blocking due to lower priority tasks 𝐵𝑖,3 = ∀𝑅 𝑞∈𝑅 𝑃 𝑘 𝐺 𝜏 𝑖 𝜖𝜏 𝑞,𝑘 𝑛𝑖,𝑞 𝐺 max ∀𝜌 𝑗<𝜌𝑖 𝜏 𝑗 𝜖𝜏 𝑞,𝑟 𝑘≠𝑟 {𝐶𝑠𝑗,𝑞 + 𝜌ℎ,𝑗 𝑅 𝑞 ′ max 𝜏 𝑡∈𝑃𝑟 𝜌 𝑡>𝜌 𝑗 𝑅 𝑠∈𝑅 𝑟 𝐺 𝑠≠𝑞 {𝐶𝑠𝑡,𝑠}}
  • 50. Analysis • Remote blocking due to higher priority tasks 𝐵𝑖,4 = ∀𝑅 𝑞∈𝑅 𝑃 𝑘 𝐺 𝜏 𝑖 𝜖𝜏 𝑞,𝑘 ∀𝜌 𝑗>𝜌 𝑖 𝜏 𝑗 𝜖𝜏 𝑞,𝑟 𝑘≠𝑟 𝑛𝑗,𝑞 𝐺 ( 𝑇𝑖 𝑇𝑗 + 1)(𝐶𝑠𝑗,𝑞 + 𝜌ℎ,𝑗 𝑅 𝑞 ′ max 𝜏 𝑡∈𝑃𝑟 𝜌 𝑡>𝜌 𝑡𝑗 𝑅 𝑠∈𝑅 𝑟 𝐺 𝑠≠𝑞 {𝐶𝑠𝑡,𝑠})
  • 51. Evaluation results (a) Overhead = 0 µs (b) Overhead = 140 µs 0,0 0,1 0,2 0,3 0,4 0,5 0,6 0,7 0,8 0,9 1,0 5 25 45 65 85 105 125 145 165 185 205 Schedulability Critical Section Length (µs) MLPS NMLPS 0,0 0,1 0,2 0,3 0,4 0,5 0,6 0,7 0,8 0,9 1,0 5 25 45 65 85 105 125 145 165 185 205 Schedulability Critical Section Length (µs) MLPS NMLPS : centralized solution : decentralized solution : centralized solution : decentralized solution
  • 52. Details in Paper “A Resource Sharing under Multiprocessor Semi- Partitioned Scheduling.” Sara Afshar, Farhang Nemati, Thomas Nolte. In proceedings of the 18th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications (RTCSA), 2012, August.
  • 53. Open Problems • Improving synchronization techniques – Improving of analysis – Improving of protocols • Blocking aware partitioning • Compositional scheduling