Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Process Scheduling- Real Time Scheduling Csc8320(Fall 2013)

Similar presentations


Presentation on theme: "Distributed Process Scheduling- Real Time Scheduling Csc8320(Fall 2013)"— Presentation transcript:

1 Distributed Process Scheduling- Real Time Scheduling Csc8320(Fall 2013)

2 Outline Introduction Basic Scheduling Techniques Some papers

3 Real Time Systems ● Systems in which the correctness of the systems depends not only on the logical results but also on the time at which the results are produced ● Real-time tasks have more deterministic properties when compared to tasks in general computer systems. ● Characterized by deadline, release time and execution time ● Examples: Forest Fire, Traffic Control, Smart environment

4 Types of Real Time Systems Hard real time systems  Must always meet all deadlines  System fails if deadline window is missed Soft real time systems  Must try to meet all deadlines  Will execute if deadline is missed  System does not fail if a few deadlines are missed Firm real time systems  Result has no use outside deadline window  Tasks that fail are discarded

5 Real time tasks Periodic ● Each task is repeated at a regular interval ● Max execution time is the same each period ● Arrival time is usually the start of the period ● Deadline is usually the end ● Aperiodic ● Each task can arrive at any time

6 Real time scheduling algorithms Global scheme each occurrence of a real-time task may be executed on a different processor Partitioning scheme enforces that all occurrences of a particular task are executed on the same processor Partitioning schemes are less complex since the overhead of multiprocessor scheduling merely consists in assigning tasks to processors If the assignment of tasks to processors is completed, well-known uni-processor scheduling algorithms can be used for each processor.

7 Real-Time Scheduling Dynamic Computed at run-time based on tasks arrival Dynamic priorities are determined during run-time Static Done at compile time for all tasks Static scheduling assigns priorities prior to run-time

8 Some types of real-time scheduling: 1. Rate Monotonic Scheduling ● Simplest type of real time scheduling ● Tasks are periodic, with hard deadlines ● Tasks are logically independent tasks ● No communication or data sharing ● Tasks are scheduled according to priority and task priorities are fixed ● Computation time is known and constant

9 Contd.. ● Higher priorities usually assigned to tasks with smaller periods ● If T(h) PR(i), where T indicates the task and PR indicates the priority. Rate Monotonic Priority Assignment: Calculates the critical instant for each task. Occurs when task Ti and all higher priority tasks are scheduled simultaneously If tasks deadline scheduled at critical instant, then the task can always meet its deadline.

10 2. Deadline Monotonic Tasks with shorter deadlines get higher priority. If D(h) PR(i), where D indicates the deadline

11 3. Dynamic Scheduling Tasks are Aperiodic – Tasks arrive at unknown intervals due to an event Real time priorities vary during the system’s execution. Priorities are reevaluated when events such as task arrivals, events/signals causing preemption, or task completions occur

12 4. EDF: Earliest Deadline First Dynamic Scheduling Assume a preemptive system with dynamic priorities The task with the earliest absolute deadline executes first. If a tie between Hard/Soft real-time task, hard deadline runs first.

13 Real Time Synchronization Required when tasks are not independent and need to share information and synchronize If two tasks want to access the same data, semaphores are used to ensure non-simultaneous access Potential Issues  Priority Inversion – A situation in which a higher priority job is blocked by lower priority jobs for an indefinite period of time  Chain Blocking – A situation in which more than two resources are available and a high priority task is blocked off from both because of two or more lower priority tasks holding locks on one or both of the resources.

14 Priority Inheritance Protocol ● PIP eliminates priority inversion problem ● Increases the priority of a task to the maximum priority task waiting for the locked resource ● i.e. If a lower priority task T(k) has a lock on a resource required by a higher priority task T(h), then the priority of the lower task is increased to the priority of the higher task ● Once the lock is released the task resumes back its original priority

15 Priority Ceiling Protocol ● Each resource lock is assigned a priority ceiling, which is the priority equivalent to the highest priority task which may lock the resource. ● PCP eliminates chain blocking ● A task can acquire a lock on resource lock S only if no other task holds a lock on resource R. Thus higher priority tasks will not be blocked through both S and R ● If a high priority task is blocked through a resource, then the task holding that resource gets the priority of the high priority task. Once the resource is released, the priority is reset back to its original

16 Some works 2001 – Energy Efficient Real-Time Scheduling[2] ● Introduced Variable Voltage Processing ● Based on the Earliest Deadline First algorithm ● Algorithm: ● Considered historical processor utilization in order to adjust voltage on processor to meet real-time deadlines ● Called Slacked EDF ● Energy Savings of 53%

17 Some Works 2011 – Dynamic Voltage and Frequency Scaling for RT Scheduling on Prioritized SMT Processor[3] ● Introduced Task Migration across processors ● Utilized system heuristics to determine voltage and frequency ● Reduces power consumption up to 30%

18 Some Works 2011 – Global EDF-based Energy Efficient Real- Time Scheduling in Multicore Platforms[4] ● Most Real-time algorithms assume Worst Case Execution Time (WCET) ● Proposed Average Case with “Slack Time” ● Uses slacktime to adjust frequency of processor during off-peak usage ● Energy savings ~10%

19 Recent Work 2013 – Online Real-Time Task Scheduling in Heterogeneous Multicore System-on-a-Chip[5] online heterogeneous dual-core scheduling framework for dynamic workloads with real-time constraints Algorithm: Deadline Assignment: Each task i is assigned a processor density Si, and a bandwidth server size Ui. The deadlines of processor and co-processor subtasks are assigned by the density and the server size of the corresponding task, respectively The deadline assignment follows the concepts of bandwidth server. Scheduling Rule: Each task is accepted when it has passed admission control, and then each subtask of the task is assigned a local deadline by deadline assignment. Subtasks are scheduled with their local deadlines in the processor by a preemptively deadline-driven scheduler. Subtasks are scheduled by the corresponding bandwidth server on preemption points of the allocated co-processor.

20 References [1]Chow, Randy, et. al.,Distributed Operating Systems & Algorithms, Addison Wesley, March 18, 1997 [2]Sinha, A.; Chandrakasan, A.P., Energy Efficient real-time scheduling, 2001 [3]Fujii, K.; Chishiro, H.; Matsutani, H.; Yamasaki, N., Dynamic Voltage and Frequency Scaling for Real-time Scheduling on a Prioritized SMT Processor, 2011 [4]Zhang, D.; Chen, F.; Jin, S., Global EDF-based Online, Energy-efficient Real-time Scheduling in Multi-core Platform, 2011 [5] Ya-Shu Chen; Han Chiang Liao; Ting-Hao Tsai, "Online Real-Time Task Scheduling in Heterogeneous Multicore System-on-a-Chip," Parallel and Distributed Systems, IEEE Transactions on, vol.24, no.1, pp.118,130, Jan. 2013


Download ppt "Distributed Process Scheduling- Real Time Scheduling Csc8320(Fall 2013)"

Similar presentations


Ads by Google