7. Multimedia Operating System. Contents. 7.3 Resource Management. 7.4 Process Management. 7.2 Real Time Systems. 7.5 Prototype Systems. 7.

Size: px
Start display at page:

Download "7. Multimedia Operating System. Contents. 7.3 Resource Management. 7.4 Process Management. 7.2 Real Time Systems. 7.5 Prototype Systems. 7."

Transcription

1 Contents 7. Overview 7.2 Real Time Systems 7.3 Resource Management Dimensions in Resource Design Reservation Strategies 7.4 Process Management Classification of Real-Time Scheduling Strategies Schedulability Tests and Optimal Schedulers Preemptive vs. Non-Preemptive Task Scheduling 7.5 Prototype Systems Real-Time Mach YARTOS (Yet Another Real-Time Operating System) / 52

2 7. Overview 2 / 52 Operating System Aspects for Multimedia Processing: Most conventional operating systems do offer only little or no support for intime processing of continuous media. This concerns all functions of an operating system like process, memory, file or device management. Resource Management: How to achieve a coordinated processing of all operating system functions in order to achieve an end-to-end Quality of Service (delay, capacity, loss rate, jitter,...)? An abstract continuous resource model A common resource management procedure Process Management: How to schedule processes permitting each to terminate according to ist deadline? Rate-Monotonic Scheduling Earliest Deadline First

3 7. Overview / Resource Management Tasks. Admission control Is there enough remaining capacity to handle the additional data stream? 2. QoS calculation Which characteristics (e.g. in terms of throughput and delay) are available for the new stream? 3. Resource reservation Reserves the resources which are required to meet the deadlines. 4. QoS enforcement Provision of service guaranted by appropriate scheduling, e.g. by reordering (serving tasks with short deadline earlier to a task with less strict bounds). 3 / 52

4 7.2 Real Time Systems 4 / 52 Real Time: A real-time task is a process which delivers ist processing result in a given time or according to a given deadline. A deadline is given e.g. in the order of ms for interactive voice or video data or days for text documents. Deadline: A deadline represents the latest acceptable time for the presentation of the processing result of a task. Deadline are called hard if failures are mission-critical or threatening human beings. They are called soft deadlines if they cannot exactly be determined or a violation is less critical. Fields of application: Control systems for manufacturing processes, military systems, telecommunication systems, aircrafts, automobiles, nuclear power plants or interactive multimedia systems.

5 7.2 Real Time Systems 5 / 52 Processing Requirements: Predictable fast response to time-critical events, accurate timing information, high degree of schedulability, i.e. resource capacity is not wasted (clever scheduling; but finding optimal schedules is often a NP-complete task), and stability under transient overload, i.e. using buffering to cope with bursty systems. Aspects specific to Multimedia Systems: In-time processing, transmission and presentation of continuous media data like audio or video. Requirements are known as Quality of Service (QoS) parameters, e.g.: throughput local or global (i.e. end-to-end) delay, (delay) jitter, or reliability. These values are usually specified by giving an average value, a worst case value, peak rates, distribution function or moments of its distribution function.

6 7.2 Real Time Systems real-time systems soft real-time systems hard real-time systems high availabilty high integrity fail safe fail opeartion telephone switching on-line banking railway signaling flight control soft real-time system - consequences of a system failure are of the same magnitude as utility high availability - down-time is minimal high integrity - consitency of data must survive any system failure and malicious attempt to alter the data hard real-time system - consequences of failure are catastrophic fail-safe system - probability to detect any failure is close to - system can be stopped fail-operational system - minimal service even in case of failure - system cannot be stopped 6 / 52

7 Resource Requirements 7.3 Resource Management 7 / 52 Killer Application Interactive Video insufficient scarce High-Quality Audio Network File Access abundant Hardware Resources in Year x Even sophisticated compression techniques cannot compensate for the resource capacity necessary for audio and video transmission as well as processing in current (interactive) multimedia systems.

8 7.3 Resource Management / Dimensions in Resource Design Active vs. passive resources depending on its autonomous processing capabilities active resources: CPU, network adapter card, etc. passive resources: file system, main memory, etc. Shared vs. exclusive resource usage active resource are usually allocated exclusively whereas passive ones can be shared by multiple tasks Single vs. multiple resource occurences PCs usually contain only a single CPU whereas e.g. a SPARC 20 workstation contains two CPUs 8 / 52

9 7.3 Resource Management / Procedure Resources CPU 4. Reservation Resource Manager 2. Schedulability 3. QoS Calculation. Request by a new task.. I/O Assign Resources Queue 6. Add Task 5. Calculate Schedule Dispatcher 7. Schedule Task Steps to 5: preparing task processing Steps 6 to 8: task processing 9 / 52

10 7.3 Resource Management / Reservation Strategies 0 / 52 optimistic pessimistic principle detect and solve conflicts avoid conflicts base for schedulability test average test potentially high resource utilization overbooking possible maximum for peak rate load no overbooking timelines of processing no guarantee guarantee The airline example: Northwest risky, lots of overbooking, solve conflicts by finding a customers who leaves the aircraft ( by paying something in cash or -better- in voucher) Lufthansa very cautious airline (no overbooking, no-shows), low actual load, high prices

11 7.3 Resource Management / Abstract Continuous Media Modelling: Workload / 52 Resource Messages Messages Interfaces Data streams consist of periodically arriving Logical Data Units (called Messages) and are described by the Linear Bounded Arrival Process (LBAP) Model. A data stream is a tripel (M, R, B), where M is the maximum message size, R is the maximum message rate (i.e. the number of message per time unit), and B is the maximum burstiness or allowed workahead. The model is named linear bound arrival process because it assumes that the number of message arrivals N in a given time interval is bounded by N ( ) = R + B (R message arrivals in time units)

12 7.3 Resource Management / Abstract Continuous Media Modelling: Example Audio sampling: 44. khz 6 bit per sample (i.e. 6 x 4400 = bit/sec) R = 75 frames/sec a frame contains /75 = bit M = (here: frame message ) =ˆ Number N M of messages (of size M) in t time units is given by: N ( t ) = R R M M + B (if no variations due tu bursts) (if maximum burst size is B) 2 / 52

13 7.3 Resource Management / Abstract Continuous Media Modelling: Workahead w(t) a 3 a 4 a l(m ) a 2 l(m 2 ) l(m 3 ) l(m 4 ) t a i = actual arrival time The workahead w(t) of an LBAP at time t describes how many messages have arrived that are not processed yet. It is defined by w(t) = max {0, N( [t 0, t] ) - R t - t 0 }. The logical arrive time l(m i ) of message m i is the time at which a message is effectively being scheduled. It is defined by l(m i ) = a i + w(a i ) / R (= actual arrival time + delay due to workahead) l(m i+ ) = max {a i+, l(m i ) + / R} where a i is the actual arriving time of message m i. 3 / 52

14 7.3 Resource Management / Abstract Continuous Media Modelling: Resources minim. log. delay = U maxim. log. delay = D Resource Queue Server Messages Messages Interfaces The logical delay d(m) of messages m between two interfaces I and I2 is defined by d(m) = l2 (m) - l(m). The buffer requirements of resource for a given data stream are defined by buf = B + R(D-U) where: B = number of messages which arrive unexpectedly due to burstiness, D = maximum logical delay between input and output interfaces, U = minimum (unbuffered) actual delay between the same interfaces, and R(D-U) = number of msg. which may be build up due to the variation processing time 4 / 52

15 7.4 Process Management / Basics 5 / 52 Process Management deals with the assignment of the CPU to processes/tasks. A process may be in one of five basic states: initial, i.e. it is created, but not in schedule; process is idle ready, i.e. it is waiting for CPU assignment, running, i.e. it is running on the CPU, waiting, i.e. it is waiting for an external event, or in finished. The scheduler chooses the next process to become running according to a given schedule. The schedule determines the order of CPU assignment to processes. in re ru fi Goals of traditional scheduling optimal throughput, optimal resource utilization, or fair queueing Goals of real-time scheduling execute maximum number of processes in time, i.e. according to their deadlines minimize deadline violations

16 7.4 Process Management / Classification of Real-Time Scheduling Strategies Scheduling strategies can be distinguished by static vs. dynamic schedule calculation, (static = calculation of schedule in advance dynamic = re-calculation whenever a new task arrives) central vs. distributed schedule calculation, and preemptive vs. non-preemptive task processing (preemptive = a task may be interrupted by any task with higher priority) They schedule tasks with periodic or aperiodic processing requirements, and independent tasks or tasks with precedency constrains. They are applied to either uniprocessor systems, multiprocessor systems (neglecting communication delay), or multicomputer systems (taking communictaion delay into account). 6 / 52

17 7.4 Process Management / Schedulability Tests and Optimal Schedulers 7 / 52 The test to determine wether a schedule exists for a given task set is called a schedulability test. There are three kinds of test: sufficient, exact, and necessary ones: Sufficient tests, i.e. if the test is positive, the task set is schedulable. A negative result is possible even if the task set is schedulable ( cautious test). Necessary tests, i.e. if the test is negative, the task set is not schedulable. A positive result does not guarantee a task set s schedulability ( optimistic test). Exact tests return a positive result if the tasks set is schedulable. Most exact schedulability tests belong to the class of NP-complete problems. A scheduler is called optimal if it always finds a schedule for tasks sets satisfying an exact schedulability test.

18 7.4 Process Management / Model for Real-Time Tasks A task is characterized by ist timing constrains and its resource requirements. Most tasks in multimedia systems are periodic and have no precedence constraints. s i e i d i p i period period 2 period 3 period 4 Model for a tasks timing constraint: (s i, e i, d i, p i ) where: s i starting point, i.e. ready time for first period e i processing time for period p i d i deadline for period pi (relative to ist period s ready time) n e i p period of task T U = i = p i r rate of T (with p = r-) If a task set consisting of periodic tasks (T,..., T n ) is schedulable [T i = (s i, e i, d i, p i )] then the processor utilization is given by (where e i /p i = realtive processor utilization by task T i ) 8 / 52

19 7.4 Process Management / Preemptive vs. Non-Preemptive Task Scheduling There are tasks sets that have valid preemptive schedules but no non-preemptive ones. If the cost for preemption is neglected, preemptive scheduling is always better or equal than nonpreemptive scheduling. Deadlines d d 2 d a d b d c d d d e d f High-Rated Task T a b c d e f Low-Rated Task T 2 2 Non-Preemptive Schedule a b c d 2 e f Preemptive Schedule a b c d e f Deadline violation 9 / 52

20 7.4 Process Management / Rate Monotonic Algorithm (RM) - Basics 20 / 52 Classificaton static, preemptive algorithm for periodic tasks Assumptions all time-critical tasks have periodic computing demands tasks are mutually independent (i.e. no precedence constraints) a tasks deadline equals ist period (d i = p i ) a tasks maximum computing time is constant and a-priori known context switches are considered timeless preemption is assumed to come without Principles cost (at least without time cost) shortest period highest priority (i.e. tasks are ordered by decreasing period) priorities are recalculated if a new task is added to the task set or a task is deleted from the task set [schedule calculation only once for a given task set] RM is optimal among static scheduling algorithm, i.e. if a task set is schedulable by any static algorithm then there exists a feasible RM schedule.

21 7.4 Process Management / Rate Monotonic Algorithm - Example T receives priority over T 2 T preempts T 2 to meet ist deadlines Performance of RM depends on the arrival pattern: worst case ( critical instant ): every task with higher priority arrives at the same time instant Deadlines High-Rated Task T a b c d period of T 2 Low-Rated Task T 2 2 RM Schedule a b c 2 d preemption of T T is resumed (preemption would not have been necessary in this example in order to meet the deadlines) 2 / 52 period of T d a d b, d d c d d, d 2

22 7.4 Process Management / Earliest Deadline First (EDF) Classification dynamic (i.e. re-calculation whenever a new task arrives), preemptive algorithm for periodic tasks Principles earliest deadline <=> highest priority priorities are re-calculated each time a task becomes ready (even for an unchanged task set) calculation has worst case complexity of O(n 2 ) Deadlines d a d b, d d c d d, d 2 High-Rated Task T a b c d Low-Rated Task T 2 2 EDF Schedule a b c 2 d 22 / 52

23 7.4 Process Management / Comparison of EDF and RM RM schedules potentially require more context switches, i.e. more (and necessary) preemptions, than EDF. Deadlines d a d b, d d c d d, d 2 High-Rated Task T a b c d Low-Rated Task T 2 2 EDF Schedule a b c 2 d RM Schedule a b c 2 d The higher number of preemptions for RM has to be compared with the additional cost for EDF (due to recalculation of schedules). 23 / 52

24 7.4 Process Management / Comparison of EDF and RM 24 / 52 Deadlines Rate monotonic vs. EDF: processor utilization d A d B d d 2 d 3 d 4 d 5 d 6 d 7 d C High Rate Low Rate A B C EDF A 2 A 3 B 4 B 5 6 C 7 C 8 Rate Monotonic A 2 A 3 A B 4 B 6 C 7 B 5 C 8 C d A not met d C not met Deadline Violations EDF is better than RM: If RM can schedule a task set then the same is valid for EDF but not vice versa.

25 7.4 Process Management / Achievable Processor Utilization with RM 25 / 52 Minimum utilization for all sets of tasks (I,..., I n ) which are schedulable and which fully utilize the processor. A task set fully utilizes a processor if task set can be scheduled, and if a single task is increased in processing time by ε > 0 then the assignment becomes infeasible. Example: Given a task set (I, I 2, I 3 ) with period p i and processing time e i for each task: p = 3, e = ; p 2 = 4, e 2 = ; p 3 = 5, e 3 = It can be shown that in this case e p p 3 2 3,max = p 3 e 2 e = = 2 p p [x] = smallest integer x

26 7.4 Process Management / Achievable Processor Utilization with RM: Theorem A set of n independent and periodic tasks (T,..., T n ) can be scheduled if e p ( 2 ) 2 n n n e p 2 e p n For n this expression converges to ln 2 0,693 As a consequence: A lower bound for processor utilization is: ln 2 if RM is applied (lower and upper bound) if EDF is applied (and deadline = end of period) 26 / 52

27 7.4 Process Management / Achievable Processor Utilization with EDF 27 / 52 For EDF a much better (i.e. perfect) utilization is possible: e p e p 2 Mixed scheme: Suppose we have n periodic tasks. Priorities given according to RM are I, I 2,..., I n (I shortest period, I n = longest period), i.e. highest priority for task. e n p n Compromise: Schedule I, I 2,..., I k with RM ( k n) Schedule I k+, I k+2,..., I n with EDF when the processor is not occupied by I, I 2,..., I k

28 7.4 Process Management / Achievable Processor Utilization with EDF 28 / 52 A A 2 A 3 A 4 A 9 A 4 A B B 2 B 3 B 4 B 5 C C 2 C 3 A B C A 2 B 2 C 2 B 3 C 3 A 5 A 6 A 3 A 4 B 4 B 5 C 4 C A 7 8 B 6 A 8 C 5 3 A 9 4 B 7 5 occupation + + = C 6 A , i.e.3 out of B 8 A C 7 B 9 A 2 C 8 A 3 A B 4 C 9 A 3 6 A 8 B 5 B A 5 B 2 C 0 A 7 C B 4 A 9C 2 A 20 B 0 60 slots remain empty C C 2 C occupation + =, i.e.only out of 60 slots remain empty A C Á 2 A 3 A 4 B 3 A 5 B C B 2 C C C 3 B Task (p = 3, e = ) Task 2 (p 2 = 4, e 2 = ) Task 3 (p 3 = 5, e 3 = ) RM Task 3 with e 3 = 2 Mixed strategy

29 7.4 Process Management / Deadline Monotone Algorithm Shortest deadline first: static algorithm which gives higher priority to a task with shorter deadline, i.e. T > T 2 if d < d 2 If deadline = period RM algorithm. This is similar but not identical to EDF. 29 / 52

30 7.4 Process Management / Shortest (Remaining) Processing Time The task with shortest process time (if non-preemptive) shortest remaining time (if preemptive has highest priority. This strategy serves the maximum number of customers. In an overload situation and if all tasks have the same deadline then this strategy minimizes the number of deadline violations. 30 / 52

31 7.4 Process Management / Preemptive vs. Non-preemptive 3 / 52 Preemptive is more complicated but: increases the feasability of scheduling (in some cases a preemptive schedule exists but no non-preemptive schedule) reduces the amount of priority inversion (i.e. situations where lower priority jobs are executed while higher priority jobs are waiting). A task set with processing times e i and with request periods p i is schedulable if: e p e p i i i i ln 2 (if 0,693 (if priorities task priorities are fixed assigned) may be dynamically adjusted, e.g. by EDF strategy) In general the resulting schedule is a preemptive one.

32 7.4 Process Management / Preemptive vs. Non-preemptive 32 / 52 Schedulability for non-preemptive strategies is more complicated: Task I k can be scheduled (worst case consideration) if its deadline d k satisfies the following: n = + d j e j d k e k + max e i + e j + i k (*) j k p j here I n is the highest priority task I is the lowest priority task (*) = own execution time (**) = waiting time due to job found in service at arrival time (worst case: maximum execution time of all jobs of other priority classes) (***) = execution time of all jobs of higher priority which are present at arrival time or which arrive during the waiting time (**) (***) job of priority k arrives my service time higher prio jobs arrive and are served x Requiremen t : d k! x

33 7.4 Process Management / Example for Achievable Processor Utilization Given a task set (I, I 2, I 3 ) with period p i and processing time e i for each task: p = 3, e = ; p 2 = 4, e 2 = ; p 3 = 5, e 3,max = 2 Utilization (mixedscheme) Utilization (RM) Utilization(EDF) = = 2, ,983 0,783 = 98% 78% 00% when I scheduled with RM, I 2 and I 3 scheduled with EDF increasing e * 3 to e 3 = Conjecture: Mixed scheme is nearer to the better side (namely EDF) than to the poor side (namely RM). 33 / 52

34 7.4 Process Management / Achievable Processor Utilization (here RM) Task I I I I I Task I 2 I 2 I 2 I 2 Task I 3 I 3 I 3 RM schedule I I 2 I 3 I I 2 I 3 I I 2 t Utilization: U actual = e p = + + = 0,783 e p 2 e p % The actual utilization is slightly better than the theoretical minimum: U theorem = 3 (2 3 ) = 0,78 34 / 52

35 7.4 Process Management / Least Laxity First (LLF) 35 / 52 Task with shortest remaining Laxity is scheduled first. Definition: laxity l k (t) of task T in period k at time t The remaining time from t to the deadline d of task T in period k that is not used for processing task T. l k (t) = (s + (k-) p + d) - (t + e rem (t)) = (Deadline in period k) - (actual time + remaining processing time)

36 7.4 Process Management / Least Laxity First (LLF) l k (t ) e rem (t) l k (t 2 ) e Deadline in period k s + k p s s + (k-)p t t period k t 2 s + (k-) p+d LLF has no advantage over the EDF for uniprocessor systems. If tasks have similar laxity values context switches can occur frequently (calculation overhaead compared to EDF). LLf might be suitable only in multiprocessor systems, i.e. when several resources are scheduled simultaneously. 36 / 52

37 7.4 Process Management / Least Laxity First - Example for Two Tasks 37 / 52 Given a minimum CPU time granularity of 2 if no granularity assumed task preemption as often as possible processor sharing Task I Task I 2 LLF Schedule I I 2 I I 2 I I 2 I t L 2 (I ) = 20 L 2 (I 2 ) = 4 I 2 interrupts I L 8 (I ) = 4 L 8 (I 2 ) = 4 I interrupts I 2 L 0 (I ) = 4... L 0 (I 2 ) = 2 I 2 interrupts I I 2 finished I finished Laxities do not change during execution time of a task but become smaller when a task is not served. If the laxity of a waiting task becomes smaller than that of the running task then the running task is interrupted.

38 7.4 Process Management / Scheduling Aperiodic (but Independent) Tasks 38 / 52 Multimedia applications consists of both periodic and aperiodic tasks, like most real-time systems. Period tasks are used for transport and processing of continuous media data whereas control or management tasks are aperiodic. Often it is reasonable to give to periodic tasks priority over aperiodic tasks. Problem: How to schedule a task set which is composed of periodic as well as aperiodic tasks? Idea: One special periodic task (called server) is polling for ready aperiodic tasks to be processed.

39 7.4 Process Management / Scheduling Aperiodic (but Independent) Tasks Problem: Aperiodic tasks can only be processed when server task is scheduled, i.e. they miss their deadline if it is earlier than the next time the server is scheduled. Solution: So-called bandwidth preserving algorithm like Priority Exchange, Deferrable Server, or Sporadic Server. 39 / 52

40 7.4 Process Management / Bandwidth Preserving Algorithms Priority Exchange: One periodic task T s serves all aperiodic tasks. The server exchanges priority with a lower prior periodic task T i if no aperiodic task is ready. The server receive its initial priority for the next period. Case : T s serves > 0 aperiodic tasks T T s T... T i... T n T T s T... T i... T n period k period k+ Case 2: T s has no task to serve, changes priority with T i time T i was scheduled. and is reactivated at the T T i T... T s... T n T T s T... T i... T n period k period k+ 40 / 52

41 7.4 Process Management / Bandwidth Preserving Algorithms Deferrable Server: One periodic task (called deferrable server) serves all aperiodic tasks. It defers its processing time if no aperiodic task is ready but retains ist priority. As soon as an aperiodic task request occurs, it either (immediatly) preempts the running tasks (that has a lower priority), or resumes processing after the current task terminates. aperiodic task arrival T T s T 2 T 3 T 4... T n nothing to serve Interrup T 4 or wait until T 4 is finished 4 / 52

42 7.4 Process Management / Bandwidth Preserving Algorithms Sporadic server: It combines the advantages of the Priority Exchange and the Deferrable Server algorithm. A sporadic server exchanges its priority when no aperiodic task is ready. Any spare CPU capacity, i.e. time not used by periodic tasks, is transformed into a ticket, that is given to a sporadic server, which then replenishes its initial priority. This way, the sporadic server is allowed to use any idle time of the CPU. 42 / 52

43 7.4 Process Management / Scheduling Tasks with Blocking 43 / 52 The blocking of a task is caused by mutual exclusion when trying to access a critical section currently occupied by another task. Priority Inversion Effect: Assume a high-priority task T h wants to enter a critical section currently occupied by a low-priority task T l. T h is blocked until T l leaves the critical section. Until then, not only T l but all medium-priority tasks T m having higher priority than T l and lower priority than T h will be processed prior to T h. This phenomenon is called priority inversion. Task T l Task T m Task T h processing unit(s) signal(s) critical section proc. blocked until The rule: A low priority task must wait, i.e. cannot begin execution, if a higher priority task is running.

44 7.4 Process Management / Scheduling Tasks with Critical Sections 44 / 52 Several algorithms have been developed in order to avoid priority inversion, e.g. Priority Inheritance, or the Ceiling Protocol. Priority Inheritance: A low-priority task T l inherits the priority of a high-priority task T h if it causes the blocking of T h. T l retains ist initial priority when leaving the critical section. Thus: Ready jobs between low and high are blocked. Disadvantage: Lower utilization of server, possible deadline violations. Advantage: Sequence of schedules is preserved.

45 7.4 Process Management / Scheduling Tasks with Critical Sections More Problems with standard priority inheritance: Tasks can be blocked in each critical section, deadlocks can occur, as well as transitive blocking is possible, i.e. T 3 is blocked by T 2 that is blocked by T Principle (ceiling protocol): Each task has two priorities: a static one assigned by the scheduler, e.g. according to RM strategy a dynamic one, i.e. the maximum of the static priority and the highest priority inherited 45 / 52

46 7.4 Process Management / Scheduling Tasks with Critical Sections Each semaphore has a maximum or ceiling priority value of all tasks that actually use it. A semaphore only can be locked by a task with a higher dynamic priority than any currently locked semaphore. (comparable to hierarchy of resources approach to deadlock avoidance) Benefits: A task is only blocked once, no deadlocks and transitive blocking. Price: Restrictive locking policy (brute force method) longer blocking delays for other tasks. 46 / 52

47 7.5 Prototype Systems / Real-Time Mach 47 / 52 It is a distributed operating system for real-time applications based on the ARTS (Advanced Real-Time System), both developed at Carnegie Mellon University at Pittsburgh, PA, USA. RT Mach: supports multi-processor clusters n processors into a processor set assigns a separate run queue and scheduling strategies to each processor set enables an application to select the current scheduling strategy (at run-time) processor processor set RT Mach kernel scheduler strategy run queue

48 7.5 Prototype Systems / Task Scheduling in RT Mach 48 / 52 RT Mach offers three classes of tasks (called RT Threads): periodic or aperiodic (sporadic) tasks with hard deadlines, or tasks with soft deadlines. Tasks are scheduled by one of the following strategies (dynamically changable): rate monotonic (RM), with deferrable server (RM/DS), or sporadic server (RM/SS), fixed priority (FP), as well as round robin (RR). Thread dispatching management controls idle threads and aperiodic server (DS or SS). Processor set management performs context switching, thread preemption, or processor assignment. Generic Scheduler Thread Dispatching Mgmt. Processor Set Mgmt. RM RM/DS RM/DS FP RR

49 7.5 Prototype Systems / The QoS Ticket Model The QoS Ticket Model combines resource reservation and adaptation. It has been implemented on RT-Mach 3.0 supproting so-called Q-Threads. QoS Manager 2. Calculation of Resource Allocation. QoS Request 4. Issue Ticket Multimedia Session QoS Ticket 5. Consumption Information 3. Resource Reservation RT Mach kernel Qos Ticket allows users to specify tolerance ranges for period and computation time. Ticket is issued for each session comprising several threads. QoS parameters are adapted dynamically based on the current resource consumption. 49 / 52

50 7.5 Prototype Systems / Comparison of RT-Threads and Q-Threads invocation time periodic RT-Thread Q-Thread user-defined entry point is called periodically thread attributes fixed invocation period ranges for period and computation time invocation period fixed (can be re-specified) dynamic, within range, based on QoS control policy guarantee of execution purpose none (possible with CPU reservation) guaranteed, within the available computation time real-time processing continuous-media processing 50 / 52

51 7.5 Prototype Systems / YARTOS (Yet Another Real-Time Operating System) Micro kernel implemented in C on IBM PS/2 (Intel processor) at University of North Carolina at Chapel Hill, NC, USA. YARTOS supports.tasks, i.e. independent threads of control invoked by repeatedly occuring events, and 2. resources which synchronize concurrent access to shared data. Its scheduler guarantee that. each task invocation completes processing before ist deadline, and 2. no shared resource is accessed simultaneously by more than one task. 5 / 52

52 7.5 Prototype Systems / YARTOS (Yet Another Real-Time Operating System) 52 / 52 It offers two separate notions of deadlines for tasks,. One for initial aquisition of the processor, and 2. One for execution of operations on resources (to avoid priority inversion). It performs on-line scheduling of sporadic tasks extending the Earliest Deadline First algorithm with synchronized access to shared resources on a uniprocessor system. YARTOS e.g. serves for a workstation-based audio and video conferencing system (over a 6 Mbit Token Ring LAN).

Multiprocessor and Real-Time Scheduling. Chapter 10

Multiprocessor and Real-Time Scheduling. Chapter 10 Multiprocessor and Real-Time Scheduling Chapter 10 1 Roadmap Multiprocessor Scheduling Real-Time Scheduling Linux Scheduling Unix SVR4 Scheduling Windows Scheduling Classifications of Multiprocessor Systems

More information

Exam Review TexPoint fonts used in EMF.

Exam Review TexPoint fonts used in EMF. Exam Review Generics Definitions: hard & soft real-time Task/message classification based on criticality and invocation behavior Why special performance measures for RTES? What s deadline and where is

More information

Multimedia Systems 2011/2012

Multimedia Systems 2011/2012 Multimedia Systems 2011/2012 System Architecture Prof. Dr. Paul Müller University of Kaiserslautern Department of Computer Science Integrated Communication Systems ICSY http://www.icsy.de Sitemap 2 Hardware

More information

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date:

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date: Subject Name: OPERATING SYSTEMS Subject Code: 10EC65 Prepared By: Kala H S and Remya R Department: ECE Date: Unit 7 SCHEDULING TOPICS TO BE COVERED Preliminaries Non-preemptive scheduling policies Preemptive

More information

Event-Driven Scheduling. (closely following Jane Liu s Book)

Event-Driven Scheduling. (closely following Jane Liu s Book) Event-Driven Scheduling (closely following Jane Liu s Book) Real-Time Systems, 2006 Event-Driven Systems, 1 Principles Assign priorities to Jobs At events, jobs are scheduled according to their priorities

More information

Concurrent activities in daily life. Real world exposed programs. Scheduling of programs. Tasks in engine system. Engine system

Concurrent activities in daily life. Real world exposed programs. Scheduling of programs. Tasks in engine system. Engine system Real world exposed programs Programs written to interact with the real world, outside the computer Programs handle input and output of data in pace matching the real world processes Necessitates ability

More information

Overview of Scheduling a Mix of Periodic and Aperiodic Tasks

Overview of Scheduling a Mix of Periodic and Aperiodic Tasks Overview of Scheduling a Mix of Periodic and Aperiodic Tasks Minsoo Ryu Department of Computer Science and Engineering 2 Naive approach Background scheduling Algorithms Under static priority policy (RM)

More information

Multimedia-Systems. Operating Systems. Prof. Dr.-Ing. Ralf Steinmetz Prof. Dr. rer. nat. Max Mühlhäuser Prof. Dr.-Ing. Wolfgang Effelsberg

Multimedia-Systems. Operating Systems. Prof. Dr.-Ing. Ralf Steinmetz Prof. Dr. rer. nat. Max Mühlhäuser Prof. Dr.-Ing. Wolfgang Effelsberg Multimedia-Systems Operating Systems Prof. Dr.-Ing. Ralf Steinmetz Prof. Dr. rer. nat. Max Mühlhäuser Prof. Dr.-Ing. Wolfgang Effelsberg WE: University of Mannheim, Dept. of Computer Science Praktische

More information

CS4514 Real Time Scheduling

CS4514 Real Time Scheduling CS4514 Real Time Scheduling Jose M. Garrido Fall 2015 Department of Computer Science 1 Periodic Tasks Typical real-time application has many tasks that need to be executed periodically Reading sensor data

More information

Multiprocessor and Real- Time Scheduling. Chapter 10

Multiprocessor and Real- Time Scheduling. Chapter 10 Multiprocessor and Real- Time Scheduling Chapter 10 Classifications of Multiprocessor Loosely coupled multiprocessor each processor has its own memory and I/O channels Functionally specialized processors

More information

ECE519 Advanced Operating Systems

ECE519 Advanced Operating Systems IT 540 Operating Systems ECE519 Advanced Operating Systems Prof. Dr. Hasan Hüseyin BALIK (10 th Week) (Advanced) Operating Systems 10. Multiprocessor, Multicore and Real-Time Scheduling 10. Outline Multiprocessor

More information

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling Uniprocessor Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Three level scheduling 2 1 Types of Scheduling 3 Long- and Medium-Term Schedulers Long-term scheduler Determines which programs

More information

Implementing Sporadic Servers in Ada

Implementing Sporadic Servers in Ada Technical Report CMU/SEI-90-TR-6 ESD-90-TR-207 Implementing Sporadic Servers in Ada Brinkley Sprunt Lui Sha May 1990 Technical Report CMU/SEI-90-TR-6 ESD-90-TR-207 May 1990 Implementing Sporadic Servers

More information

Scheduling Sporadic and Aperiodic Events in a Hard Real-Time System

Scheduling Sporadic and Aperiodic Events in a Hard Real-Time System Technical Report CMU/SEI-89-TR-11 ESD-TR-89-19 Scheduling Sporadic and Aperiodic Events in a Hard Real-Time System Brinkley Sprunt Lui Sha John Lehoczky April 1989 Technical Report CMU/SEI-89-TR-11 ESD-TR-89-19

More information

Introduction to Real-Time Systems ECE 397-1

Introduction to Real-Time Systems ECE 397-1 Introduction to Real-Time Systems ECE 97-1 Northwestern University Department of Computer Science Department of Electrical and Computer Engineering Teachers: Robert Dick Peter Dinda Office: L477 Tech 8,

More information

Analyzing Real-Time Systems

Analyzing Real-Time Systems Analyzing Real-Time Systems Reference: Burns and Wellings, Real-Time Systems and Programming Languages 17-654/17-754: Analysis of Software Artifacts Jonathan Aldrich Real-Time Systems Definition Any system

More information

OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!! ANALYZE!!!

OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!! ANALYZE!!! OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!! Processor Management Memory Management IO Management File Management Multiprogramming Protection and Security Network Management UNDERSTAND!!! IMPLEMENT!!!

More information

Chapter -5 QUALITY OF SERVICE (QOS) PLATFORM DESIGN FOR REAL TIME MULTIMEDIA APPLICATIONS

Chapter -5 QUALITY OF SERVICE (QOS) PLATFORM DESIGN FOR REAL TIME MULTIMEDIA APPLICATIONS Chapter -5 QUALITY OF SERVICE (QOS) PLATFORM DESIGN FOR REAL TIME MULTIMEDIA APPLICATIONS Chapter 5 QUALITY OF SERVICE (QOS) PLATFORM DESIGN FOR REAL TIME MULTIMEDIA APPLICATIONS 5.1 Introduction For successful

More information

Microkernel/OS and Real-Time Scheduling

Microkernel/OS and Real-Time Scheduling Chapter 12 Microkernel/OS and Real-Time Scheduling Hongwei Zhang http://www.cs.wayne.edu/~hzhang/ Ack.: this lecture is prepared in part based on slides of Lee, Sangiovanni-Vincentelli, Seshia. Outline

More information

Simplified design flow for embedded systems

Simplified design flow for embedded systems Simplified design flow for embedded systems 2005/12/02-1- Reuse of standard software components Knowledge from previous designs to be made available in the form of intellectual property (IP, for SW & HW).

More information

Reference Model and Scheduling Policies for Real-Time Systems

Reference Model and Scheduling Policies for Real-Time Systems ESG Seminar p.1/42 Reference Model and Scheduling Policies for Real-Time Systems Mayank Agarwal and Ankit Mathur Dept. of Computer Science and Engineering, Indian Institute of Technology Delhi ESG Seminar

More information

3. Quality of Service

3. Quality of Service 3. Quality of Service Usage Applications Learning & Teaching Design User Interfaces Services Content Process ing Security... Documents Synchronization Group Communi cations Systems Databases Programming

More information

Practice Exercises 305

Practice Exercises 305 Practice Exercises 305 The FCFS algorithm is nonpreemptive; the RR algorithm is preemptive. The SJF and priority algorithms may be either preemptive or nonpreemptive. Multilevel queue algorithms allow

More information

Copyright Notice. COMP9242 Advanced Operating Systems S2/2014 Week 9: Real-Time Systems. Real-Time System: Definition

Copyright Notice. COMP9242 Advanced Operating Systems S2/2014 Week 9: Real-Time Systems. Real-Time System: Definition Copyright Notice These slides are distributed under the Creative Commons Attribution.0 License COMP94 Advanced Operating Systems S/014 Week 9: Real- Systems @GernotHeiser You are free: to share to copy,

More information

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5 OPERATING SYSTEMS CS3502 Spring 2018 Processor Scheduling Chapter 5 Goals of Processor Scheduling Scheduling is the sharing of the CPU among the processes in the ready queue The critical activities are:

More information

CPU Scheduling. CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections )

CPU Scheduling. CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections ) CPU Scheduling CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections 6.7.2 6.8) 1 Contents Why Scheduling? Basic Concepts of Scheduling Scheduling Criteria A Basic Scheduling

More information

1.1 Explain the difference between fast computing and real-time computing.

1.1 Explain the difference between fast computing and real-time computing. i 1.1 Explain the difference between fast computing and real-time computing. 1.2 What are the main limitations of the current real-time kernels for the development of critical control applications? 1.3

More information

Time Triggered and Event Triggered; Off-line Scheduling

Time Triggered and Event Triggered; Off-line Scheduling Time Triggered and Event Triggered; Off-line Scheduling Real-Time Architectures -TUe Gerhard Fohler 2004 Mälardalen University, Sweden gerhard.fohler@mdh.se Real-time: TT and ET Gerhard Fohler 2004 1 Activation

More information

Homework index. Processing resource description. Goals for lecture. Communication resource description. Graph extensions. Problem definition

Homework index. Processing resource description. Goals for lecture. Communication resource description. Graph extensions. Problem definition Introduction to Real-Time Systems ECE 97-1 Homework index 1 Reading assignment.............. 4 Northwestern University Department of Computer Science Department of Electrical and Computer Engineering Teachers:

More information

Resource Reservation & Resource Servers

Resource Reservation & Resource Servers Resource Reservation & Resource Servers Resource Reservation Application Hard real-time, Soft real-time, Others? Platform Hardware Resources: CPU cycles, memory blocks 1 Applications Hard-deadline tasks

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Introduction to Embedded Systems Sanjit A. Seshia UC Berkeley EECS 9/9A Fall 0 008-0: E. A. Lee, A. L. Sangiovanni-Vincentelli, S. A. Seshia. All rights reserved. Chapter : Operating Systems, Microkernels,

More information

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable What s An OS? Provides environment for executing programs Process abstraction for multitasking/concurrency scheduling Hardware abstraction layer (device drivers) File systems Communication Do we need an

More information

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS EECS 571 Principles of Real-Time Embedded Systems Lecture Note #10: More on Scheduling and Introduction of Real-Time OS Kang G. Shin EECS Department University of Michigan Mode Changes Changes in mission

More information

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time

More information

8: Scheduling. Scheduling. Mark Handley

8: Scheduling. Scheduling. Mark Handley 8: Scheduling Mark Handley Scheduling On a multiprocessing system, more than one process may be available to run. The task of deciding which process to run next is called scheduling, and is performed by

More information

LECTURE 3:CPU SCHEDULING

LECTURE 3:CPU SCHEDULING LECTURE 3:CPU SCHEDULING 1 Outline Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time CPU Scheduling Operating Systems Examples Algorithm Evaluation 2 Objectives

More information

Lecture 12: An Overview of Scheduling Theory

Lecture 12: An Overview of Scheduling Theory Lecture 12: An Overview of Scheduling Theory [RTCS Ch 8] Introduction Execution Time Estimation Basic Scheduling Approaches Static Cyclic Scheduling Fixed Priority Scheduling Rate Monotonic Analysis Earliest

More information

Scheduling Algorithm and Analysis

Scheduling Algorithm and Analysis Scheduling Algorithm and Analysis Model and Cyclic Scheduling (Module 27) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Task Scheduling Schedule: to determine which task

More information

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9 Implementing Scheduling Algorithms Real-Time and Embedded Systems (M) Lecture 9 Lecture Outline Implementing real time systems Key concepts and constraints System architectures: Cyclic executive Microkernel

More information

Computer Science 4500 Operating Systems

Computer Science 4500 Operating Systems Computer Science 4500 Operating Systems Module 6 Process Scheduling Methods Updated: September 25, 2014 2008 Stanley A. Wileman, Jr. Operating Systems Slide 1 1 In This Module Batch and interactive workloads

More information

Tasks. Task Implementation and management

Tasks. Task Implementation and management Tasks Task Implementation and management Tasks Vocab Absolute time - real world time Relative time - time referenced to some event Interval - any slice of time characterized by start & end times Duration

More information

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13 PROCESS SCHEDULING II CS124 Operating Systems Fall 2017-2018, Lecture 13 2 Real-Time Systems Increasingly common to have systems with real-time scheduling requirements Real-time systems are driven by specific

More information

Computer Systems Assignment 4: Scheduling and I/O

Computer Systems Assignment 4: Scheduling and I/O Autumn Term 018 Distributed Computing Computer Systems Assignment : Scheduling and I/O Assigned on: October 19, 018 1 Scheduling The following table describes tasks to be scheduled. The table contains

More information

Operating system concepts. Task scheduling

Operating system concepts. Task scheduling Operating system concepts Task scheduling Task scheduling (thread scheduling) Target of scheduling are ready tasks ACTIVE TASK BLOCKED TASKS PASSIVE TASKS READY TASKS Active task currently running on processor

More information

Real-Time Component Software. slide credits: H. Kopetz, P. Puschner

Real-Time Component Software. slide credits: H. Kopetz, P. Puschner Real-Time Component Software slide credits: H. Kopetz, P. Puschner Overview OS services Task Structure Task Interaction Input/Output Error Detection 2 Operating System and Middleware Application Software

More information

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s) 1/32 CPU Scheduling The scheduling problem: - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s) When do we make decision? 2/32 CPU Scheduling Scheduling decisions may take

More information

Scheduling. The Basics

Scheduling. The Basics The Basics refers to a set of policies and mechanisms to control the order of work to be performed by a computer system. Of all the resources in a computer system that are scheduled before use, the CPU

More information

Lecture Topics. Announcements. Today: Advanced Scheduling (Stallings, chapter ) Next: Deadlock (Stallings, chapter

Lecture Topics. Announcements. Today: Advanced Scheduling (Stallings, chapter ) Next: Deadlock (Stallings, chapter Lecture Topics Today: Advanced Scheduling (Stallings, chapter 10.1-10.4) Next: Deadlock (Stallings, chapter 6.1-6.6) 1 Announcements Exam #2 returned today Self-Study Exercise #10 Project #8 (due 11/16)

More information

Department of Computer Science Institute for System Architecture, Operating Systems Group REAL-TIME MICHAEL ROITZSCH OVERVIEW

Department of Computer Science Institute for System Architecture, Operating Systems Group REAL-TIME MICHAEL ROITZSCH OVERVIEW Department of Computer Science Institute for System Architecture, Operating Systems Group REAL-TIME MICHAEL ROITZSCH OVERVIEW 2 SO FAR talked about in-kernel building blocks: threads memory IPC drivers

More information

TDDD82 Secure Mobile Systems Lecture 6: Quality of Service

TDDD82 Secure Mobile Systems Lecture 6: Quality of Service TDDD82 Secure Mobile Systems Lecture 6: Quality of Service Mikael Asplund Real-time Systems Laboratory Department of Computer and Information Science Linköping University Based on slides by Simin Nadjm-Tehrani

More information

Announcements. Program #1. Program #0. Reading. Is due at 9:00 AM on Thursday. Re-grade requests are due by Monday at 11:59:59 PM.

Announcements. Program #1. Program #0. Reading. Is due at 9:00 AM on Thursday. Re-grade requests are due by Monday at 11:59:59 PM. Program #1 Announcements Is due at 9:00 AM on Thursday Program #0 Re-grade requests are due by Monday at 11:59:59 PM Reading Chapter 6 1 CPU Scheduling Manage CPU to achieve several objectives: maximize

More information

CSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008.

CSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008. CSC 4103 - Operating Systems Spring 2008 Lecture - XII Midterm Review Tevfik Ko!ar Louisiana State University March 4 th, 2008 1 I/O Structure After I/O starts, control returns to user program only upon

More information

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013) CPU Scheduling Daniel Mosse (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013) Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process

More information

Scheduling Algorithms for Real-Time Systems

Scheduling Algorithms for Real-Time Systems Scheduling Algorithms for Real-Time Systems Fredrik Lindh Master Program in Computer Engineering Mälardalens University, Sweden flh07001@student.mdh.se Thomas Otnes Jessica Wennerström Master Program in

More information

Global Scheduling in Multiprocessor Real-Time Systems

Global Scheduling in Multiprocessor Real-Time Systems Global Scheduling in Multiprocessor Real-Time Systems Alessandra Melani 1 Global vs Partitioned scheduling Single shared queue instead of multiple dedicated queues Global scheduling Partitioned scheduling

More information

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s) CPU Scheduling The scheduling problem: - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s) When do we make decision? 1 / 31 CPU Scheduling new admitted interrupt exit terminated

More information

Operating Systems: Quiz2 December 15, Class: No. Name:

Operating Systems: Quiz2 December 15, Class: No. Name: Operating Systems: Quiz2 December 15, 2006 Class: No. Name: Part I (30%) Multiple Choice Each of the following questions has only one correct answer. Fill the correct one in the blank in front of each

More information

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria A Predictable RTOS Mantis Cheng Department of Computer Science University of Victoria Outline I. Analysis of Timeliness Requirements II. Analysis of IO Requirements III. Time in Scheduling IV. IO in Scheduling

More information

Multimedia Operating System (2)

Multimedia Operating System (2) Multimedia Operating System (2) Hai Tao Continuous Media Resource Model A model frequently adopted to define QoS parameters Based Linear Bounded Arrival Process (LBAP) A distributed system is decomposed

More information

UNIT -3 PROCESS AND OPERATING SYSTEMS 2marks 1. Define Process? Process is a computational unit that processes on a CPU under the control of a scheduling kernel of an OS. It has a process structure, called

More information

4/6/2011. Informally, scheduling is. Informally, scheduling is. More precisely, Periodic and Aperiodic. Periodic Task. Periodic Task (Contd.

4/6/2011. Informally, scheduling is. Informally, scheduling is. More precisely, Periodic and Aperiodic. Periodic Task. Periodic Task (Contd. So far in CS4271 Functionality analysis Modeling, Model Checking Timing Analysis Software level WCET analysis System level Scheduling methods Today! erformance Validation Systems CS 4271 Lecture 10 Abhik

More information

(b) External fragmentation can happen in a virtual memory paging system.

(b) External fragmentation can happen in a virtual memory paging system. Alexandria University Faculty of Engineering Electrical Engineering - Communications Spring 2015 Final Exam CS333: Operating Systems Wednesday, June 17, 2015 Allowed Time: 3 Hours Maximum: 75 points Note:

More information

Today s class. Scheduling. Informationsteknologi. Tuesday, October 9, 2007 Computer Systems/Operating Systems - Class 14 1

Today s class. Scheduling. Informationsteknologi. Tuesday, October 9, 2007 Computer Systems/Operating Systems - Class 14 1 Today s class Scheduling Tuesday, October 9, 2007 Computer Systems/Operating Systems - Class 14 1 Aim of Scheduling Assign processes to be executed by the processor(s) Need to meet system objectives regarding:

More information

Dynamic Voltage Scaling of Periodic and Aperiodic Tasks in Priority-Driven Systems Λ

Dynamic Voltage Scaling of Periodic and Aperiodic Tasks in Priority-Driven Systems Λ Dynamic Voltage Scaling of Periodic and Aperiodic Tasks in Priority-Driven Systems Λ Dongkun Shin Jihong Kim School of CSE School of CSE Seoul National University Seoul National University Seoul, Korea

More information

requests or displaying activities, hence they usually have soft deadlines, or no deadlines at all. Aperiodic tasks with hard deadlines are called spor

requests or displaying activities, hence they usually have soft deadlines, or no deadlines at all. Aperiodic tasks with hard deadlines are called spor Scheduling Aperiodic Tasks in Dynamic Priority Systems Marco Spuri and Giorgio Buttazzo Scuola Superiore S.Anna, via Carducci 4, 561 Pisa, Italy Email: spuri@fastnet.it, giorgio@sssup.it Abstract In this

More information

Lecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter

Lecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter Lecture Topics Today: Uniprocessor Scheduling (Stallings, chapter 9.1-9.3) Next: Advanced Scheduling (Stallings, chapter 10.1-10.4) 1 Announcements Self-Study Exercise #10 Project #8 (due 11/16) Project

More information

DISTRIBUTED REAL-TIME SYSTEMS

DISTRIBUTED REAL-TIME SYSTEMS Distributed Systems Fö 11/12-1 Distributed Systems Fö 11/12-2 DISTRIBUTED REAL-TIME SYSTEMS What is a Real-Time System? 1. What is a Real-Time System? 2. Distributed Real Time Systems 3. Predictability

More information

CS3733: Operating Systems

CS3733: Operating Systems CS3733: Operating Systems Topics: Process (CPU) Scheduling (SGG 5.1-5.3, 6.7 and web notes) Instructor: Dr. Dakai Zhu 1 Updates and Q&A Homework-02: late submission allowed until Friday!! Submit on Blackboard

More information

Learning Outcomes. Scheduling. Is scheduling important? What is Scheduling? Application Behaviour. Is scheduling important?

Learning Outcomes. Scheduling. Is scheduling important? What is Scheduling? Application Behaviour. Is scheduling important? Learning Outcomes Scheduling Understand the role of the scheduler, and how its behaviour influences the performance of the system. Know the difference between I/O-bound and CPU-bound tasks, and how they

More information

Embedded Systems: OS

Embedded Systems: OS Embedded Systems: OS Jinkyu Jeong (Jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu ICE3028: Embedded Systems Design, Fall 2018, Jinkyu Jeong (jinkyu@skku.edu) Standalone

More information

Course Syllabus. Operating Systems

Course Syllabus. Operating Systems Course Syllabus. Introduction - History; Views; Concepts; Structure 2. Process Management - Processes; State + Resources; Threads; Unix implementation of Processes 3. Scheduling Paradigms; Unix; Modeling

More information

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institution of Technology, IIT Delhi

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institution of Technology, IIT Delhi Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institution of Technology, IIT Delhi Lecture - 20 Fundamentals of Embedded Operating Systems In today s class, we shall

More information

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Embedded Systems: OS Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Standalone Applications Often no OS involved One large loop Microcontroller-based

More information

1.1 CPU I/O Burst Cycle

1.1 CPU I/O Burst Cycle PROCESS SCHEDULING ALGORITHMS As discussed earlier, in multiprogramming systems, there are many processes in the memory simultaneously. In these systems there may be one or more processors (CPUs) but the

More information

Verification of Real-Time Systems Resource Sharing

Verification of Real-Time Systems Resource Sharing Verification of Real-Time Systems Resource Sharing Jan Reineke Advanced Lecture, Summer 2015 Resource Sharing So far, we have assumed sets of independent tasks. However, tasks may share resources to communicate

More information

Processes. Overview. Processes. Process Creation. Process Creation fork() Processes. CPU scheduling. Pål Halvorsen 21/9-2005

Processes. Overview. Processes. Process Creation. Process Creation fork() Processes. CPU scheduling. Pål Halvorsen 21/9-2005 INF060: Introduction to Operating Systems and Data Communication Operating Systems: Processes & CPU Pål Halvorsen /9-005 Overview Processes primitives for creation and termination states context switches

More information

Real-Time (Paradigms) (47)

Real-Time (Paradigms) (47) Real-Time (Paradigms) (47) Memory: Memory Access Protocols Tasks competing for exclusive memory access (critical sections, semaphores) become interdependent, a common phenomenon especially in distributed

More information

CSE 4/521 Introduction to Operating Systems

CSE 4/521 Introduction to Operating Systems CSE 4/521 Introduction to Operating Systems Lecture 9 CPU Scheduling II (Scheduling Algorithms, Thread Scheduling, Real-time CPU Scheduling) Summer 2018 Overview Objective: 1. To describe priority scheduling

More information

Process Scheduling. Copyright : University of Illinois CS 241 Staff

Process Scheduling. Copyright : University of Illinois CS 241 Staff Process Scheduling Copyright : University of Illinois CS 241 Staff 1 Process Scheduling Deciding which process/thread should occupy the resource (CPU, disk, etc) CPU I want to play Whose turn is it? Process

More information

Comparison of scheduling in RTLinux and RT-Mach Fredrik Löfgren frelo305 Dan Persson danpe454

Comparison of scheduling in RTLinux and RT-Mach Fredrik Löfgren frelo305 Dan Persson danpe454 Comparison of scheduling in RTLinux and RT-Mach 2006-11-18 Fredrik Löfgren 840803-1915 frelo305 Dan Persson 840912-2515 danpe454 Abstract Real-time systems are getting more common the world these days.

More information

Chapter 19: Real-Time Systems. Operating System Concepts 8 th Edition,

Chapter 19: Real-Time Systems. Operating System Concepts 8 th Edition, Chapter 19: Real-Time Systems, Silberschatz, Galvin and Gagne 2009 Chapter 19: Real-Time Systems System Characteristics Features of Real-Time Systems Implementing Real-Time Operating Systems Real-Time

More information

CS4514 Real-Time Systems and Modeling

CS4514 Real-Time Systems and Modeling CS4514 Real-Time Systems and Modeling Fall 2015 José M. Garrido Department of Computer Science College of Computing and Software Engineering Kennesaw State University Real-Time Systems RTS are computer

More information

Systemy RT i embedded Wykład 11 Systemy RTOS

Systemy RT i embedded Wykład 11 Systemy RTOS Systemy RT i embedded Wykład 11 Systemy RTOS Wrocław 2013 Plan Introduction Tasks Queues Interrupts Resources Memory management Multiprocessor operation Introduction What s an Operating System? Provides

More information

Real-time operating systems and scheduling

Real-time operating systems and scheduling Real-time operating systems and scheduling Problem 21 Consider a real-time operating system (OS) that has a built-in preemptive scheduler. Each task has a unique priority and the lower the priority id,

More information

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University Frequently asked questions from the previous class survey CS 370: SYSTEM ARCHITECTURE & SOFTWARE [CPU SCHEDULING] Shrideep Pallickara Computer Science Colorado State University OpenMP compiler directives

More information

Multiprocessor scheduling

Multiprocessor scheduling Chapter 10 Multiprocessor scheduling When a computer system contains multiple processors, a few new issues arise. Multiprocessor systems can be categorized into the following: Loosely coupled or distributed.

More information

Scheduling. Scheduling 1/51

Scheduling. Scheduling 1/51 Scheduling 1/51 Learning Objectives Scheduling To understand the role of a scheduler in an operating system To understand the scheduling mechanism To understand scheduling strategies such as non-preemptive

More information

Precedence Graphs Revisited (Again)

Precedence Graphs Revisited (Again) Precedence Graphs Revisited (Again) [i,i+6) [i+6,i+12) T 2 [i,i+6) [i+6,i+12) T 3 [i,i+2) [i+2,i+4) [i+4,i+6) [i+6,i+8) T 4 [i,i+1) [i+1,i+2) [i+2,i+3) [i+3,i+4) [i+4,i+5) [i+5,i+6) [i+6,i+7) T 5 [i,i+1)

More information

UNIT:2. Process Management

UNIT:2. Process Management 1 UNIT:2 Process Management SYLLABUS 2.1 Process and Process management i. Process model overview ii. Programmers view of process iii. Process states 2.2 Process and Processor Scheduling i Scheduling Criteria

More information

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time

More information

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm Evaluation Chapter 5: CPU Scheduling

More information

CSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke

CSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke CSCI-GA.2250-001 Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke frankeh@cs.nyu.edu Processes Vs Threads The unit of dispatching is referred to as a thread or lightweight

More information

Chapter 9 Uniprocessor Scheduling

Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 9 Uniprocessor Scheduling Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall Aim of Scheduling Assign

More information

Introduction to Real-time Systems. Advanced Operating Systems (M) Lecture 2

Introduction to Real-time Systems. Advanced Operating Systems (M) Lecture 2 Introduction to Real-time Systems Advanced Operating Systems (M) Lecture 2 Introduction to Real-time Systems Real-time systems deliver services while meeting some timing constraints Not necessarily fast,

More information

Process behavior. Categories of scheduling algorithms.

Process behavior. Categories of scheduling algorithms. Week 5 When a computer is multiprogrammed, it frequently has multiple processes competing for CPU at the same time. This situation occurs whenever two or more processes are simultaneously in the ready

More information

Overview. Sporadic tasks. Recall. Aperiodic tasks. Real-time Systems D0003E 2/26/2009. Loosening D = T. Aperiodic tasks. Response-time analysis

Overview. Sporadic tasks. Recall. Aperiodic tasks. Real-time Systems D0003E 2/26/2009. Loosening D = T. Aperiodic tasks. Response-time analysis Overview Real-time Systems D0003E Lecture 11: Priority inversion Burns/Wellings ch. 13 (except 13.12) Aperiodic tasks Response time analysis Blocking Priority inversion Priority inheritance Priority ceiling

More information

On Latency Management in Time-Shared Operating Systems *

On Latency Management in Time-Shared Operating Systems * On Latency Management in Time-Shared Operating Systems * Kevin Jeffay University of North Carolina at Chapel Hill Department of Computer Science Chapel Hill, NC 27599-3175 jeffay@cs.unc.edu Abstract: The

More information

An Improved Priority Ceiling Protocol to Reduce Context Switches in Task Synchronization 1

An Improved Priority Ceiling Protocol to Reduce Context Switches in Task Synchronization 1 An Improved Priority Ceiling Protocol to Reduce Context Switches in Task Synchronization 1 Albert M.K. Cheng and Fan Jiang Computer Science Department University of Houston Houston, TX, 77204, USA http://www.cs.uh.edu

More information

Unit 3 : Process Management

Unit 3 : Process Management Unit : Process Management Processes are the most widely used units of computation in programming and systems, although object and threads are becoming more prominent in contemporary systems. Process management

More information

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University CS 571 Operating Systems Midterm Review Angelos Stavrou, George Mason University Class Midterm: Grading 2 Grading Midterm: 25% Theory Part 60% (1h 30m) Programming Part 40% (1h) Theory Part (Closed Books):

More information