Methods for determining current data in a computer system

A non-transitive relation-based method for determining current data in multitasking systems addresses overflow issues in traditional timestamping, ensuring accurate and efficient selection of the most recent data among parallel tasks.

DE102023202627B4Active Publication Date: 2025-01-09ROBERT BOSCH GMBH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
DE102023202627
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2025-01-09
Estimated Expiration
2043-03-23

AI Technical Summary

Technical Problem

In multitasking computer systems, determining the most recent data among multiple parallel tasks with time-unsynchronized data provision is challenging due to potential overflow conditions when using traditional time stamps.

Method used

A method utilizing a non-transitive relation among status variables to encode the relative timing of data provision, avoiding overflow issues by defining a set of marking elements with specific status values, ensuring clear determination of the most current data without separate handling of overflow conditions.

Benefits of technology

Enables efficient and reliable selection of the most recent data by ensuring consistent and clear determination, even in the presence of simultaneous data updates, with minimal computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention relates to a method for determining current data in a computer system (C0, C1, C2) in which several providers (P1, P2) provide data, using a set of marker elements on which a non-transitive relation is defined, wherein for each arbitrary first marker element there exists at least one other second marker element such that the first marker element is related to the second marker element but the second marker element is not related to the first marker element; wherein a status variable is provided for each provider (P1, P2) which includes a status value for each other provider;wherein, when one of the providers (P1, P2), referred to as the first provider, provides new data, the status variable of the first provider is modified, if necessary (110), such that for each of the providers other than the first provider, referred to as the second providers, the status value assigned to the second provider in the status variable of the first provider is related to the status value assigned to the first provider in the status variable of the second provider. Furthermore, the data provided by one of the providers (P1, P2), referred to as the third provider, is determined to be the most recent data (125).
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present invention relates to a method or computer-implemented method for determining current data in a computer system, as well as a computing unit, a computer system and a computer program for carrying it out. Background of the invention

[0002] In a computer system, or more specifically in a multitasking system, it can happen that several computer tasks run in parallel, each providing new data or information in a time-unsynchronized manner. Another parallel computer task, which processes the data and aims to process the most up-to-date data, must then be able to determine which data is the most current.

[0003] The object of the present invention is to provide a method for solving this problem.

[0004] From US patent 2019 / 0036803A1, a device is known that includes a first and second network interface for receiving data and forwarding data to a destination, respectively. The device also includes a circuit for generating sequences of timestamps.

[0005] A method for generating relative timestamps is known from CN 1 15 033 219 A.

[0006] GAWLICK, R., LYNCH, N., SHAVIT, N.: Concurrent Timestamping Made Simple. In: Theory of Computing and Systems, ISTCS 1992, Lecture Notes in Computer Science, Vol. 601, 1992, Springer, Berlin, Heidelberg, pp. 171-183, represents a further relevant state of the art. Disclosure of the invention

[0007] According to the invention, a method for determining current data in a computer system, as well as a computing unit, a computer system, and a computer program for its execution, are proposed, comprising the features of the independent claims. Advantageous embodiments are the subject of the dependent claims and the following description.

[0008] According to the invention, the method for determining current data in a computer system where multiple providers supply data uses a (finite) set of marker elements on which a non-transitive relation is defined. Status variables are provided for each provider, containing entries or status values ​​for each marker element. The relative relationship between the data provision times is encoded in the status variables. By using a non-transitive relation, overflow states can be avoided, which can occur, for example, when using timestamps for which a transitive relation exists, allowing for arbitrarily long ascending or descending sequences. Therefore, any separate measures for handling overflow states are unnecessary.

[0009] The method for determining current data in a computer system is a computer-implemented method.

[0010] In general, one or more status variables can be provided. In the case of multiple status variables, each provider can have a separate status variable, which includes a status value assigned to each of the other providers. In the case of a single status variable, it is provided for all providers; that is, the same status variable is provided for each provider. This single status variable then includes a status value assigned to each provider. Status values ​​can generally (as a value) take the form of an element from the set of marker elements, i.e., a marker element.

[0011] A relation (more precisely, a binary relation) between two sets M and N can be formally defined as a subset R of the Cartesian product of the two sets, i.e., as R ⊆ M × N, where M × N = {(a,b)|a ∈ EM, b ∈ N}. To express how two elements relate to each other with respect to the relation, the following formulations are used: If for two elements a ∈ M, b ∈ N, (a,b) is contained in the subset R, i.e., if (a, b) ∈ R, then "a is related to b".

[0012] Otherwise, i.e., if (a, b) ∉ R holds, “a is not related to b”.

[0013] Similarly, the notation "a Rel b" is used, where the statement "a Rel b is true" means that "a is related to b", and the statement "a Rel b is false" means that "a is not related to b". This notation is also referred to as relation or relations between elements.

[0014] Referring to the above definition of a relation, in the present application the two sets are equal, i.e., M = N. Set M is used as a set of marker elements, which in principle encode the temporal relationship between the data provided by different providers and their respective provision times.

[0015] The relation used in the present application is not transitive, and for every marker element x ∈ M, there exists at least one other marker element y ∈ M such that x ∈ y is true and y ∈ x is false. A relation is not transitive if the statement (transitivity), "if x ∈ y and y ∈ z are true, then x ∈ z is true," is false. Therefore, for the relation used in the present application, there are at least three marker elements x, y, z ∈ M for which x ∈ y is true, y ∈ z is true, and x ∈ z is false (or z ∈ x is true).

[0016] A set on which a relation satisfying these conditions can be defined must contain at least three elements A, B, C, where, for example, the relations A rel C, B rel A, and C rel B are true, and all other relations between the elements are false. Preferably, the set has one more element than there are data providers.

[0017] The status variables can be stored in the computer system's memory, allowing, for example, the providers and / or the data processor to access them. Memory access to the status variables is primarily atomic.

[0018] A computer system is generally understood to be a system with at least one computing unit that has one or more execution units or processing cores, wherein the computer system has several execution units or processing cores and is designed to execute several computer program modules in parallel.

[0019] A computing unit according to the invention, e.g. a control unit of a machine or a motor vehicle, is, in particular in terms of programming, equipped to carry out a method according to the invention.

[0020] Implementing a method according to the invention in the form of a computer program or computer program product with program code for carrying out all method steps is also advantageous, as this incurs particularly low costs, especially if an executing control unit is already available for other tasks. Finally, a machine-readable storage medium is provided with a computer program stored on it as described above. Suitable storage media or data carriers for providing the computer program are, in particular, magnetic, optical, and electrical storage media, such as hard drives, flash memory, EEPROMs, DVDs, etc. Downloading a program via computer networks (Internet, intranet, etc.) is also possible. Such a download can be wired or wireless (e.g., via a WLAN network, a 3G, 4G, 5G, or 6G connection, etc.).

[0021] Further advantages and embodiments of the invention will become apparent from the description and the accompanying drawing.

[0022] The invention is schematically illustrated in the drawing using exemplary embodiments and is described below with reference to the drawing. Brief description of the drawings Fig. Figure 1 shows the sequence of events according to which data is made available in a computer system and decisions are made about its use. Fig. Figure 2 shows an exemplary flowchart corresponding to one embodiment. embodiment(s) of the invention

[0023] Fig. Figure 1 shows a time sequence according to which data is made available in a computer system and decisions are made regarding its use. Such a sequence can serve as the starting point for the invention.

[0024] The computer system consists, for example, of a processor with multiple processor cores C0, C1, C2, in which computer program modules or computer program tasks are executed. The processor cores could also be from different processors and / or different processing units.

[0025] Data is provided by two computer program modules running in processor cores C1 and C2. These computer program modules represent data providers P1 and P2, respectively, or data sources. The data is used by another computer program module running in processor core C0. This computer program module represents a data processor V. The providers P1 and P2, and the data processor V, can be computer program modules of application software that triggers the execution of the computer program modules, for example, cyclically.

[0026] In Fig. Figure 1 shows events from the computer program modules against time t. Provider P1 provides new data at time t1, and provider P2 provides new data at time t2. The provided data is typically stored in memory so that the data processor V can read it from memory when needed. However, the data processor cannot initially determine which data is newer. Therefore, if it only uses the most recent data, it must decide which provider last provided the data.

[0027] In principle, it would be possible to assign timestamps to the data; however, this could lead to overflow situations that would require separate handling to ensure the most recent data is unambiguously determined. This problem is avoided in the present invention by using a non-transitive relation.

[0028] Fig. Figure 2 shows an exemplary flowchart according to an embodiment of the invention.

[0029] It is assumed that there are N providers, with each provider i having its own status variable S. i It is intended that at least N - 1, or here for example N entries for status values ​​S, are to be entered. i [j] j-1,...N exhibits this, meaning that each entry can contain a marker element, or rather, each status value can be a marker element. The status variables S iThey can therefore be viewed as a status array or status vector. Each provider i has a status variable S. i for each of the other providers k ≠ i a status value S i [k] is assigned. The status variables are stored, for example, in a memory, whereby in particular every provider and every data processor can read the status variables (i.e., perform read operations on them) and every provider can at least modify its own status variable (i.e., perform write operations on it). Here and subsequently, the indices i, j, k are each integers in the range from 1 to N (1 ≤ i, j, k ≤ N).

[0030] As explained above, the marker elements form a set for which a relation is defined that is non-transitive and is defined such that for any marker element x, at least one other marker element y exists such that x rel y is true and y rel x is false.

[0031] In optional step 100, the status variables are first initialized. For this purpose, another marker element, referred to as the undefined marker element U, can be provided, whereby the relation to the set of marker elements that includes the undefined marker element U is continued such that every other marker element x is related to the undefined marker element U, i.e., for all marker elements x that are not equal to the undefined marker element U, the following holds true: x ∈ U.

[0032] Formally, referring to the above definition of a relation, this could be realized by choosing M ≠ N, specifically as M = N\{U} or N = MU {U}. Here, marking elements (including U) are considered to belong to the set N, and the condition that for a marking element x there exists at least one other marking element y such that x ∈ y and y ∈ x holds for marking elements x of the set M, (x ∈ EM).

[0033] During initialization, for each provider i, its status variable S is updated. i each status value S i [k], which is assigned to other providers k ≠ i, is assigned the undefined marker element U (S i[k] = U for all i,k such that i ≠ k). Other initialization methods can also be used. The undefined marker element U could also be omitted, for example, by initially performing the procedure without using data and only using data once the procedure has "steady down".

[0034] In step 110, new data is provided by a provider j (e.g., stored in a memory location). The status variable S is then updated if necessary. j of the provider who provides new data, changed so that for all k ≠ j (k ≠ j) the relation S j [k]Rel S k [j] is true and the relation S k [j]Rel S j[k] is false. If this condition is already met, the status variable does not need to be changed. The change, or step 110, can be performed in particular by the provider j, who provides new data. During the change, the corresponding status variable S j especially newly written to memory.

[0035] Step 110 is repeated continuously as soon as one of the providers provides new data. This is illustrated for, for example, four providers in the following table. In this case, separate status variables S are used. jThree marker elements, for example A, B, and C, are sufficient, for which the relations A rel C, B rel A, and C rel B are true, and the corresponding inverse relations C rel A, A rel B, and B rel C are false. Additionally, an undefined marker element U is used, for which the relations A rel U, B rel U, and C rel U are true. In the scheme described here, the order of the marker values ​​is "ABCABCABCABC...".

[0036] Each provider has its own separate status variable, containing entries (i.e., status values) for the other providers. The left column indicates which provider is supplying new data, with an initialization step. The four columns on the right list the status variables for providers 1, 2, 3, and 4, illustrating how these variables result from the action in the left column, provided the conditions mentioned above are met. The order of the rows, from top to bottom, corresponds to the chronological order in which the actions listed in the left column occur. The notation used is such that the status variable for each provider has four entries, corresponding sequentially to the four providers, with an underscore "_" in place of the entry for the provider for which the respective status variable is intended. writing provider S1 S2 S3 S4 initialization _UUU U_UU UU_U UUU_ 1 _AAA U_UU UU_U UUU_ 2 _AAA B_AA UU_U UUU_ 3 _AAA B_AA BB_A UUU_ 4 _AAA B_AA BB_A BBB_ 1 _CCC B_AA BB_A BBB_ 3 _CCC B_AA ABC BBB_ 2 _CCC A_CC ABC BBB_ 3 _CCC A_CC AA_C BBB_ 4 _CCC A_CC AA_C AAA_

[0037] In step 120, a data processor accesses data, with the aim of accessing the most recent data.

[0038] In step 125, it is first determined which provider last supplied data, whereby provider k is determined as the provider of the most up-to-date data if the relation S k [j]Rel S j [k] is true for all j ≠ k (j ≠ k). Step 125 can be performed in particular by the data processor itself.

[0039] In step 128, the data from provider k, who was identified in step 125 as having provided the most up-to-date data, is selected and used by the data processor. For example, the data from provider k is read from memory by the data processor and used in a data processing operation.

[0040] The above described a configuration in which each provider i has its own status variable S. i The entries, i.e. status values ​​S, are intended to i[k], for each of the other providers k ≠ i. Alternatively, a single status variable T can be used, which has one entry, i.e., one status value T[i], for each of the providers i. In step 110, if necessary (i.e., if the condition is not yet satisfied), the status variable T is changed so that for all k ≠ j (k ≠ j), the relation T[k]Rel T[j] is true and the relation T[j]Rel T[k] is false. For this, it suffices to change the status value T[j], if necessary. In step 125, the provider k is then determined analogously as the provider of the most up-to-date data if the relation T[j]Rel T[k] is true for all j ≠ k (j ≠ k). During initialization (step 100), if provided, the undefined marker element U is assigned to all entries or status values ​​T[i] of the status variable T.The number of different marking elements required may vary depending on the specific design.

[0041] Accesses (read and / or write accesses) to the status variables, i.e., to individual status variables or, more broadly, to the entire set of status variables, should be atomic, in particular to ensure a consistent state of the status variables. If non-atomic accesses, especially non-atomic write accesses, are permitted, it may occur that if two (or more) providers write to the status variables essentially simultaneously, thus providing new data essentially at the same time, the resulting state, characterized by the status variables, might not be uniquely resolvable, meaning that a provider of the most up-to-date data could not be uniquely selected. In this case (no unique selection possible), a random selection from the two (or more) providers could be made, which corresponds to the essentially simultaneous provision of new data by the providers.

[0042] The following table illustrates the procedure according to one embodiment of the invention for two providers P1 and P2. The notation "xy" is used for the states, where the first position x corresponds to the status variable S1 of provider P1, or indicates the status value S1[2] that is assigned to provider P2 in the status variable of provider P1, and the second position y corresponds to the status variable S2 of provider P2, or indicates the status value S2[1] that is assigned to provider P1 in the status variable of provider P2. In contrast to the previous table, the status variables S2 and S2 are not shown in separate columns, but are grouped together, which also corresponds to the status variable T.

[0043] As above, the three marker elements A, B, C are used, for which the relations A rel C, B rel A, and C rel B are true, and the corresponding inverse relations C rel A, A rel B, and B rel C are false. Additionally, an undefined marker element U is used, for which the relations A rel U, B rel U, and C rel U are true.

[0044] The first column shows the current state of providers P1 and P2. The second column shows the provider whose data, given the current state as defined in the first column, is considered the most up-to-date data, which would be selected, for example, by a data processor. The third column shows the next state that would be assumed, given the current state as defined in the first column, if provider P1 were to provide new data. The fourth column shows the next state that would be assumed, given the current state as defined in the first column, if provider P2 were to provide new data. current status of P1, P2 Data processor selects Next state if P1 provides new data Next state if P2 provides new data UU undecidable AU UA AU P1 AU AWAY UA P2 BA UA AWAY P2 CB AWAY BA P1 BA BC CB P1 CB CA BC P2 AC BC CA P2 BA CA AC P1 AC AWAY

[0045] The first and second columns show that, apart from the state UU, which corresponds, for example, to a state in which none of the providers have yet provided data and which is set, for example, during an initialization phase, it is always possible to unambiguously determine which provider last provided data. The first, third, and fourth columns show that when new data is added, only the status variable of the provider making the new data needs to be changed, if at all.

[0046] In the scheme described here, the sequence of marker values ​​is "ABCABCABCABC...". If, during an update, the provider supplying the new data already holds the most recent position, this remains unchanged. However, if they hold the older position, they change it to the next most recent position. The next most recent value is uniquely determined from the two existing values ​​according to: If A and B, then B becomes younger and B remains B or A becomes C; If B and C, then C is younger and C remains C or B becomes A; If C and A, then A becomes younger and A remains A, or C becomes B.

[0047] In the case of a single status variable T, N different marker elements can be used to uniquely order the data from N-1 providers chronologically. In the case of multiple status variables, fewer different marker elements are sufficient, e.g., three plus, if applicable, the undefined marker element.

Claims

[1] Method for determining current data in a computer system (C0, C1, C2) in which several providers (P1, P2) provide data, using a set of marking elements on which a non-transitive relation is defined, wherein for any first marking element there exists at least one other second marking element, so that the first marking element is in relation to the second marking element but the second marking element is not in relation to the first marking element; wherein for each provider (P1, P2) a status variable is provided which includes, at least for each other provider, a status value which is assigned to the respective other provider and which can accept a marking element; wherein, when one of the providers (P1, P2), which is referred to as the first provider, provides new data, the status variable of the first provider is changed (110) if necessary so that for each of the providers other than the first provider, which are referred to as second providers, the status value assigned to the second provider in the status variable of the first provider is related to the status value assigned to the first provider in the status variable of the second provider; wherein the data provided by one of the providers (P1, P2), which is referred to as the third provider, is determined (125) to be the most recent data if, for each of the providers other than the third provider, which are referred to as the fourth provider, the status value assigned to the fourth provider in the status variable of the third provider is related to the status value assigned to the third provider in the status variable of the fourth provider. [2] The method of claim 1, wherein a plurality of status variables are provided; wherein a separate one of the plurality of status variables is provided for each provider. [3] The method of claim 1, wherein a single status variable is provided including a status value for each provider; wherein the single status variable is provided for each of the providers. [4] Method according to one of the preceding claims, wherein the status variables are stored in a memory of the computer system. [5] Method according to claim 4, wherein accesses to the status variables are atomic. [6] Method according to one of the preceding claims, wherein the status variable is changed or updated by the first provider itself. [7] Method according to one of the preceding claims, wherein the providers (P1, P2) are computer program modules which are in the computer system and which are executed in parallel. [8] Method according to one of the preceding claims, wherein the determination (125) that the data provided by the third provider is the most current data is made by a data processor (V) in the computer system; and wherein the data processor uses the data provided by the third provider (128). [9] Method according to claim 8, wherein the data processor is a computer program task which is executed in the computer system, in particular, as far as dependent on claim 7, is executed in parallel to the providers. [10] Method according to one of the preceding claims, wherein an undefined marker element is provided to which every other marker element is related; wherein an initialization is carried out (100) in which the status values ​​in the status variables of all providers (P1, P2) are set to the undefined marker element. [11] Method according to one of the preceding claims, wherein the set of marking elements is finite, in particular contains one element more than the number of the plurality of providers (P1, P2). [12] Computing unit which is designed to execute several computer program modules in parallel and to carry out all method steps of a method according to one of the preceding claims. [13] Computer system comprising a plurality of communicatively connected computing units, each of which is configured to execute at least one computer program module configured to carry out all method steps of a method according to one of claims 1 to 11. [14] Computer program which causes a computing unit, which is designed to execute a plurality of computer program modules in parallel, to carry out all method steps of a method according to one of claims 1 to 11 when it is executed on the computing unit. [15] A machine-readable storage medium having stored thereon a computer program according to claim 14.

Citation Information

Patent Citations

  • Relative timestamp generation method, embedded system, electronic equipment and storage medium

    CN115033219A

  • Distributed timestamping in networks

    US20190036803A1

  • CN000115033219A