Integrating Real-Time Synchronization Schemes into Preemption Threshold Scheduling

Size: px
Start display at page:

Download "Integrating Real-Time Synchronization Schemes into Preemption Threshold Scheduling"

Transcription

1 Integrating Real-Time Synchronization Schemes into Preemption Threshold Scheduling Saehwa Kim, Seongsoo Hong and Tae-Hyung Kim {ksaehwa, Abstract Preemption threshold scheduling (PTS) provides prominent benefits for fixed priority scheduling such as increased schedulability, reduced context switches, and decreased memory requirements. Since such benefits allow for scalable real-time system design, we have adopted it into our automatic implementation synthesis method for real-time object-oriented models. In this paper, we present the integration of real-time synchronization schemes into PTS. Specifically, we investigate how to integrate priority inheritance protocols into preemption threshold scheduling such as the basic priority inheritance protocol and the priority ceiling protocol. In our integrated schemes, (1) the preemption threshold, instead of the priority, of a bed task is inherited when bing occurs; and (2) priority ceiling, instead of preemption threshold ceiling is used. We also show that our integrated schemes can minimize worst-case context switches and thus is appropriate for the implementation of real-time object-oriented design models. 1. Introduction Priority-driven and preemptive scheduling has been a pivotal basis in most real-time application development since it has been introduced in the Liu and Layland's pioneering paper [1]. In the early stages of real-time systems research, many researchers have attached importance to early consideration of timing issues at design time using a set of derived tasks. With the maturity of schedulability analysis techniques [1, 9, 10], performing timing analysis in order to develop The work reported in this paper is supported in part by MOST under the National Research Laboratory (NRL) grant 2000-N-NL-01-C-136 and by the Korea Science and Engineering Foundation (KOSEF) grant R School of Electrical Engineering and Computer Science, Seoul National University, Seoul , Korea. Department of Computer Science and Engineering, Hanyang University, Ansan, Kyunggi-Do , Korea. schedulable real-time control applications has been quite successful.. The increased complexity of such applications requires the use of systematic software design methodologies and CASE tools as well. Thus, the two primary research thrusts in real-time systems are how to improve the schedulability by devising elaborate scheduling methods, and how to integrate schedulability analysis techniques to modern software engineering design methodologies. However, an evident dilemma in preemptive scheduling is that it may incur excessive context switching overhead at run-time. In fine-grain or mediumgrain thread-based processing, which is often the case in most thread-based real-time computing environments, the context-switching overhead may outweigh the benefits of multi-threading and preemptive scheduling. To alleviate the possible excessive run-time costs, Lamie at Express Logic, Inc. introduced the notion of preemption threshold [8]. It helps improve system responsiveness and throughput in fixed-priority preemptive scheduling based systems. The preemption threshold plays a parametric role that controls the degree of preemptiveness in fixed-priority scheduling. If the threshold of each task is same as the original priority, then it is equivalent to the preemptive scheduling. If each task has the highest threshold value in a system, then it degenerates to non-preemptive scheduling. As Wang and Saksena discussed in [1], the schedulability of a task set under preemptive scheduling does not imply that the same task set is also schedulable under non-preemptive scheduling and vice versa. They illustrated an example where a task set is not schedulable under either fixed-priority preemptive scheduling or nonpreemptive scheduling, but schedulable under preemption threshold scheduling. Thus, preemption threshold scheduling (PTS) is a good complement to fixed-priority preemptive scheduling. It improves schedulability, withholds unnecessary preemptions, reduces the number of tasks because a group of non-preemptive tasks can be regarded as a unit, and eventually helps allow scalable real-time system design. Meanwhile, there have been several research activities based on ROOM (Real-time Object-Oriented Modeling)

2 language [11, 12, 14], as recent efforts to integrate schedulability analysis techniques into object-oriented design methodology. This approach aims at providing programmers with a schedulability analysis capability for the automated implementation of ROOM-based designs. While such an approach is a help for designing a real-time model with timing analysis features, still it is hard to derive tasks from a given object model, for the lack of such an automated process in the design cycle. When a real-time system is viewed as a collection of concurrent objects that cooperate with each other in accomplishing system functionality, each object participates in multiple system functions. Thus, each object is subject to multiple timing constraints. In this sense, there are two extremes in mapping objects to tasks. One is to map each object to a single task, and the other is to map entire (multiple) objects to a single task (in order to reduce multi-tasking costs). Both implementation models are inadequate since they are not analyzable by the fixed-priority scheduling theory. To cope with this problem, Saksena and Wang in [3] suggests a method for multi-task implementation in that preemption threshold scheduling was used to reduce run-time multi-tasking overheads by exploiting non-preemptability as much as possible. This was based on their earlier work that investigated the schedulability analysis problem of preemption threshold scheduling [1]. In our previous work, we presented a systematic schedulability-aware method that can automatically generate a multi-threaded implementation from a given object-oriented design mode for a real-time system [4, 5]. We do not try to evade the problem of inter-object and intra-object concurrency control. Our method is a threestep process: (1) deriving scenarios (end-to-end computation units), (2) identifying logical threads, and then (3) deriving physical threads. Logical threads are mapped from mutually exclusive scenarios, and assigned priorities and preemption thresholds that can guarantee schedulability. To reduce the number of tasks, derived logical threads are partitioned into mutually exclusive groups of non-preemptive tasks. A group of nonpreemptive logical threads becomes a physical thread. As a result, a logical thread contains several mutually exclusive tasks and thus possesses as many scheduling attributes. This makes the traditional schedulability analysis impossible to use. The schedulability analysis of preemption threshold scheduling was conducted in [1]. However, real-time synchronization has not been considered in the work, though it is essential for implementing a real-time object-oriented model. Also, the priority inversion problem should be addressed in this discussion. In this paper, we consider the problem of integrating real-time synchronization schemes into preemption threshold scheduling. A direct use of conventional synchronization primitives may result in a priority inversion problem. Therefore, we investigate schedulability analyses for preemption threshold scheduling with the following two representative priority inheritance protocols: the basic priority inheritance protocol (BPI) in [6] and the priority ceiling protocol (PCP) in [6]. The remainder of the paper is organized as follows. Section 2 describes the task model with definitions for the discussion. In Sections 3 and 4, we present how to integrate the two priority inheritance protocols BPI and PCP into the preemption threshold scheduling. We conclude this paper in Section Task Model We use the same task model used in [1, 3, 6]. A uniprocessor environment is assumed and only properly nested mutexes are allowed. A system has a fixed set of tasks, each of which has a fixed period, known worst-case execution time, fixed priority, and preemption threshold. The bigger the value is, the higher the priority is it is conforms to the intuitive meaning of being a higher threshold. Table 1 summarizes the notations and descriptions, which will be used throughout the remainder of the paper. Table 1. Summary of notations for the underlying task model. Notation τ i T i C i π i γ i p i M i P(M i ), V(M i ) ϕ(m i ) Description A task The period of task τ i The worst-case execution time of task τ i The fixed-priority of task τ i The preemption threshold of task τ i The effective priority of task τ i A mutex (binary semaphore) Indivisible, un operation of mutex M i The ceiling of mutex M i

3 (π, γ) τ 3 ={ P( ), V( ), ={ P( ), P( ), V( ), V( ), ={ P( ), V( ), (6, *) τ 4 (5, 7) τ 3 try to (attempt to ) bed by transitive bing (3, *) τ 3 preempt (attempt to ) bed by un (, 2) inherit γ 3 un un t 1 t 2 t 3 t 4 t 5 t 6 Figure 1. An example that prevents uncontrolled bing. Under PTS, each task has a preemption threshold in addition to its regular priority. It is meaningful to assign each task a preemption threshold, which is no less than its regular priority. This prevents preemption unless the preempting task is higher than its threshold value. Since the priority of a task is dynamically changed at run-time through PTS and also through the use of synchronization schemes, we introduce the notion of effective priority. The effective priority of a task is the practical priority seen by the kernel scheduler. The scheduler of our system always schedules the task with the highest effective priority. The effective priority is defined as the original priority of the task when a task is released and until it gets the CPU (case 1). Once a released task gets the CPU (case 2), whether it is running, preempted, or bed, the effective priority is determined to be its preemption threshold or the highest effective priority of the tasks that is being bed by this task, whichever is highest. In summary, the effective priority is determined by the following rules. Note that the definition is given recursively. Effective priority of τ i Case 1. p i = π i Case 2. p i = max(γ i,, p 1, p 2,, p j ) where τ i is bing τ j. In traditional priority-based preemptive scheduling, tasks may experience bing due to synchronization. Under PTS, tasks may encounter another type of bing which we name PTS bing. Task τ i is said to be in PTS bing if it is bed by a lower priority task whose preemption threshold is higher than π i. t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8 Figure 2. A situation of transitive bing. 3. Preventing Uncontrolled Bing Without using priority inheritance protocols, the catastrophic priority inversion problem cannot be rectified in a real-time system that uses synchronization primitives. If there is an uncontrolled bing, the duration of bing cannot be predictable. BPI prevents the preemption that eventually causes a priority inversion by having the bing task inherit the priority of the bed task. The uncontrolled bing in traditional priority-based scheduling occurs when a medium priority task preempts a lower priority task that bs a higher priority task. Under PTS, we reformulate the original problem into the effective priority inversion problem by substituting a priority of a task with its effective priority. The rationale behind this formulation is obvious since an effective priority takes the place of a priority under PTS. In this formulation, given that task τ i is bed by τ L, priority inversion occurs (1) when a medium priority task τ M with γ L < π M < π i preempts τ L ; or (2) when another task τ H with π i < π H γ i preempts τ L. In summary, we give a definition for uncontrolled bing under PTS. Uncontrolled bing under PTS Suppose τ i is bed by τ j since τ j is in a critical section. If τ j is preempted by another task τ k where γ j π k γ i, it is called an uncontrolled bing under PTS.

4 τ 3 ={ P( ), V( ), P( ), V( ), ={ P( ), V( ), ={ P( ), V( ), (attempt to ) (attempt to ) un un ={ P( ), P( ), V( ), V( ), ={ P( ),, P( ), V( ), V( ), preempt 1 τ bed by 1 τ (try to ) τ 3 preempt un (try to ) bed by un dead! t 1 t 2 t 3 t 4 t 5 t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8 t 9 t 10 Figure 3. A situation of chained bing. We also define BPI under PTS as follows. Inheritance of effective priorities. When task τ H is bed by task τ L with π H > γ L, task τ L inherits p H from task τ H. Recovery of effective priorities. When task τ L exits from a critical section, task τ L recovers p L that it had before entering that critical section. It can be shown that this definition of BPI under PTS prevents preemptions that eventually cause priority inversion. Figure 1 shows such an example that follows our definition of BPI under PTS. Tasks and τ 4 do not preempt, so the uncontrolled bing is prevented. BPI under PTS bears similar properties with the original BPI in [6]. In the original protocol, a task can be bed in one of three forms of bing: (1) direct bing, (2) push-through bing, and (3) transitive bing. In our protocol, a task can be bed additionally in PTS bing. Direct bing occurs when a higher priority task attempts to a mutex ed by a lower priority task. It is to ensure the consistency of a non-preemptive shared resource. Pushthrough bing occurs under PTS when a medium priority task attempts to preempt a lower priority task that is bing a higher priority task, as described below. Figure 4. A situation of dead. In Figure 1, tasks and τ 4 are bed during the period of (t 4, t 5 ) and (t 5, t 6 ), respectively, in the pushthrough bings under PTS. Transitive bing occurs when task τ 3 is bed by, which in turn is bed by another task. Figure 2 shows an example for transitive bing. During the period of (t 6, t 7 ), is bed by while bing τ H. Therefore, τ H is indirectly bed by in a transitive manner. As such, transitive bing occurs when mutexes are accessed in a nested fashion. Additionally, a task can encounter chained bing. Chained bing (or a chain of bing) is said to occur if a task is repeatedly bed when it enters its critical sections. An example for chained bing is illustrated in Figure 3 where task τ 3 is bed during the period of (t 6, t 7 ) and bed again during (t 9, t 10 ). Note that chained bing is not a form of bing, but refers to a situation where a task is bed more than once. Note that the BPI protocol alone does not prevent dead. Dead may occur when multiple tasks try to access nested mutexes in a circular manner. Figure 4 shows an example for dead. In this example, both tasks τ H and τ L need to acquire two mutexes and. As shown, τ L waits for τ H to release, and τ H waits for τ L to release, while τ L and τ H are holding and, respectively. Therefore, a dead occurs at time t 5. Push-through bing under PTS Suppose that τ i, τ j, and τ k are three tasks with π i π j π k. Task τ i is bed by τ k, since τ k s mutex M i that τ i attempts to. If the effective priority of τ k is determined by inheriting π i, τ j cannot preempt τ k, because γ k π j. This is called a push-through bing under PTS. 4. Preventing Dead and Possible Long Bing Delay Although BPI prevents uncontrolled bing by means of push-through bing, it may incur dead and excessively long bing delay. Excessively long bing delay is frequent especially if there are transitive

5 and chained bings that involve in multiple synchronizations. If we intend to integrate BPI to the preemption threshold scheduling, the dead should be handled properly. In the original BPI, the priority ceiling protocol (PCP) is introduced to this end [6]. In this section, we present how PCP can be integrated into PTS, in order to prevent dead and possible long bing delay. The following condition is given as a sufficient one that guarantees the prevention of dead, transitive bing, and chained bing in a system. We also describe a synchronization scheme that satisfies this condition, in order to run the priority ceiling protocol under PTS. Condition 4.1. There is at most one and only task that acquires some mutexes that are also requested by another task τ i with π i > π c where τ c is the current running task. With this, whenever a task s, it sees at most one lower priority task that has acquired mutexes it may use. We can also easily see that it is guaranteed for a task to be bed (to acquire its mutexes) at most once and by at most one lower priority task. Now we prove that satisfying Condition 4.1 in BPI solves all the abovementioned problems of the original BPI. Theorem 1. Satisfying Condition 4.1 guarantees the prevention of dead, transitive bing, and chained bing. Proof. We prove it in the following three prevention cases of dead, transitive bing, and chained bing, respectively. Case 1. Proof of preventing dead Suppose there is a dead between two tasks and. Suppose both tasks need to acquire two mutexes and. As shown in Figure 4, waits for to release, and waits for to release, while and have acquired and, respectively. If the situation is allowed, a dead occurs at time t 5. However, cannot at t 3, because has already acquired a mutex that may be used by. In this case, should be bed at t 3, instead of being allowed to, mandated by Condition 4.1. Therefore, the dead is prevented. Case 2. Proof of preventing transitive bing Suppose that there is a transitive bing among three tasks of,, and τ 3 in an ascending order of priority. In other words, τ 3 is bed by, which in turn bed by. To make this happen, holds a mutex and runs, and then s and preempts as shown in Figure 2. However, when tries to its mutex, it will be bed since has already ed mutex that may be used by τ 3. This is a contradiction. Therefore, transitive bing cannot occur. Case 3. Proof of preventing chained bing Suppose there is a chain of bings among three tasks of,, and τ 3 in an ascending order of priority. Consider the possible bing chain shown in Figure 3. At time t 8 task τ 3 is bed again. However, cannot mutex at t 3, since has ed that is also requested by τ 3, according to Condition 4.1. Therefore, no chain of bing is allowed. In order to satisfy Condition 4.1, the original priority ceiling protocol (PCP) uses the notion of priority ceiling, associated with mutexes. It is defined as follows. The priority ceiling of mutex M i equals to max{π j τ j Ψ i } where Ψ i is a set of tasks that may use mutex M i. It is to guarantee for a task to get bed once for all and only when it tries to enter its critical section within its busy period for the first time. PCP in fully preemptive fixed-priority scheduling can be described by combining offline ceiling protocol and online ing protocol in a similar manner as in [7]. Ceiling protocol Each mutex M i is assigned to have a ceiling whose value is given by ϕ(m i ) = max{π j τ j Ψ i } where Ψ i is a set of tasks that may use mutex M i. Locking protocol LP1. A system ceiling, which is a system-wide scheduling attribute, is dynamically set to the maximum of priority ceilings of all mutexes being ed in the system. LP2. In order for task τ i to enter its critical section, π i should be higher than the system ceiling. LP3. If there is bing, BPI is applied Priority Ceiling vs. Preemption Threshold Ceiling In this section, we investigate the behavior of PCP when it is integrated into PTS (PCP under PTS). Among three ing protocols shown just before, LP3 is a mere adoption of BPI. So, BPI under PTS in the previous section can be used, eventually for preventing uncontrolled bing. LP1 is orthogonal to a specific

6 scheduling policy. Thus, only the LP2 needs to be redefined for PCP under PTS. Since each task has an additional scheduling attribute of preemption threshold under PTS, we should have priority ceiling and preemption threshold ceiling, respectively. The definition of priority ceiling is given in the previous section. The preemption threshold ceiling of a mutex is defined similarly as follows. The use of preemption threshold ceiling gives the same result since the highest preemption threshold ceiling will be assigned to those mutexes according to LP2, i.e. ϕ( ) and ϕ( ) are γ 3, which is greater than γ 1 and γ 2. τ 3 τ ={ 3 ={ P(M P( ), 1 ), V(M V( ), 1 ), P(M P( ), 2 ), V(M V( ), 2 ), τ ={ 2 ={ P(M P( ), 2 ), V(M V( ), 2 ), τ ={ 1 ={ P(M P( ) 1 ),, V(M V( ), 1 ), The preemption threshold ceiling of mutex M i equals to max{γ j τ j Ψ i } where Ψ i is a set of tasks that may use mutex M i. τ 3 γ 1 γ < 1 < π 2 π 2 γ 2 γ < 2 < π 3 π 3 With this, what to determine is which of the priority ceilings and preemption threshold ceilings to use for PTS. Under PTS, the number of tasks that can preempt the currently running task is decreased as compared to the original fully preemptive fixed-priority scheduling. Since just the condition for preemption is more restrictive under PTS than in the original fully preemptive scheduling, we can easily deduce the direct application of PCP, and thus adoption of priority ceilings would satisfy Condition 4.1. The effect of adopting preemption threshold ceiling (instead of priority ceiling) is confined merely to task preemptions. Note that the reason for using threshold value is to control the degree of preemptiveness. The use of preemption threshold ceiling merely fortifies the condition for allowing ing mutexes. Note that the preemption threshold is usually higher than its regular priority. We now present the given semantics of the priority ceiling and the preemption threshold ceiling makes PCP under PTS satisfy Condition 4.1. The condition cannot be violated either by use of priority ceiling or by use of preemption threshold ceiling. Suppose that Condition 4.1 is not satisfied by use of priority ceiling. That means that there are more than two tasks that hold some mutexes that are requested by tasks of higher priority than the current running task τ c. The simplest form of this case may occur if there are three tasks,, τ 3 in an ascending order of priority. Specifically, let tasks and hold mutexes and that may be requested by task τ 3 in violation of Condition 4.1. See Figure 5 that illustrates the situation. Task was preempted with ing mutex by. Task was also preempted with ing by τ 3. However, according to the use of priority ceiling, cannot acquire according to LP2, since the system ceiling (at point t 3 in Figure 5) is π 3 according to LP1. Therefore, it is impossible for to. Therefore, it is impossible for to. This shows the case that the use of priority ceiling in PCP under PTS can satisfy Condition PCP under PTS t 1 t 2 t 3 t 4 Figure 5. Impossible case that violates Condition 4.1 In Section 4.1, PCP under PTS is described in two versions: one that uses a priority ceiling, and one that uses a preemption threshold ceiling. We compare both versions with each other to determine which version is superior to the other. We will show that PCP with priority ceilings yields the smaller number of context switches and shorter response times of higher priority tasks than that with preemption threshold ceilings. The preemption threshold is usually assigned to have a value that represents higher than its regular priority, intended for minimizing unnecessary context switches. In [3], the maximum preemption threshold assignment algorithm is introduced, that is to use a higher threshold as far as the entire system remains schedulable. As a result, the priority ceiling cannot be higher than the preemption threshold ceiling in a task set. This is a reasonable heuristic to prevent unnecessary preemptions in fixedpriority scheduling without having to consider real-time synchronization schemes. Unfortunately, this is not always the case, here we will see an example where the context-switching overhead is rather aggravated and unnecessary bings occur if the preemption threshold ceiling is used instead of the priority ceiling for PCP under PTS.

7 τ 3 = {P( ), V( ), = {P( ), V( ), = {P( ), V( ), (π, γ) (4, 10) τ 3 complete (π, γ) (4, 10) τ 3 try to unnecessary bing (3, 10) (1, 2) un complete (3, 10) (1, 2) un M1 complete t 1 t 2 t 3 t 4 t 5 t 6 t 7 Figure 6. Example: PCP under PTS using priority ceiling. Suppose there are three tasks,, and τ 3 in an ascending order of priority. In Figure 6, task acquires at t 1, τ 3 s at t 2, preempts, and tries to acquire. If we adopt the use of priority ceilings, the system ceiling value for is 3. Be aware that only and may use as shown in the upper part of the figure. Since π 3 (= 4) is greater than the system ceiling (= 3), τ 3 succeeds to acquire and runs to completion at t 5. If we decide to use the preemption threshold ceiling method instead, the system ceiling value for is 10. See Figure 7 for the case. Since γ 3 (the preemption threshold for τ 3 ) is not greater than the system ceiling (in fact, they are equal), the task fails to acquire at t 3, thus gets bed due to synchronization. Now the preempted task resumes, and τ 3 remains bed until releases. Consequently, τ 3 is bed unnecessary between t 3 and t 4, and two more unnecessary context switches are incurred. This kind of ceiling bing is likely to be frequent in practice. Remember that the preemption threshold tends to have the largest value possible. The preemption anomaly is largely owing to the very maximum preemption threshold assignment policy. Consequently, there can be too many thresholds reaching the highest value in a system, which makes the ceiling bing react poorly to synchronizations. From the example above, we have shown that PCP with priority ceilings (PCP-Type 1) performs better than PCP with preemption threshold ceilings (PCP-Type 2) with respect to run-time costs and the response times of higher priority tasks. The latter may incur unnecessary bing and thus unnecessary context switches. When current running task τ i tries to enter its critical section under PTS, there is a case where τ H is not bed in PCP-Type 1 but bed unnecessarily only in PCP-Type 2: it happens if the preempted task τ L with γ L < t 1 t 2 t 3 t 4 t 5 t 6 t 7 Figure 7. Example: PCP under PTS using preemption threshold ceiling. π H has acquired mutex M l, which may be requested by τ l with π l < π H and γ l γ H. This type of ceiling bing does not contribute to the prevention of dead and long bing delay since it is due to ed mutexes that may be requested by lower priority tasks. For every such case, there are two additional context switches in PCP-Type 1 as compared with in PCP-Type 2. Moreover, this unnecessary bing increases the response time of the bed higher priority task. Note that such case tends to be very frequent due to maximum preemption threshold assignment policy under PTS. Based on these observations, PCP under PTS protocol is completely described as follows. Ceiling protocol Each mutex M i is assigned to have a priority ceiling whose value is given by ϕ(m i ) = max{π j τ j Ψ i } where Ψ i is a set of tasks that may use mutex M i. Locking protocol nlp1. A system ceiling, which is a system-wide scheduling attribute, is dynamically set to the maximum of priority ceilings of all mutexes being ed in the system. nlp2. In order for τ i to enter its critical section, π i should be higher than the system ceiling. nlp3. Inheriting effective priorities If high priority task τ H is bed by low priority task τ L with π H > γ L, task τ L inherits p H from task τ H as its effective priority. nlp4. Recovering effective priorities When task τ L exits from a critical section, task τ L recovers the p L that it had before entering that critical section.

8 In this new ing protocol for PCP under PTS, two things are noteworthy. The effective priority is used for priority inheritance like BPI under PTS. One the other hand, the priority ceiling instead of preemption threshold ceiling is used for dead-free synchronization. 5. Conclusions We have presented real-time synchronization schemes for preemption threshold scheduling (PTS). In particular, we have investigated how to integrate priority inheritance protocols into preemption threshold scheduling such as the basic priority inheritance protocol and the priority ceiling protocol. Since each task has an additional scheduling attribute called a preemption threshold under PTS, it is not intuitive how to use existing schemes under PTS. We have presented the notion of the effective priority, which is conceptually, a task priority that is used by the kernel scheduler for selecting a task to be dispatched. With this, we have identified the uncontrolled bing under PTS and presented BPI under PTS that avoids uncontrolled bing. We have also presented a rule for preventing dead, transitive bing, and chained bing, which served as a guideline for designing PCP under PTS. We have shown that the adoption of priority ceilings instead of preemption threshold ceilings yields the smaller number of context switches and the shorter response times of higher priority tasks. Consequently, the integrated scheme, which minimizes worst-case context switches, is appropriate for the automated implementation of real-time object-oriented design models. References 1. C. Liu and J. Layland, Scheduling algorithm for multiprogramming in a hard real-time environment. In Journal of the ACM, vol. 20(1), pp , Jan M. Saksena and Y. Wang. Scalable real-time system design using preemption thresholds, In Proceedings of IEEE Real-Time Systems Symposium, pp , Y. Wang and M. Saksena. Scheduling fixed priority tasks with preemption threshold. In Proceedings of IEEE Real-Time Computing Systems and Applications Symposium, pp , S. Kim, S. Cho, and S. Hong. Schedulability-aware mapping of real-time object-oriented models to multithreaded implementations. In Proceedings of International Conference on Real-Time Computing Systems and Applications, pp. 7-14, S. Kim, S. Hong, and N. Chang, Scenario-based implementation architecture for real-time objectoriented models, In Proceedings of IEEE International Workshop on Object-oriented Real-time Dependable Systems, R. Rajkumar, L. Sha and J. Lehoczky. Priority inheritance protocols: an approach to real-time synchronization. In IEEE Transactions on Software Engineering, vol. 39, pp , M. Chen and K. Lin. Dynamic priority ceilings: A concurrency control protocol for real-time systems. In Real-Time Systems Journal, vol. 2, pp , W. Lamie, Preemption-Threshold, White Paper, Express Logic Inc., Available at 9. M. Harbour, M. Klein, and J. Lehoczky, Fixed Priority Scheduling of Periodic Tasks with Varying Execution Priority, In Proceedings of IEEE Real-Time Systems Symposium, pp , Dec J. Lehoczky, L. Sha, and Y. Ding, The Rate Monotonic Scheduling Algorithm: Exact Characterization and Average Case Behavior. In Proceedings of IEEE Real-Time Systems Symposium, pp , Dec M. Saksena, P. Freeman, and P. Rodziewicz, Guidelines for Automated Implementation of Executable Object Oriented Models for Real-Time Embedded Control Systems, In Proceedings of IEEE Real-Time Systems Symposium, pp , Dec M. Saksena, A. Ptak, P. Freeman, and P. Rodziewicz, Schedulability Analysis for Automated Implementations of Real-Time Object-Oriented Models, In Proceedings of IEEE Real-Time Systems Symposium, pp , Dec H. Gomma, Software Design Methods for Concurrent and Real-Time Systems, Addison-Wesley, B. Selic, G. Gullekson, and P. T. Ward, Real-Time Object-Oriented Modeling. John Wesley and Sons, 1994.

Journal of Computer and System Sciences

Journal of Computer and System Sciences Journal of Computer and System Sciences 76 (2010) 741 750 Contents lists available at ScienceDirect Journal of Computer and System Sciences www.elsevier.com/locate/jcss Dual ceiling protocol for real-time

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

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

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

The Priority Ceiling Protocol: A Method for Minimizing the Blocking of High-Priority Ada Tasks

The Priority Ceiling Protocol: A Method for Minimizing the Blocking of High-Priority Ada Tasks Special Report CMU/SEI-88-SR-4 The Priority Ceiling Protocol: A Method for Minimizing the Blocking of High-Priority Ada Tasks John B. Goodenough Lui Sha March 1988 Special Report CMU/SEI-88-SR-4 March

More information

International Journal of Advanced Research in Computer Science and Software Engineering

International Journal of Advanced Research in Computer Science and Software Engineering Volume 3, Issue 4, April 2013 ISSN: 2277 128X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com Reducing the Number

More information

2.1 Overview of UML-RT. 2.2 RoseRT and Run-Time Systems

2.1 Overview of UML-RT. 2.2 RoseRT and Run-Time Systems Schedulability-Aware Mapping of Real-Time Object-Oriented Models to Multi-Threaded Implementations Saehwa Kim, Sukjae Cho, and Seongsoo Hong School of Electrical Engineering and Computer Science Seoul

More information

AUTOSAR Extensions for Predictable Task Synchronization in Multi- Core ECUs

AUTOSAR Extensions for Predictable Task Synchronization in Multi- Core ECUs 11AE-0089 AUTOSAR Extensions for Predictable Task Synchronization in Multi- Core ECUs Copyright 2011 SAE International Karthik Lakshmanan, Gaurav Bhatia, Ragunathan (Raj) Rajkumar Carnegie Mellon University

More information

Real-Time Scalability of Nested Spin Locks. Hiroaki Takada and Ken Sakamura. Faculty of Science, University of Tokyo

Real-Time Scalability of Nested Spin Locks. Hiroaki Takada and Ken Sakamura. Faculty of Science, University of Tokyo Real-Time Scalability of Nested Spin Locks Hiroaki Takada and Ken Sakamura Department of Information Science, Faculty of Science, University of Tokyo 7-3-1, Hongo, Bunkyo-ku, Tokyo 113, Japan Abstract

More information

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

Real-Time Systems Resource Access Protocols

Real-Time Systems Resource Access Protocols Real-Time Systems Resource Access Protocols WS 2016/17 Problems: Priority Inversion Assumptions: Jobs use resources in a mutually exclusive manner Preemptive priority-driven scheduling Fixed task priorities

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

Automatic Synthesis of Multi-Tasking Implementations from Real-Time Object-Oriented Models

Automatic Synthesis of Multi-Tasking Implementations from Real-Time Object-Oriented Models Automatic Synthesis of Multi-Tasking Implementations from Real-Time Object-Oriented Models M. Saksena P. Karvelas Y. Wang Department of Computer Science, Concordia University Montreal, Quebec H3G 1M8,

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

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

EXTENDING THE PRIORITY CEILING PROTOCOL USING READ/WRITE AFFECTED SETS MICHAEL A. SQUADRITO A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE

EXTENDING THE PRIORITY CEILING PROTOCOL USING READ/WRITE AFFECTED SETS MICHAEL A. SQUADRITO A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE EXTENDING THE PRIORITY CEILING PROTOCOL USING READ/WRITE AFFECTED SETS BY MICHAEL A. SQUADRITO A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE IN COMPUTER

More information

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy Operating Systems Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. AL-AZHAR University Website : eaymanelshenawy.wordpress.com Email : eaymanelshenawy@yahoo.com Reference

More information

Concurrent Programming Synchronisation. CISTER Summer Internship 2017

Concurrent Programming Synchronisation. CISTER Summer Internship 2017 1 Concurrent Programming Synchronisation CISTER Summer Internship 2017 Luís Nogueira lmn@isep.ipp.pt 2 Introduction Multitasking Concept of overlapping the computation of a program with another one Central

More information

Resource-bound process algebras for Schedulability and Performance Analysis of Real-Time and Embedded Systems

Resource-bound process algebras for Schedulability and Performance Analysis of Real-Time and Embedded Systems Resource-bound process algebras for Schedulability and Performance Analysis of Real-Time and Embedded Systems Insup Lee 1, Oleg Sokolsky 1, Anna Philippou 2 1 RTG (Real-Time Systems Group) Department of

More information

A Transaction Processing Technique in Real-Time Object- Oriented Databases

A Transaction Processing Technique in Real-Time Object- Oriented Databases 122 IJCSNS International Journal of Computer Science and Network Security, VOL.8 No.1, January 2008 A Transaction Processing Technique in Real-Time Object- Oriented Databases Woochun Jun Dept. of Computer

More information

Resource Access Control in Real-Time Systems. Resource Access Control in Real-Time Systems

Resource Access Control in Real-Time Systems. Resource Access Control in Real-Time Systems CPSC663: RealTime Systems Resource Access Control in RealTime Systems Resources, Resource Access, and How Things Can Go Wrong: The Mars Pathfinder Incident Resources, Critical Sections, Blocking Priority

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

Abort-Oriented Concurrency Control for Real-Time Databases

Abort-Oriented Concurrency Control for Real-Time Databases 660 IEEE TRANSACTIONS ON COMPUTERS, VOL. 50, NO. 7, JULY 2001 Abort-Oriented Concurrency Control for Real-Time Databases Tei-Wei Kuo, Member, IEEE, Ming-Chung Liang, and LihChyun Shu, Member, IEEE AbstractÐThere

More information

Two-Version-Based Concurrency Control and Recovery in Real-Time Client/Server Databases

Two-Version-Based Concurrency Control and Recovery in Real-Time Client/Server Databases Two-Version-Based Concurrency Control and Recovery in Real-Time Client/Server Databases Tei-Wei Kuo, Yuan-Ting Kao, and Chin-Fu Kuo Department of Computer Science and Information Engineering National Taiwan

More information

Joint Entity Resolution

Joint Entity Resolution Joint Entity Resolution Steven Euijong Whang, Hector Garcia-Molina Computer Science Department, Stanford University 353 Serra Mall, Stanford, CA 94305, USA {swhang, hector}@cs.stanford.edu No Institute

More information

An Evaluation of the Dynamic and Static Multiprocessor Priority Ceiling Protocol and the Multiprocessor Stack Resource Policy in an SMP System

An Evaluation of the Dynamic and Static Multiprocessor Priority Ceiling Protocol and the Multiprocessor Stack Resource Policy in an SMP System An Evaluation of the Dynamic and Static Multiprocessor Priority Ceiling Protocol and the Multiprocessor Stack Resource Policy in an SMP System Jim Ras and Albert Mo Kim Cheng Outline Handling shared resources

More information

CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable)

CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable) CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable) Past & Present Have looked at two constraints: Mutual exclusion constraint between two events is a requirement that

More information

Task Synchronization and Allocation for Many-Core Real-Time Systems

Task Synchronization and Allocation for Many-Core Real-Time Systems Task Synchronization and Allocation for Many-Core Real-Time Systems Pi-Cheng Hsiu 1,, Der-Nien Lee 3, and Tei-Wei Kuo 1,3,4 1 Research Center for Information Technology Innovation, Academia Sinica Institute

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

Comparative evaluation of limited preemptive methods

Comparative evaluation of limited preemptive methods Comparative evaluation of limited preemptive methods Gang Yao, Giorgio Buttazzo and Marko Bertogna Scuola Superiore Sant Anna, Pisa, Italy, {g.yao, g.buttazzo, m.bertogna}@sssup.it Abstract Schedulability

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Introduction to Embedded Systems Edward A. Lee & Sanjit Seshia UC Berkeley EECS Spring 008 Copyright 008, Edward A. Lee & Sanjit Seshia, All rights reserved Lecture 0: Scheduling Anomalies Source This

More information

Priority Inversion in Multi Processor Systems due to Protected Actions

Priority Inversion in Multi Processor Systems due to Protected Actions Priority Inversion in Multi Processor Systems due to Protected Actions Gustaf Naeser Department of Computer Science and Engineering, Mälardalen University, Sweden gustaf.naeser@mdh.se The use of multiple

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

Efficient Implementation of IPCP and DFP

Efficient Implementation of IPCP and DFP Efficient Implementation of IPCP and DFP N.C. Audsley and A. Burns Department of Computer Science, University of York, York, UK. email: {neil.audsley, alan.burns}@york.ac.uk Abstract Most resource control

More information

T an important area of research in real-time computer systerns.

T an important area of research in real-time computer systerns. IEEE TRANSACTIONS ON COMPUTERS, VOL. 39, NO. 9, SEPTEMBER 1990 1175 Priority Inheritance Protocols: An Approach to Real-Time Synchronization Abstmct- A direct application of commonly used synchronization

More information

CSE 120. Fall Lecture 8: Scheduling and Deadlock. Keith Marzullo

CSE 120. Fall Lecture 8: Scheduling and Deadlock. Keith Marzullo CSE 120 Principles of Operating Systems Fall 2007 Lecture 8: Scheduling and Deadlock Keith Marzullo Aministrivia Homework 2 due now Next lecture: midterm review Next Tuesday: midterm 2 Scheduling Overview

More information

SYNCHRONIZATION M O D E R N O P E R A T I N G S Y S T E M S R E A D 2. 3 E X C E P T A N D S P R I N G 2018

SYNCHRONIZATION M O D E R N O P E R A T I N G S Y S T E M S R E A D 2. 3 E X C E P T A N D S P R I N G 2018 SYNCHRONIZATION M O D E R N O P E R A T I N G S Y S T E M S R E A D 2. 3 E X C E P T 2. 3. 8 A N D 2. 3. 1 0 S P R I N G 2018 INTER-PROCESS COMMUNICATION 1. How a process pass information to another process

More information

Operating systems and concurrency (B10)

Operating systems and concurrency (B10) Operating systems and concurrency (B10) David Kendall Northumbria University David Kendall (Northumbria University) Operating systems and concurrency (B10) 1 / 26 Introduction This lecture looks at Some

More information

Real-Time Scheduling of Sensor-Based Control Systems

Real-Time Scheduling of Sensor-Based Control Systems In Proceedings of Eighth IEEE Workshop on Real-Time Operatings Systems and Software, in conjunction with 7th IFAC/IFIP Workshop on Real-Time Programming, Atlanta, GA, pp. 44-50, May 99. Real-Time Scheduling

More information

Real-Time Concurrency Control in a Multiprocessor Environment

Real-Time Concurrency Control in a Multiprocessor Environment IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 13, NO. 6, JUNE 2002 659 Real-Time Concurrency Control in a Multiprocessor Environment Tei-Wei Kuo, Member, IEEE, Jun Wu, and Hsin-Chia Hsih

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

Chapter 6 - Deadlocks

Chapter 6 - Deadlocks Chapter 6 - Deadlocks Luis Tarrataca luis.tarrataca@gmail.com CEFET-RJ L. Tarrataca Chapter 6 - Deadlocks 1 / 100 1 Motivation 2 Resources Preemptable and Nonpreemptable Resources Resource Acquisition

More information

CS 153 Design of Operating Systems Winter 2016

CS 153 Design of Operating Systems Winter 2016 CS 153 Design of Operating Systems Winter 2016 Lecture 12: Scheduling & Deadlock Priority Scheduling Priority Scheduling Choose next job based on priority» Airline checkin for first class passengers Can

More information

Operating Systems 2006/2007

Operating Systems 2006/2007 Operating Systems 2006/2007 Blocking and locking Johan Lukkien 1 Blocking & locking Blocking: waiting for a certain condition to become true Starvation: unpredictable, even infinite blocking times the

More information

Schedulability with resource sharing. Priority inheritance protocol Priority ceiling protocol Stack resource policy

Schedulability with resource sharing. Priority inheritance protocol Priority ceiling protocol Stack resource policy Schedulability with resource sharing Priority inheritance protocol Priority ceiling protocol Stack resource policy 1 Lecture overview We have discussed the occurrence of unbounded priority inversion We

More information

What is the Race Condition? And what is its solution? What is a critical section? And what is the critical section problem?

What is the Race Condition? And what is its solution? What is a critical section? And what is the critical section problem? What is the Race Condition? And what is its solution? Race Condition: Where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular

More information

Deadlock. Lecture 4: Synchronization & Communication - Part 2. Necessary conditions. Deadlock handling. Hierarchical resource allocation

Deadlock. Lecture 4: Synchronization & Communication - Part 2. Necessary conditions. Deadlock handling. Hierarchical resource allocation Lecture 4: Synchronization & ommunication - Part 2 [RTS h 4] Deadlock Priority Inversion & Inheritance Mailbox ommunication ommunication with Objects Deadlock Improper allocation of common resources may

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

Interprocess Communication By: Kaushik Vaghani

Interprocess Communication By: Kaushik Vaghani Interprocess Communication By: Kaushik Vaghani Background Race Condition: A situation where several processes access and manipulate the same data concurrently and the outcome of execution depends on the

More information

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5) Announcements Reading Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) 1 Relationship between Kernel mod and User Mode User Process Kernel System Calls User Process

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 Synchronization and Hierarchical Scheduling

Multiprocessor Synchronization and Hierarchical Scheduling Multiprocessor Synchronization and Hierarchical Scheduling Farhang Nemati, Moris Behnam, Thomas Nolte Mälardalen Real-Time Research Centre P.O. Box 883, SE-721 23 Västerås, Sweden farhang.nemati@mdh.se

More information

Introduction to Real-Time Operating Systems

Introduction to Real-Time Operating Systems Introduction to Real-Time Operating Systems GPOS vs RTOS General purpose operating systems Real-time operating systems GPOS vs RTOS: Similarities Multitasking Resource management OS services to applications

More information

Implementation Synthesis of Embedded Software under Operating Systems Supporting the Hybrid Scheduling Model

Implementation Synthesis of Embedded Software under Operating Systems Supporting the Hybrid Scheduling Model Implementation Synthesis of Embedded Software under Operating Systems Supporting the Hybrid Scheduling Model Zhigang Gao 1, Zhaohui Wu 1, and Hong Li 1 1 College of Computer Science, Zhejiang University

More information

Lecture 5 / Chapter 6 (CPU Scheduling) Basic Concepts. Scheduling Criteria Scheduling Algorithms

Lecture 5 / Chapter 6 (CPU Scheduling) Basic Concepts. Scheduling Criteria Scheduling Algorithms Operating System Lecture 5 / Chapter 6 (CPU Scheduling) Basic Concepts Scheduling Criteria Scheduling Algorithms OS Process Review Multicore Programming Multithreading Models Thread Libraries Implicit

More information

A Real-Time Locking Protocol

A Real-Time Locking Protocol Technical Report CMU/SEI-89-TR-018 ESD-89-TR-026 A Real-Time Locking Protocol Lui Sha Ragunathan Rajkumar Sang Son Chun-Hyon Chang April 1989 Technical Report CMU/SEI-89-TR-018 ESD-89-TR-026 April 1989

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

The Deadline Floor Protocol and Ada

The Deadline Floor Protocol and Ada The Deadline Floor Protocol and Ada Alan Burns and Andy Wellings University of York, UK. emails: alan.burns,andy.wellings@york.ac.uk Abstract This short paper summarises the current status of the proposal

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

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

The University of Texas at Arlington

The University of Texas at Arlington The University of Texas at Arlington Lecture 10: Threading and Parallel Programming Constraints CSE 5343/4342 Embedded d Systems II Objectives: Lab 3: Windows Threads (win32 threading API) Convert serial

More information

POSIX Threads: a first step toward parallel programming. George Bosilca

POSIX Threads: a first step toward parallel programming. George Bosilca POSIX Threads: a first step toward parallel programming George Bosilca bosilca@icl.utk.edu Process vs. Thread A process is a collection of virtual memory space, code, data, and system resources. A thread

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 Real-Time Locking Protocols: from Homogeneous to Heterogeneous

Multiprocessor Real-Time Locking Protocols: from Homogeneous to Heterogeneous Multiprocessor Real-Time Locking Protocols: from Homogeneous to Heterogeneous Kecheng Yang Department of Computer Science, University of North Carolina at Chapel Hill Abstract In this project, we focus

More information

OPERATING SYSTEMS. Prescribed Text Book. Operating System Principles, Seventh Edition. Abraham Silberschatz, Peter Baer Galvin and Greg Gagne

OPERATING SYSTEMS. Prescribed Text Book. Operating System Principles, Seventh Edition. Abraham Silberschatz, Peter Baer Galvin and Greg Gagne OPERATING SYSTEMS Prescribed Text Book Operating System Principles, Seventh Edition By Abraham Silberschatz, Peter Baer Galvin and Greg Gagne 1 DEADLOCKS In a multi programming environment, several processes

More information

Compositional Schedulability Analysis of Hierarchical Real-Time Systems

Compositional Schedulability Analysis of Hierarchical Real-Time Systems Compositional Schedulability Analysis of Hierarchical Real-Time Systems Arvind Easwaran, Insup Lee, Insik Shin, and Oleg Sokolsky Department of Computer and Information Science University of Pennsylvania,

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

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

Ch 4 : CPU scheduling

Ch 4 : CPU scheduling Ch 4 : CPU scheduling It's the basis of multiprogramming operating systems. By switching the CPU among processes, the operating system can make the computer more productive In a single-processor system,

More information

An Approach to Task Attribute Assignment for Uniprocessor Systems

An Approach to Task Attribute Assignment for Uniprocessor Systems An Approach to ttribute Assignment for Uniprocessor Systems I. Bate and A. Burns Real-Time Systems Research Group Department of Computer Science University of York York, United Kingdom e-mail: fijb,burnsg@cs.york.ac.uk

More information

Priority Based Assignment of Shared resources in RTOS

Priority Based Assignment of Shared resources in RTOS RESEARCH ARTICLE OPEN ACCESS Priority Based Assignment of Shared resources in RTOS Ms. Raana Syeda*, Ms. Manju Ahuja**, Ms. Sneha Khatwani*** Mrs. Swara Pampatwar**** *(Department of Computer Science &

More information

UNIT 4 DEADLOCKS 4.0 INTRODUCTION

UNIT 4 DEADLOCKS 4.0 INTRODUCTION UNIT 4 DEADLOCKS Deadlocks Structure Page Nos 4.0 Introduction 69 4.1 Objectives 70 4.2 Deadlocks 70 4.3 Characterisation of a Deadlock 71 4.3.1 Mutual Exclusion Condition 4.3.2 Hold and Wait Condition

More information

The University of Texas at Arlington

The University of Texas at Arlington The University of Texas at Arlington Lecture 6: Threading and Parallel Programming Constraints CSE 5343/4342 Embedded Systems II Based heavily on slides by Dr. Roger Walker More Task Decomposition: Dependence

More information

Fixed-Priority Multiprocessor Scheduling

Fixed-Priority Multiprocessor Scheduling Fixed-Priority Multiprocessor Scheduling Real-time Systems N periodic tasks (of different rates/periods) r i T i C i T i C C J i Ji i ij i r i r i r i Utilization/workload: How to schedule the jobs to

More information

CSE 120 Principles of Operating Systems

CSE 120 Principles of Operating Systems CSE 120 Principles of Operating Systems Fall 2016 Lecture 8: Scheduling and Deadlock Geoffrey M. Voelker Administrivia Thursday Friday Monday Homework #2 due at start of class Review material for midterm

More information

EPOS: an Object-Oriented Operating System

EPOS: an Object-Oriented Operating System EPOS: an Object-Oriented Operating System Antônio Augusto Fröhlich 1 Wolfgang Schröder-Preikschat 2 1 GMD FIRST guto@first.gmd.de 2 University of Magdeburg wosch@ivs.cs.uni-magdeburg.de Abstract This position

More information

Resource sharing and blocking. The Mars Pathfinder Unbounded priority inversion Priority inheritance

Resource sharing and blocking. The Mars Pathfinder Unbounded priority inversion Priority inheritance Resource sharing and blocking The Mars Pathfinder Unbounded priority inversion Priority inheritance 1 Lecture overview Unbounded priority inversion problem (occurred in the Mars Pathfinder) Blocking and

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

Multimedia Applications Require Adaptive CPU Scheduling. Veronica Baiceanu, Crispin Cowan, Dylan McNamee, Calton Pu, and Jonathan Walpole

Multimedia Applications Require Adaptive CPU Scheduling. Veronica Baiceanu, Crispin Cowan, Dylan McNamee, Calton Pu, and Jonathan Walpole Multimedia Applications Require Adaptive CPU Scheduling Veronica Baiceanu, Crispin Cowan, Dylan McNamee, Calton Pu, and Jonathan Walpole Department of Computer Science and Engineering Oregon Graduate Institute

More information

Operating Systems Antonio Vivace revision 4 Licensed under GPLv3

Operating Systems Antonio Vivace revision 4 Licensed under GPLv3 Operating Systems Antonio Vivace - 2016 revision 4 Licensed under GPLv3 Process Synchronization Background A cooperating process can share directly a logical address space (code, data) or share data through

More information

CSc33200: Operating Systems, CS-CCNY, Fall 2003 Jinzhong Niu December 10, Review

CSc33200: Operating Systems, CS-CCNY, Fall 2003 Jinzhong Niu December 10, Review CSc33200: Operating Systems, CS-CCNY, Fall 2003 Jinzhong Niu December 10, 2003 Review 1 Overview 1.1 The definition, objectives and evolution of operating system An operating system exploits and manages

More information

Resource Sharing and Priority Ceiling Protocols

Resource Sharing and Priority Ceiling Protocols Resource Sharing and Priority Ceiling Protocols 1 A classic paper on realtime systems L. Sha, R. Rajkumar, and J. P. Lehoczky, Priority Inheritance Protocols: An Approach to RealTime Synchronization. In

More information

A Data Centered Approach for Cache Partitioning in Embedded Real- Time Database System

A Data Centered Approach for Cache Partitioning in Embedded Real- Time Database System A Data Centered Approach for Cache Partitioning in Embedded Real- Time Database System HU WEI, CHEN TIANZHOU, SHI QINGSONG, JIANG NING College of Computer Science Zhejiang University College of Computer

More information

Chapter 8: Deadlocks. The Deadlock Problem

Chapter 8: Deadlocks. The Deadlock Problem Chapter 8: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Combined Approach to Deadlock

More information

The Deadlock Problem. Chapter 8: Deadlocks. Bridge Crossing Example. System Model. Deadlock Characterization. Resource-Allocation Graph

The Deadlock Problem. Chapter 8: Deadlocks. Bridge Crossing Example. System Model. Deadlock Characterization. Resource-Allocation Graph Chapter 8: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Combined

More information

A TimeSys Perspective on the Linux Preemptible Kernel Version 1.0. White Paper

A TimeSys Perspective on the Linux Preemptible Kernel Version 1.0. White Paper A TimeSys Perspective on the Linux Preemptible Kernel Version 1.0 White Paper A TimeSys Perspective on the Linux Preemptible Kernel A White Paper from TimeSys Corporation Introduction One of the most basic

More information

CPU Scheduling. Operating Systems (Fall/Winter 2018) Yajin Zhou ( Zhejiang University

CPU Scheduling. Operating Systems (Fall/Winter 2018) Yajin Zhou (  Zhejiang University Operating Systems (Fall/Winter 2018) CPU Scheduling Yajin Zhou (http://yajin.org) Zhejiang University Acknowledgement: some pages are based on the slides from Zhi Wang(fsu). Review Motivation to use threads

More information

Byzantine Consensus in Directed Graphs

Byzantine Consensus in Directed Graphs Byzantine Consensus in Directed Graphs Lewis Tseng 1,3, and Nitin Vaidya 2,3 1 Department of Computer Science, 2 Department of Electrical and Computer Engineering, and 3 Coordinated Science Laboratory

More information

Cover Page. The handle holds various files of this Leiden University dissertation

Cover Page. The handle   holds various files of this Leiden University dissertation Cover Page The handle http://hdl.handle.net/1887/22891 holds various files of this Leiden University dissertation Author: Gouw, Stijn de Title: Combining monitoring with run-time assertion checking Issue

More information

Supporting Nested Locking in Multiprocessor Real-Time Systems

Supporting Nested Locking in Multiprocessor Real-Time Systems Supporting Nested Locking in Multiprocessor Real-Time Systems Bryan C. Ward and James H. Anderson Department of Computer Science, University of North Carolina at Chapel Hill Abstract This paper presents

More information

Multiprocessor Systems. Chapter 8, 8.1

Multiprocessor Systems. Chapter 8, 8.1 Multiprocessor Systems Chapter 8, 8.1 1 Learning Outcomes An understanding of the structure and limits of multiprocessor hardware. An appreciation of approaches to operating system support for multiprocessor

More information

Extending UML-RT for Control System Modeling

Extending UML-RT for Control System Modeling American Journal of Applied Sciences 1 (4): 338-347, 2004 ISSN 1546-9239 Science Publications, 2004 Extending UML-RT for Control System Modeling Qimin Gao, L.J. Brown and L.F. Capretz Department of Electrical

More information

Operating System Performance and Large Servers 1

Operating System Performance and Large Servers 1 Operating System Performance and Large Servers 1 Hyuck Yoo and Keng-Tai Ko Sun Microsystems, Inc. Mountain View, CA 94043 Abstract Servers are an essential part of today's computing environments. High

More information

Maximum CPU utilization obtained with multiprogramming. CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait

Maximum CPU utilization obtained with multiprogramming. CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples Java Thread Scheduling Algorithm Evaluation CPU

More information

Operating Systems 2010/2011

Operating Systems 2010/2011 Operating Systems 2010/2011 Blocking and locking (with figures from Bic & Shaw) Johan Lukkien 1 Blocking & locking Blocking: waiting for a certain condition to become true Starvation: unpredictable, even

More information

Outlook. Deadlock Characterization Deadlock Prevention Deadlock Avoidance

Outlook. Deadlock Characterization Deadlock Prevention Deadlock Avoidance Deadlocks Outlook Deadlock Characterization Deadlock Prevention Deadlock Avoidance Deadlock Detection and Recovery e 2 Deadlock Characterization 3 Motivation System owns many resources of the types Memory,

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

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

1. Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.

1. Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6. 1. Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6. What will be the ratio of page faults for the following replacement algorithms - FIFO replacement

More information

Survey of different Task Scheduling Algorithm

Survey of different Task Scheduling Algorithm 2014 IJEDR Volume 2, Issue 1 ISSN: 2321-9939 Survey of different Task Scheduling Algorithm 1 Viral Patel, 2 Milin Patel 1 Student, 2 Assistant Professor 1 Master in Computer Engineering, Parul Institute

More information