Real-Time Systems. Design Principles for Distributed Embedded Applications. Herman Kopetz. Second Edition (811374), страница 20
Текст из файла (страница 20)
The relational complexity theory of Halford [Hal96] establishes limits forthe rational reasoning capability of humans, while Miller [Mil56] elaborates on thelimits of the human short-term memory capacity. Popper [Pop68] and Edmonds[Edm00] discuss the relevance and limitations of model building for understandingphysical systems. The book by Bedau [Bed08] is devoted to the topic of emergence.The comparison of simple versus difficult tasks is taken from [Fel04]. The PhDthesis by Rumpler [Rum08] deals with design comprehension of embedded realtime systems. Roger Session’s book [Ses08] Simple Architectures for ComplexEnterprises contains practical guidelines for designing understandable EnterpriseInformation Architectures.Review Questions and Problems2.1 What are the distinguishing characteristics of the intuitive-experiential andthe analytic-rational subsystems for human problem solving?2.2 Give concrete examples for typical tasks for the intuitive-experiential and theanalytic-rational problem solving subsystems!502 Simplicity2.3 How is a concept defined? What are the principles that guide conceptformation? What is the conceptual landscape? What are basic level concepts?2.4 What is characteristic for a domain expert?2.5 What do we mean when we say we understand a scenario? How is cognitivecomplexity defined? Give an example of a barrier to understanding!2.6 Which are known simplification strategies?2.7 What are the characteristics of scientific concepts?2.8 What is the concept of a message? What is a protocol?2.9 What is the semantic content of a variable? What is the relationship betweenthe representation of a variable and its semantic content?2.10 What is the essence of model building?2.11 Explain the four-universe model of a computer system!2.12 What makes a task simple or complex?2.13 What do we mean by emergence? What are prior and derivative properties?2.14 What are the advantages and disadvantages of message-based inter IP-corecommunication on an MP-SoC (Multiprocessor system on chip)?Chapter 3Global TimeOverview This chapter starts with a general discussion on time and order.
Thenotions of causal order, temporal order, and delivery order and their interrelationships are elaborated. The parameters that characterize the behavior and the qualityof a digital clock are investigated. Section 3.2 proceeds along the positivist traditionby introducing an omniscient external observer with an absolute reference clockthat can generate precise time-stamps for all relevant events. These absolute timestamps are used to reason about the precision and accuracy of a global time base,and to expose the fundamental limits of time measurement in a distributed real-timesystem.In Sect. 3.3, the model of a sparse time base is introduced to establish a consistentview of the order of computer-generated events in a distributed real-time systemwithout having to execute an agreement protocol. The cyclic model of time presentedin this section is well suited to deal with the progression of time in cyclic systems,such as in many control and multimedia systems.The topic of internal clock synchronization is covered in Sect.
3.4. First, thenotions of convergence function and drift offset are introduced to express thesynchronization condition that must be satisfied by any synchronization algorithm.Then, the simple central-master algorithm for clock synchronization is presented,and the precision of this algorithm is analyzed. Section 3.4.3 deals with the morecomplex issue of fault-tolerant distributed clock synchronization. The jitter of thecommunication system is a major limiting factor that determines the precision ofthe global time base.The topic of external synchronization is studied in Sect.
3.5. The role of a timegateway and the problem of faults in external synchronization are discussed.Finally, the network time protocol (NTP) of the Internet, the time format of theIEEE 1588 clock synchronization protocol, and the time format of the TTA arepresented.H. Kopetz, Real-Time Systems: Design Principles for Distributed Embedded Applications,Real-Time Systems Series, DOI 10.1007/978-1-4419-8237-7_3,# Springer Science+Business Media, LLC 201151523.13 Global TimeTime and OrderApplying the principles of utility and parsimony (Sect.
2.2.1), we base our model oftime on Newtonian physics, because the models of Newtonian physics are simpler thanthe models of relativistic physics and sufficient to deal with most temporal phenomenain embedded systems. In many engineering disciplines (e.g., Newtonian mechanics),time is introduced as an independent variable that determines the sequence of states ofa system. The basic constants of physics are defined in relation to the standard of time,the physical second. This is why the global time base in a cyber-physical real-timesystem should be based on the metric of the physical second.In a typical real-time application, the distributed computer system performs amultitude of different functions concurrently, e.g., the monitoring of real-time (RT)entities (both their value and rate of change), the detection of alarm conditions, thedisplay of the observations to the operator, and the execution of control algorithmsto find new set-points for many distinct control loops.
These diverse functions arenormally executed at different nodes. In addition, replicated nodes are introduced toprovide fault tolerance by active redundancy. To guarantee a consistent behavior ofthe entire distributed system, it must be ensured that all nodes process all events inthe same consistent order, preferably in the same temporal order in which the eventsoccurred (see also the example in Sect. 5.5) in the controlled object. A proper globaltime base helps to establish such a consistent temporal order on the basis of thetime-stamps of the events.3.1.1Different OrdersTemporal Order. The continuum of Newtonian real time can be modeled by adirected timeline consisting of an infinite set {T} of instants (or points in time) withthe following properties [Wit90, p.
208]:1. {T} is an ordered set, that is, if p and q are any two instants, then either p issimultaneous with q, or p precedes q, or q precedes p, where these relations aremutually exclusive. We call the order of instants on the timeline the temporalorder.2. {T} is a dense set. This means that there is at least one q between p and r iff p isnot the same instant as r, where p, q, and r are instants.A section of the time line between two different instants is called a duration. In ourmodel, an event takes place at an instant of time and does not have a duration. If twoevents occur at the same instant, then the two events are said to occur simultaneously.
Instants are totally ordered; however, events are only partially ordered,since simultaneous events are not in the order relation. Events can be totally orderedif another criterion is introduced to order events that occur simultaneously, e.g., in adistributed computer system, the number of the node at which the event occurred canbe used to order events that occur simultaneously [Lam78].3.1 Time and Order53Causal Order. In many real-time applications, the causal dependencies amongevents are of interest. The computer system must assist the operator in identifyingthe primary event of an alarm shower (see Sect. 1.2.1). Knowledge of the exacttemporal order of the events is helpful in identifying this primary event.
If an evente1 occurs after an event e2, then e1 cannot be the cause of e2. If, however, e1 occursbefore e2, then it is possible, but not certain, that e1 is the cause of e2. The temporalorder of two events is necessary, but not sufficient, for their causal order.
Causalorder is more than temporal order.Reichenbach [Rei57, p. 145] defined causality by a mark method withoutreference to time: If event e1 is a cause of event e2, then a small variation(a mark) in e1 is associated with small variation in e2, whereas small variationsin e2 are not necessarily associated with small variations in e1.Example: Suppose there are two events e1 and e2:e1 Somebody enters a room.e2 The telephone starts to ring.Consider the following two cases1.
e2 occurs after e1.2. e1 occurs after e2.In both cases the two events are temporally ordered. However, while it is unlikely that thereis a causal order between the two events of case (1), it is likely that such a causal orderexists between the two events of case (2), since the person might enter the room to answerthe telephone.If the (partial) temporal order between alarm events has been established, it ispossible to exclude an event from being the primary event if it definitely occurredlater than another alarm event. Subsequently, we will show that a precise globaltime base helps to determine the event set that is in this definitely-occurred-laterthan relation (see also the example in Sect.