KR102284952B1 - Dynamic saving of registers in transactions - Google Patents

Dynamic saving of registers in transactions Download PDF

Info

Publication number
KR102284952B1
KR102284952B1 KR1020177003060A KR20177003060A KR102284952B1 KR 102284952 B1 KR102284952 B1 KR 102284952B1 KR 1020177003060 A KR1020177003060 A KR 1020177003060A KR 20177003060 A KR20177003060 A KR 20177003060A KR 102284952 B1 KR102284952 B1 KR 102284952B1
Authority
KR
South Korea
Prior art keywords
data
mask
subset
registers
preserved
Prior art date
Application number
KR1020177003060A
Other languages
Korean (ko)
Other versions
KR20170032339A (en
Inventor
매튜 제임스 호스넬
스테판 디에스텔호스트
Original Assignee
에이알엠 리미티드
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 에이알엠 리미티드 filed Critical 에이알엠 리미티드
Publication of KR20170032339A publication Critical patent/KR20170032339A/en
Application granted granted Critical
Publication of KR102284952B1 publication Critical patent/KR102284952B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • G06F9/467Transactional memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • G06F11/1451Management of the data involved in backup or backup restore by selection of backup contents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/30018Bit or string instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Abstract

데이터 처리장치는, 데이터를 각각 저장하는 복수의 데이터 저장소자를 구비한다. 마스크 저장회로는 마스크를 저장하고, 처리회로는 하나 이상의 명령어를 실행한다. 데이터 세이버는, 트랜잭션 시작 명령어에 응답하여, 상기 데이터 저장소자의 서브세트를 선택하여 이 서브세트의 백업을 보존한다. 그리고, 마스크 제어회로는, 상기 데이터 세이버에 의해 선택된 상기 데이터 저장소자의 서브세트를 표시하기 위해 상기 마스크를 갱신한다. 끝으로, 감시기는, 상기 마스크에 의해 표시되지 않은 상기 데이터 저장소자 중 하나에의 기록 또는 기록 시도를 검출한다.The data processing apparatus includes a plurality of data storage elements each storing data. The mask storage circuitry stores the mask, and the processing circuitry executes one or more instructions. The data saver, in response to a transaction start command, selects a subset of the data store members to keep a backup of the subset. The mask control circuitry then updates the mask to indicate the subset of the data storage elements selected by the data saver. Finally, the monitor detects a write or write attempt to one of the data repositories not indicated by the mask.

Figure R1020177003060
Figure R1020177003060

Description

트랜잭션에서의 레지스터의 동적 보존{DYNAMIC SAVING OF REGISTERS IN TRANSACTIONS}DYNAMIC SAVING OF REGISTERS IN TRANSACTIONS

본 개시는, 데이터 처리 분야에 관한 것이고, 특히 데이터 처리장치의 트랜잭션의 이용에 관한 것이다.BACKGROUND This disclosure relates to the field of data processing, and more particularly to the use of transactions in data processing devices.

멀티프로세서 시스템에서는, 각종 처리 디바이스간에 조정을 보장하는 것이 필요한 경우가 있다. 예를 들면, 프로세서 A와 프로세서 B 양쪽이 공유 자원(예를 들면, 개인의 은행 잔고의 값)을 10씩 감소시키려고 하는 상황을 생각해본다. 개인의 은행 잔고의 값이 초기에 100이고 정확히 처리되면, 상기 공유 값은 80(100-10-10)까지 감소되어야 한다. 그렇지만, 프로세서 A와 B 각각이 현재의 값을 동시에 가져오면, 상기 프로세서 각각은 동시에, 산출을 행하여 새로운 값(90)을 공유 메모리에 라이트 백(write back)하여도 된다. 따라서, 조정 부족으로 인해, 2개의 트랜잭션 중 하나가 나머지 트랜잭션에 의해 마스킹되어 있거나 겹쳐 써져 있다.In multiprocessor systems, it is sometimes necessary to ensure coordination between the various processing devices. For example, consider a situation where both processor A and processor B want to decrease a shared resource (eg, the value of an individual's bank balance) by 10. If the value of an individual's bank balance is initially 100 and processed correctly, the share value should be reduced to 80 (100-10-10). However, if each of the processors A and B simultaneously fetches the current value, each of the processors may simultaneously perform calculations and write back the new value 90 to the shared memory. Thus, due to lack of coordination, one of the two transactions is masked or overwritten by the other.

단일 실행 에이전트(프로세서 또는 스레드)만이 한 번에 공유 자원에 액세스할 수 있도록 보장하기 위해 록(lock)들을 사용하여도 된다. 상기 예를 생각하면, 유저의 은행 잔고는 공유 자원이어서, 하나의 프로세서만이 그 값을 한 번에 판독 및 수정할 수 있도록 보장하기 위해 그 데이터 값에 록이 적용되어도 된다. 정확히 기록되는 경우, 트랜잭션이 서로 겹쳐 써지는 것을 방지하고 상기 공유 자원에의 액세스가 에이전트 전부에 걸쳐 조정되도록 보장하는데 그 록들을 사용할 수 있다. 달리 말하면, 이것은, 하나의 에이전트가 구 버전의 공유 자원에 관해 연산을 행하는 상황을 방지하는데 도움이 된다. 록들을 사용하는 것에 대한 단점은, 보호되는 그래뉴래러티(granularity)의 레벨에 있다. 예를 들면, 연결 리스트를 생각해본다. 연결 리스트에서, 각 요소는 상기 리스트의 다음 요소에 데이터 값과 포인터를 제공한다. 다수의 에이전트가 상기 연결 목록에의 변경 액세스를 찾을 경우, 상기 요소들 중 하나가, 상기 리스트에서의 다음의 요소를 더 이상 가리키지 않는-상기 리스트에 의해 손상시키는 상황을 방지하도록, 상기 리스트에의 액세스를 잠그는 것이 바람직하다. 하나의 옵션은, 리스트 전체에 대해 잠그는 것이다. 그렇지만, 하나의 에이전트가 리스트의 헤드를 변경하고 싶고 다른 에이전트가 리스트의 꼬리를 변경하고 싶을 경우, 이 록은 불필요하게 제한적이다-2개의 에이전트로 이루어진 편집은 서로 간섭하기 쉽지 않다. 다른 옵션은, 상기 리스트의 개개의 요소마다 잠그는 것이다. 그렇지만, 이것은 큰 리스트일 경우에 다수의 록을 필요로 할 수도 있고, 이때 각 록은 메모리에서의 자신의 기억을 필요로 한다. 또한, 록들은 교착상태를 일으킬 수 있는 단점이 있다. 예를 들면, 록들에 의해 보호되는 2개의 공유 데이터 자원에 2개의 에이전트가 각각 액세스를 필요로 하고 그 2개의 에이전트의 각각이 그들 2개의 공유 데이터 자원 중 한쪽에 대해 록을 유지하는 경우, 상기 시스템은 교착상태에 들어간다. 달리 말하면, 어느 에이전트도 진행될 수 없고 다른 에이전트가 필요로 하는 록을 해제하기를 아주 오랜 시간 기다릴 것이다.Locks may be used to ensure that only a single executing agent (processor or thread) can access a shared resource at a time. Considering the above example, a user's bank balance may be a shared resource, so that a lock may be applied to the data value to ensure that only one processor can read and modify the value at a time. When recorded correctly, the locks can be used to prevent transactions from overwriting each other and to ensure that access to the shared resource is coordinated across agents. In other words, this helps to avoid situations where one agent is operating on an outdated version of a shared resource. The downside to using locks is the level of granularity that is protected. For example, consider a linked list. In a linked list, each element provides a data value and a pointer to the next element in the list. When multiple agents are looking for change access to the linked list, to prevent a situation where one of the elements no longer points to the next element in the list - corrupted by the list, It is desirable to lock the access of One option is to lock the entire list. However, if one agent wants to change the head of the list and the other agent wants to change the tail of the list, this lock is unnecessarily restrictive - two agent edits are not easy to interfere with each other. Another option is to lock each individual element of the list. However, this may require multiple locks in the case of large lists, where each lock requires its own storage in memory. Also, locks have the disadvantage of causing deadlocks. For example, if two agents each need access to two shared data resources protected by locks and each of the two agents maintains a lock on one of their two shared data resources, the system enters a deadlock state. In other words, neither agent can proceed and will wait a very long time for the other agent to release the lock it needs.

록들보다 트랜잭션들을 사용하는 것이 해결책의 하나다. 트랜잭션이 시작하면, 상기 프로세서는 특수 실행모드에 들어간다. 이 모드에 있는 동안, 상기 시스템은 판독과 기록을 추적한다. (예를 들면, 다수의 에이전트간에) 충돌이 있다고 판정한 경우, 그 에이전트들 중 하나는 중단되고 롤백(roll back) 된다, 예를 들면, 그것의 변화는 행해지지 않을 것이다. 충돌이 일어나지 않으면, 상기 에이전트들은 충돌이 행해질 때까지 계속하고, 그 때에 이루어진 변화들이 위임된다. 따라서, 트랜잭션이 단일의 원자적 연산으로서 취득되는 일련의 연산이라고 생각될 수도 있는 것은, 그 트랜잭션이 위임될 때까지(단일의 연산) 트랜잭션 전체가, 그 밖의 에이전트에 보이지 않고, 심지어 그 하나의 에이전트에 의해서만 롤링 백 함으로써 행해지지 않거나 되돌리지 않을 수도 있기 때문이다.One solution is to use transactions rather than locks. When a transaction starts, the processor enters a special execution mode. While in this mode, the system tracks reads and writes. If it determines that there is a conflict (eg, between multiple agents), one of those agents is aborted and rolled back, eg, its change will not be made. If a conflict does not occur, the agents continue until a conflict occurs, at which time changes made are committed. Thus, a transaction may be thought of as a series of operations that are acquired as a single atomic operation, that the entire transaction is invisible to other agents, even that one agent, until the transaction is committed (a single operation). This is because it may not be done or may not be reversed by rolling back only by

일부의 실시예에서, 트랜잭션을 행하는 것은, 모든 구조 레지스터가, 롤백일 경우에 그 레지스터들이 원래의 값으로 복원되기 위한 순서로 보존되어 있는 것을 필요로 할 수도 있다. 일부의 아키텍처는, 상당한 수의 레지스터를 구비하므로, 이러한 시스템에서는 그 레지스터들 전부의 값들을 보존하는 것이 필요할 수도 있다. 그렇지만, 이러한 접근법은 쓸데없을 수 있는데, 그 이유는 트랜잭션내에서 결코 변경되지 않는 데이터를 보존하는 것을 포함하기 때문이다. 이 경우에, 상기 데이터는 불필요하게 저장됨으로써, 상기 값들을 저장하기 위한 저장 공간과 그 데이터 값들을 물리적으로 복사하기 위한 시간을 소비한다. 또한, 롤백이 일어나면, 보존된 모든 레지스터들은 그들의 데이터 값들이 변경되지 않고 있을 경우에도 그들의 값들이 복원되어야 한다. 따라서, 롤백이 일어나면 상기 저장된 데이터 값들 전부를 복원할 때 시간을 더 낭비할 수도 있다. 추가로, 롤백일 경우에 그들의 저장된 데이터 값들 전부를 복원하는 것과 관련된 전력 소모도, 피하는 것이 바람직하다.In some embodiments, performing a transaction may require that all rescue registers be preserved in order for them to be restored to their original values in the event of a rollback. Since some architectures have a significant number of registers, in such a system it may be necessary to preserve the values of all of those registers. However, this approach can be useless because it involves preserving data that never changes within a transaction. In this case, the data is stored unnecessarily, thereby consuming a storage space for storing the values and time for physically copying the data values. Also, when a rollback occurs, all saved registers must have their values restored even if their data values have not changed. Accordingly, when rollback occurs, more time may be wasted when restoring all of the stored data values. Additionally, it is also desirable to avoid the power consumption associated with restoring all of their stored data values in the event of a rollback.

대안으로서, 트랜잭션 동안에 변경되는 그들의 레지스터를 유저 및/또는 컴파일러에 특정하게 하는 것이 가능하다. 이 경우에, 상기 특정된 레지스터들만이 보존되고, 그들의 레지스터들만이 롤백일 경우에 복원될 것이다. 그렇지만, 특별한 레지스터가 트랜잭션에서 사용될 것인가 아닌가를 항상 예측하는 것이 가능하지 않을 수도 있다. 예를 들면, 트랜잭션은 라이브러리 함수에 대한 하나 이상의 호출을 수반하여도 된다. 유저나 프로그래머는, 이러한 라이브러리 함수에 대해 거의 제어하지 않을 수도 있고, 그 라이브러리 함수가 어떻게 작용하는지를 볼 수 없을 수도 있다. 이러한 경우에, 유저는, 트랜잭션이 시작할 때 어느 레지스터가 보존되어야 하는지를 알 방법이 없다. 따라서, 유저는, 레지스터 전부를 보존해야 하거나, 그렇지 않으면 보존되지 않은 레지스터가 변경되기 때문에 롤백이 실패할 가능성으로 진행되어야 한다.As an alternative, it is possible to make their registers changed during a transaction user and/or compiler specific. In this case, only the registers specified above are preserved, and only those registers will be restored in case of a rollback. However, it may not always be possible to predict whether a particular register will be used in a transaction or not. For example, a transaction may involve one or more calls to library functions. Users or programmers may have little control over these library functions and may not be able to see how those library functions work. In this case, the user has no way of knowing which registers should be preserved when the transaction starts. Thus, the user must either preserve all of the registers, or go ahead with the possibility that the rollback will fail because otherwise the unsaved registers are being changed.

제1 구성 예에서 본 데이터 처리장치는, 데이터를 각각 저장하는 복수의 데이터 저장소자; 마스크를 저장하는 마스크 저장회로; 하나 이상의 명령어를 실행하는 처리회로; 트랜잭션 시작 명령어에 응답하여, 상기 데이터 저장소자의 서브세트를 선택하여 이 서브세트의 백업을 보존하는 데이터 세이버(saver); 상기 데이터 세이버에 의해 선택된 상기 데이터 저장소자의 서브세트를 표시하기 위해 상기 마스크를 갱신하는 마스크 제어회로; 및 상기 마스크에 의해 표시되지 않은 상기 데이터 저장소자 중 하나에의 기록을 검출하는 감시기를 구비한다.In the first configuration example, the data processing apparatus includes: a plurality of data storage elements each storing data; a mask storage circuit for storing the mask; processing circuitry for executing one or more instructions; a data saver that, in response to a transaction start command, selects a subset of the data store members and preserves a backup of the subset; mask control circuitry for updating the mask to indicate the subset of the data store elements selected by the data saver; and a monitor for detecting writes to one of the data storage elements that are not indicated by the mask.

제2 구성 예에 따른 데이터 처리장치는, 복수의 데이터를 저장하는 수단; 마스크를 저장하는 마스크 저장수단; 하나 이상의 명령어를 실행하는 처리수단; 트랜잭션 시작 명령어에 응답하여, 상기 복수의 데이터를 저장하는 수단의 서브세트를 선택하여 상기 복수의 데이터를 저장하는 수단의 상기 서브세트에 의해 저장된 데이터의 백업을 보존하는 데이터 보존수단; 상기 데이터 보존수단에 의해 선택된 상기 복수의 데이터를 저장하는 수단의 상기 서브세트를 표시하기 위해 상기 마스크를 갱신하는 마스크 제어수단; 및 상기 마스크에 의해 표시되지 않은 상기 복수의 데이터를 저장하는 수단 중 하나에의 기록을 검출하는 감시수단을 구비한다.A data processing apparatus according to a second configuration example includes: means for storing a plurality of data; mask storage means for storing the mask; processing means for executing one or more instructions; data preservation means for selecting a subset of means for storing the plurality of data in response to a transaction start command to preserve a backup of data stored by the subset of means for storing the plurality of data; mask control means for updating said mask to indicate said subset of means for storing said plurality of data selected by said data preservation means; and monitoring means for detecting writing to one of said plurality of data storing means not indicated by said mask.

제3 구성 예에 따른, 데이터를 저장하는 복수의 데이터 저장소자를 구비한 데이터 처리장치에서의 데이터 처리방법은, 트랜잭션 시작 명령어에 응답하여, 상기 데이터 저장소자의 서브세트를 선택하는 단계; 상기 데이터 저장소자의 상기 서브세트에 의해 저장된 데이터의 백업을 보존하는 단계; 상기 데이터 저장소자의 상기 서브세트를 표시하기 위해 마스크를 갱신하는 단계; 및 상기 마스크에 의해 표시되지 않은 상기 데이터 저장소자 중 하나에의 기록을 검출하는 단계를 포함한다.According to a third configuration example, there is provided a data processing method in a data processing apparatus having a plurality of data storage members for storing data, the method comprising: in response to a transaction start command, selecting a subset of the data storage members; maintaining a backup of the data stored by the subset of the data repository; updating a mask to indicate the subset of the data store members; and detecting a write to one of the data storage elements not indicated by the mask.

본 기술은 아래의 첨부도면에 나타낸 것과 같이 그 실시예들을 참조하여 예시로만 한층 더 설명한다:
도 1은 일 실시예에 있어서의 데이터 처리장치를 구비하는 시스템의 개요를 도시한 것이고;
도 2는 일 실시예에 있어서의 데이터 처리장치를 구성하는 부품들을 나타내는 회로도를 도시한 것이고;
도 3은 일 실시예에 있어서의 데이터 처리장치를 구성하는 부품들을 나타내는 회로도를 도시한 것이고;
도 4는 일 실시예에 따라 상기 데이터 처리장치를 사용하는 방법을 흐름도 형태로 도시한 것이고;
도 5는 트랜잭션의 시작에서 보존된 레지스터들의 세트를 선택하기 위해서 어떻게 발견법(heuristics)이 사용되는지를 나타내는 흐름도이다.
The present technology is further illustrated by way of example only with reference to embodiments thereof, as shown in the accompanying drawings below:
1 shows an overview of a system having a data processing device in one embodiment;
Fig. 2 is a circuit diagram showing components constituting the data processing apparatus in one embodiment;
Fig. 3 is a circuit diagram showing components constituting the data processing apparatus in one embodiment;
Fig. 4 shows in flow chart form a method of using the data processing apparatus according to an embodiment;
5 is a flow diagram illustrating how heuristics are used to select a set of preserved registers at the start of a transaction.

제1 구성 예에서 본 데이터 처리장치는, 데이터를 각각 저장하는 복수의 데이터 저장소자; 마스크를 저장하는 마스크 저장회로; 하나 이상의 명령어를 실행하는 처리회로; 트랜잭션 시작 명령어에 응답하여, 상기 데이터 저장소자의 서브세트를 선택하여 이 서브세트의 백업을 보존하는 데이터 세이버; 상기 데이터 세이버에 의해 선택된 상기 데이터 저장소자의 서브세트를 표시하기 위해 상기 마스크를 갱신하는 마스크 제어회로; 및 상기 마스크에 의해 표시되지 않은 상기 데이터 저장소자 중 하나에의 기록을 검출하는 감시기를 구비한다.In the first configuration example, the data processing apparatus includes: a plurality of data storage elements each storing data; a mask storage circuit for storing the mask; processing circuitry for executing one or more instructions; a data saver that, in response to a transaction start command, selects a subset of the data store members to keep a backup of the subset; mask control circuitry for updating the mask to indicate the subset of the data store elements selected by the data saver; and a monitor for detecting writes to one of the data storage elements that are not indicated by the mask.

트랜잭션이 시작될 것을 나타내는 트랜잭션 시작 명령에 응답하여, 상기 마스크 저장회로는, 상기 데이터 저장소자의 서브세트를 보존(백업)한다. 예를 들면, 이들 데이터 저장소자는, 데이터 처리장치에 있어서 레지스터들이어도 좋다. 이러한 데이터 저장소자도 레지스터 파일들, 섀도우 레지스터 파일들, 및 예를 들면 캐시들 및 내부 스크래치 패드 메모리들로 이루어진 각종 메모리 구성의 형태를 취하여도 된다는 것을 알 것이다. 그 후, 상기 데이터 저장소자의 어느 것이 보존되어 있는지를 표시하는 마스크가 저장된다. 여기서 "서브세트"의 단어는, 데이터 저장소자의 풀 세트의 "전체보다 작다"는 것을 의미하는데 사용된다는 것을 알아야 한다. 상기 트랜잭션시에, 상기 프로세서는, 하나 이상의 명령어를 실행한다. 감시기는, 상기 마스크에 의해 표시되지 않은 데이터 저장소자에의 기록 시도(즉, 보존 또는 백업되어 있지 않은 데이터 저장소자에의 기록 시도를 검출한다. 예를 들면, 감시기는, 상기 데이터 저장소자에 기록을 하게 하는 그들의 명령어들을 검사하여도 되거나, 상기 처리회로에 의해 상기 데이터 저장소자에 보내진 신호들을 차단하여도 된다. 이때, 본 명세서 전체에 걸쳐서, "기록"이란, 데이터 저장소자들에의 실제의 기록과, 상기 프로세서로부터 그들 데이터 저장소자에의 기록 요구와의 양쪽을 나타내기 위한 것이다. 이러한 기록 또는 기록 시도가 진행이 가능하게 되는 경우, 트랜잭션 메카니즘 자체가 실패하였을 것인데, 그 이유는 롤백이 가능하지 않기 때문이다(복원될 수 없는 데이터 저장소자에 기록이 이루어졌을 것이기 때문이다). 이 때문에, (상기 감시기에 의해) 상기 데이터 처리장치는, 그 기록을 검출할 수 있고, 적절한 경우 적절한 조치를 취하여도 된다. 따라서, 트랜잭션이 시작될 때마다 매 단일 레지스터마다 보존 또는 백업할 필요는 없고, 유저는 보존 또는 백업되어 있지 않은 데이터 저장소자에 기록 시도가 이루어지기 때문에 상기 트랜잭션 메카니즘이 실패할 가능성은 걱정하지 않아도 된다.In response to a transaction start command indicating that a transaction is to be started, the mask storage circuitry preserves (backs up) the subset of data stores. For example, these data storage elements may be registers in the data processing apparatus. It will be appreciated that such a data store may also take the form of various memory configurations consisting of register files, shadow register files, and, for example, caches and internal scratch pad memories. A mask is then stored indicating which of the data store members is preserved. It should be noted that the word "subset" is used herein to mean "less than the whole" of the full set of data store members. In the transaction, the processor executes one or more instructions. A monitor detects an attempt to write to a data store not indicated by the mask (i.e., an attempt to write to a data store that is not archived or backed up. For example, the monitor writes to the data store may check their instructions that cause the data to be stored, or it may block signals sent to the data store by the processing circuitry, where, throughout this specification, "write" It is intended to represent both a write and a write request from the processor to their data store.If such a write or write attempt were allowed to proceed, the transaction mechanism itself would have failed because a rollback is possible. This is because the data processing unit (by the monitor) is able to detect the record and, if appropriate, take appropriate action. Therefore, it is not necessary to preserve or back up every single register every time a transaction is started, and the user is concerned about the possibility that the transaction mechanism will fail because an attempt is made to write to a data store that is not preserved or backed up. You do not have to do.

상기 마스크에 의해 표시되지 않은 데이터 저장소자에의 기록 시도에 대한 검출에 응답하여 상기 데이터 처리장치에서 취한 조치는, 아래에 예를 든 다수의 다른 형태를 취하여도 되고, 이들은 분리 또는 조합시에 존재하여도 된다.Actions taken by the data processing device in response to detection of an attempt to write to a data repository not indicated by the mask may take a number of different forms, exemplified below, which exist in separation or combination. You can do it.

예를 들면, 데이터 처리장치는, 상기 마스크에 의해 표시되지 않은 데이터 저장소자 중 하나에의 기록을 금지하는 금지회로를 구비하여도 된다. 이러한 실시예에서는, 백업되어 있지 않은 데이터 저장소자에 기록 시도를 행하는 경우, 상기 기록을 행하는 시도는 그냥 차단되어도 된다. 이것은, 상기 감시기에 의해, 상기 프로세서가 발행한 기록 요구가 상기 데이터 저장소자에 도달하지 않음으로써 이루어져도 된다. 일부의 실시예에서, 상기 감시기도, 예를 들면 예외 처리 루틴을 실행함으로써, 상기 프로세서가 자신의 수정의 조치를 취하는 것을 가능하게 할 수도 있는 상기 기록 시도가 실패하였다는 것을 상기 프로세서에 신호를 보낼 수도 있다.For example, the data processing apparatus may include a prohibition circuit that prohibits writing to one of the data storage elements not indicated by the mask. In this embodiment, when an attempt is made to write to a data store that is not backed up, the attempt to write may simply be blocked. This may be done by the monitor by the fact that the write request issued by the processor does not reach the data store. In some embodiments, the monitor also signals the processor that the write attempt has failed, which may enable the processor to take its own corrective action, for example by executing an exception handling routine. may be

다른 예로서, 상기 데이터 처리장치는, 상기 마스크에 의해 표시된 데이터 저장소자를 백업으로부터 복원하는 복원기를 구비하여도 된다. 이에 따라, 백업되어 있지 않은 데이터 저장소자에 기록 시도를 하는 경우, 데이터 저장소자의 전부는 이전의 값들로 복원되어도 된다. 일부의 경우에, (예를 들면, 갱신회로로서 구체화된) 갱신기도, 상기 트랜잭션 시작 명령어나 오류 처리기를 표시하기 위해 프로그램 카운터를 갱신하여도 된다. 프로그램 카운터를 되돌리고 데이터 저장소자를 복원한 결과, 상기 트랜잭션의 풀(full) 롤백이 생긴다. 따라서, 상기 트랜잭션은 다시 시작하지 않으면 안될 수도 있다. 오류 처리기를 표시하기 위해 상기 프로그램 카운터를 변경함으로써, 특수 오류 처리 코드를 실행하는 것이 가능하다. 이것은, 진단정보를 출력하는데 사용될 수 있다.As another example, the data processing apparatus may include a restorer that restores the data storage element indicated by the mask from the backup. Accordingly, when an attempt is made to write to a data storage device that has not been backed up, all of the data storage device may be restored to previous values. In some cases, an updater (eg, embodied as an update circuit) may also update a program counter to indicate the transaction start instruction or an error handler. As a result of returning the program counter and restoring the data store, a full rollback of the transaction occurs. Therefore, the transaction may have to be restarted. By changing the program counter to indicate an error handler, it is possible to execute special error handling code. This can be used to output diagnostic information.

또 다른 예로서, 상기 마스크에 의해 표시되지 않은 상기 데이터 저장소자 중 하나에의 기록을 검출하는 것에 응답하여, 상기 감시기는 오류의 신호를 보내도록 구성되어도 된다. 예를 들면, 신호는 상기 프로세서에 보내져도 된다. 상기 프로세서는 이러한 상황을 처리하는 전용 서브루틴을 가질 수도 있다. 이와는 달리, 상기 프로세서는 예외의 신호를 보내도 되고, 소프트웨어 자체는 상기 상황을 처리하기 위해 예외 처리 루틴을 구비하여도 된다. 이것에 의해, 상기 트랜잭션으로 진행하는 방법에 관해 완전히 유연할 수도 있다. 예를 들면, 상기 트랜잭션이 이미 여러 번 실패하였을 경우, 상기 트랜잭션은 그냥 롤백되어 포기되어도 된다. 트랜잭션의 실패가 중요하지 않은 경우(예를 들면, 데이터 값들 자체가 중요하지 않은 경우), 상기 소프트웨어는 롤링 백 없이도 계속 가능하게 된다. 그 밖의 경우에, 상기 트랜잭션은, 롤백되어 다시 시작하지 않으면 안 될 수도 있고, 이 시간은 추가의 레지스터에 의해 보존된다.As another example, in response to detecting a write to one of the data storage elements not indicated by the mask, the monitor may be configured to signal an error. For example, a signal may be sent to the processor. The processor may have a dedicated subroutine to handle this situation. Alternatively, the processor may signal an exception, and the software itself may have an exception handling routine to handle the situation. This may allow complete flexibility as to how to proceed with the transaction. For example, if the transaction has already failed several times, the transaction may simply be rolled back and abandoned. If the failure of the transaction is not critical (eg, the data values themselves are not critical), the software will continue to work without rolling back. In other cases, the transaction may have to be rolled back and restarted, this time preserved by an additional register.

상기 데이터 저장소자는, 데이터 처리장치가 실시한 발견적(예를 들면 경험 기반) 분석에 근거하여 상기 데이터 세이버에 의해 선택되어도 된다. 특히, 발견법 또는 통계법을 사용함으로써, 상기 데이터 세이버는 보존(백업)될 그들 데이터 저장소자를 선택하여도 된다. 이러한 경우에, 그것은, 프로그래머가 백업되어야 하는 그들의 데이터 저장소자를 명시적으로 서술할 필요가 없어 그 프로그래머의 부담을 줄일 수도 있고, 프로그래머가 라이브러리들을 호출하고 있는 중일 때와 어느 데이터 저장소자에 백업되어야 하는지 프로그래머에게 분명하지 않은 경우의 사용에 적절할 수도 있다.The data storage member may be selected by the data saver based on a heuristic (eg, empirical) analysis performed by the data processing device. In particular, by using a heuristic or statistical method, the data saver may select those data stores to be preserved (backed up). In this case, it may reduce the burden on the programmer by not having to explicitly state which datastore the programmer should back up to, and to which datastore the programmer is calling the libraries and to which datastore they should be backed up. It may be appropriate for use in cases where it is not obvious to the programmer.

상기 발견적 분석은, 컴파일러에서 부연 설명한 데이터에 의존되어도 된다. 예를 들면, 컴파일시에, 상기 컴파일러는, 상기 데이터 세이버에 의해 어느 데이터 저장소자가 보존되어야 하는지를 판정하는데 사용될 수 있는 힌트(즉, 표시)를 제공할 수도 있다.The heuristic analysis may depend on the data described further by the compiler. For example, at compile time, the compiler may provide hints (ie indications) that can be used to determine which data stores should be preserved by the data saver.

발견적 분석은, 상기 하나 이상의 명령어와 관련된 호출 규약에 의존되어도 된다. 호출 규약은, 특별한 아키텍처에 좌우되어도 되고, 함수 호출에 있어서 호출자와 피호출자간에 데이터를 어떻게 교환해야하는지를 특정할 수도 있다. 특히, 호출 규약은, (예를 들면, 특별한 데이터 저장소자 도는 스택을 사용하여) 파라미터를 어떻게 통과시키는지와 결과를 어떻게 되돌리는지를 표시할 수도 있다. 이러한 정보는, 트랜잭션 시작 전에, 보존되어야 하거나 보존되어야 할 가능성이 높은 데이터 저장소자를 예측하는데 있어서 유용할 수 있다.Heuristic analysis may rely on calling conventions associated with the one or more instructions. The calling convention may depend on a particular architecture, and may specify how data should be exchanged between the caller and the callee in a function call. In particular, the calling convention may indicate how to pass parameters (eg, using a special data store or stack) and how to return results. Such information may be useful in predicting which data store(s) should or are likely to be preserved, prior to the start of a transaction.

상기 발견적 분석은, 상기 감시기가 상기 마스크에 의해 표시되지 않은 데이터 저장소자 중 하나에의 기록을 검출한 횟수에 의존되어도 된다. 예를 들면, 보존되어 있지 않은 레지스터들에의 기록의 결과로서, 트랜잭션을 반복적으로 롤백하는 경우, 보존하기 위해 상기 데이터 세이버에서 선택한 데이터 저장소자는, 또 다른 트랜잭션이 롤백할 기회를 감소시키려고 시도하기 위해서, 변동되어도 된다. 예를 들면, 선택되는 데이터 저장소자의 서브세트는, 상기 마스크에 의해 표시되지 않은 데이터 저장소자 중 하나에의 기록을 상기 감시기가 검출하는 것에 응답하여 증가되어도 된다. 예를 들면, 보존되어 있지 않은 데이터 저장소자에의 기록 시도를 상기 감시기가 검출할 때마다, 롤백이 일어날 수도 있고 추가의 레지스터가 이전의 반복과 비교하여 보존되어도 된다. 그 밖의 실시예에서는, 일어나는 롤백의 수를 제한하기 위해서, 보존되는 레지스터의 수를 보다 신속하게 증분할 수도 있다. 그렇지만, 이것은, 불필요하게 레지스터들을 보존할 위험이 증가되는 것에 대해 균형이 유지되어야 한다.The heuristic analysis may depend on the number of times the monitor has detected a write to one of the data repositories not indicated by the mask. For example, if a transaction is repeatedly rolled back as a result of writes to registers that are not preserved, the data store selected in the data saver to preserve may be used to attempt to reduce the chance that another transaction will roll back , may be changed. For example, the subset of data storage elements selected may be increased in response to the monitor detecting a write to one of the data storage elements not indicated by the mask. For example, whenever the monitor detects an attempt to write to a data store that is not preserved, a rollback may occur and additional registers may be preserved compared to previous iterations. In other embodiments, the number of registers kept may be incremented more rapidly to limit the number of rollbacks that occur. However, this must be balanced against an increased risk of preserving registers unnecessarily.

보존될 데이터 저장소자의 서브세트는, 서브세트 정의 명령어에 응답하여 상기 데이터 세이버에 의해 선택되어도 된다. 예를 들면, 유저는, 어느 데이터 저장소자가 보존되어야 하는지에 관한 "최선의 추정"을 제공하여도 된다. 이러한 접근법은, 어느 데이터 저장소자를 백업할 것인지를 판정하기 위한 초기의 시작점으로서 유용할 수도 있다. 이러한 접근법은, 유저가 호출중인 라이브러리의 작동 방식에 대한 지식을 취득하였을 경우 특히 유용할 수도 있다.The subset of data stores to be preserved may be selected by the data saver in response to a subset definition command. For example, the user may provide a "best estimate" as to which data store(s) should be preserved. This approach may be useful as an initial starting point for determining which data store to back up. This approach may be particularly useful if the user has gained knowledge of how the calling library works.

상기 데이터 저장소자는 복수의 레지스터이어도 된다.The data storage element may be a plurality of registers.

상기 감시기는 감시회로를 구비하여도 된다. 상기 감시회로는, 상기 프로세서에 의해 상기 데이터 저장소자에 발행된 신호들을 차단하여도 된다. 그 밖의 실시예에서, 상기 감시기는, 감시 소프트웨어에 의해 구현되어도 되고, 명령어에 의해, 상기 프로세서가 명령어를 실행하기 전에 보존되어 있지 않은(즉, 상기 마스크의 일부가 아닌) 데이터 저장소자에 기록시킬지를 판정하기 위해서 실행되는 명령어를 감시하여도 된다.The monitor may include a monitoring circuit. The monitoring circuit may block signals issued to the data storage element by the processor. In other embodiments, the monitor may be implemented by monitoring software, and causes the processor to write to a non-conserved (ie, not part of the mask) data store before executing the instruction. You may monitor the instruction being executed to determine

상기 데이터 세이버는, 데이터 보존회로, 즉, 상술한 데이터 보존 기능을 행하도록 구성된 특별한 회로를 구비하여도 된다. 그렇지만, 상기 데이터 세이버는, 명시적으로 데이터 저장소자에 의해 특별한 위치에 백업 또는 보존시키는 데이터 보존 소프트웨어에 의해 구현되어도 된다.The data saver may include a data saving circuit, that is, a special circuit configured to perform the data saving function described above. However, the data saver may be implemented by data retention software that explicitly backs up or preserves it to a special location by the data repository.

상기 데이터 세이버는, 데이터 저장소자의 서브세트의 로컬 캐시에의 백업을 보존하도록 구성되어도 된다. 로컬 캐시를 사용함으로써, 그 밖의 에이전트가 만든 변화들이 위임되는 시간까지 이 변화들을 분리시키는 것이 가능하다. 이것이 중요한 것은, 상기 변화들이 위임될 때까지, 그 밖의 에이전트가 그 변화들을 보지 않아야 하기 때문이다. 이러한 분리는, 로컬 캐시를 사용함으로써, 또한 그 밖의 프로세서가 검색하면 안 되어야 하는 것을 표시하기 위해 그 관련된 캐시 라인 엔트리에 대한 적절한 태그를 제공함으로써, 이루어질 수 있다.The data saver may be configured to keep a backup to a local cache of a subset of the data store member. By using a local cache, it is possible to isolate changes made by other agents by the time they are committed. This is important because, until the changes are committed, no other agent should see them. This separation can be achieved by using a local cache and by providing an appropriate tag for its associated cache line entry to indicate that it should not be retrieved by other processors.

일부의 실시예에서, 상기 마스크는 보존될 레지스터의 세트와 비보존될 레지스터의 세트와의 양쪽을 표시하고; 상기 데이터 저장소자는, 상기 보존될 레지스터의 세트에서 식별된 저장소자들을 포함하고 상기 비보존될 레지스터의 세트에서 식별된 저장소자들을 제외하여서 상기 데이터 세이버에 의해 선택된다. 이에 따라, 보존되지 않는 값들을 갖는 레지스터의 세트를 표시하는 것이 가능하다. 그렇지만, 그 레지스터들이 상기 마스크에 의해 그래도 표시되므로, 그 레지스터들에의 기록은 어떠한 특수한 작용에 의해서도 일어나지 않을 것이다. 이 때문에, 이러한 레지스터들은, 예를 들면 외부 세계와의 통신 목적에 사용될 수 있다.In some embodiments, the mask indicates both a set of registers to be preserved and a set of registers to be non-preserved; The data store members are selected by the data saver to include those identified in the set of registers to be preserved and to exclude those identified in the set of registers to be preserved. Accordingly, it is possible to mark a set of registers with values that are not preserved. However, since the registers are still marked by the mask, writing to the registers will not occur by any special action. Because of this, these registers can be used, for example, for communication purposes with the outside world.

도 1은, 각각의 프로세서 코어 100, 130을 각각 구비하고 그 프로세서 코어에 국한된 관련된 레지스터들의 세트를 각각 갖는, 2개의 데이터 처리장치(102, 104)로 이루어진 시스템을 도시한 것이다. 각 프로세서 코어 100, 130도, 로컬 캐시(110, 140)와 관련되어 있다. 달리 말하면, 한쪽의 프로세서 코어는 다른 쪽의 프로세서 코어와 관련된 상기 캐시에 접근하지 못할 수도 있다. 각 캐시 110, 140은, (일관성 목적을 위해) 서로와, 메모리 버스(150)를 통해 공유 메모리(120)와 통신하여도 된다. 상기 공유 또는 메인 메모리(120)는, 상기 프로세서 코어(100, 130)가 접근할 수 있는 하나 이상의 공유 데이터 구조체(공유 자원)를 구비한다. 각 프로세서 코어 100, 130이 메인 메모리(120)에 보유된 동일한 공유 데이터 구조체에 접근할 수 있으므로, 상기 시스템은, 상기 프로세서 코어간에 조정하고, 한쪽의 프로세서 코어에 의한 변경이 다른 쪽의 프로세서 코어에 의해 이루어진 변경에 의해 "겹쳐 써지는" 것을 방지하는데 도움이 되도록, 트랜잭션을 사용한다.Figure 1 shows a system comprising two data processing units 102, 104, each having a respective processor core 100, 130 and each having an associated set of registers localized to that processor core. Each processor core 100, 130 is also associated with a local cache (110, 140). In other words, one processor core may not have access to the cache associated with the other processor core. Each cache 110 , 140 may communicate with each other (for consistency purposes) and with shared memory 120 via memory bus 150 . The shared or main memory 120 includes one or more shared data structures (shared resources) that the processor cores 100 and 130 can access. Since each processor core 100, 130 can access the same shared data structure held in main memory 120, the system coordinates between the processor cores, and changes by one processor core to the other processor core. Transactions are used to help prevent being "overwritten" by changes made by

도 2는 프로세서 코어(100)의 일 실시예를 도시한 것이다. 처리회로(160)는, 데이터 처리 명령어들을 실행한다. 그 명령어들 중 하나는, 트랜잭션이 시작되는 것을 표시하는데 사용되어도 된다. 이러한 명령어를 수신하는 것에 응답하여, 상기 처리회로(160)는, 레지스터 파일(180)에 레지스터들의 서브세트(190)를 보존하기 위해 상기 데이터 보존회로(170)에 신호를 보낸다. 또한, 마스크(200)는, 상기 레지스터들의 서브세트(190)를 나타내기 위해 마스크 제어회로(210)에 의해 갱신된다. 본 예에서, 상기 서브세트(190)는, 레지스터 r0, r1 및 r2로 이루어진다. 이에 따라, 상기 마스크는, 11100000의 값을 포함하고, 이에 따라서, 상기 서브세트가 상기 레지스터 파일(180)에서 8개의 레지스터 중 첫 번째 3개의 레지스터로 이루어진 것을 표시한다. 물론, 큰 또는 다른 수의 레지스터로 이루어진 레지스터 파일에 있어서, 상기 레지스터 중 어느 것이 상기 데이터 보존회로(170)에 의해 보존된 상기 레지스터들의 서브세트를 구비하는지를 반영하도록, 상기 마스크의 크기는 적절하다는 것을 알 것이다. 또한, 프로세서 코어(100)는, 상기 처리회로(160)와 상기 레지스터 파일(180) 사이에 (기능적으로) 있는 감시회로(220)를 구비한다. 상기 감시회로(220)는 상기 처리회로(160)에 의해 상기 레지스터 파일(180)에 발행된 기록 요구들을 차단한다. 달리 말하면, 상기 처리회로(160)가 레지스터 파일(180)에서의 하나의 레지스터에 기록하기 위해 신호를 보내면, 우선, 이 신호는 상기 감시회로(220)에 의해 수신된다. 그리고, 상기 감시회로(220)는, 인버터(230)에 의해 상기 마스크9200)를 변환하여서 상기 데이터 보존회로에 의해 보존되지 않은 레지스터들의 세트와 비교한다. 상기 처리회로(160)에서 발행하고 감시회로(220)에서 수신된 기록 요구가 상기 데이터 보존회로(170)에 의해 보존된 레지스터들 중 하나에 대해 행해지지 않으면, 상기 감시회로는 반응한다. 예를 들면, 본 실시예에 있어서, 상기 감시회로는 상기 처리회로(160)에 경고 신호를 보낸다. 그렇지만, 상기 처리회로(160)에서 발행한 기록 요구(신호)가 상기 데이터 보존회로(170)에 의해 보존된 레지스터들 중 하나에 대해 행해지면, 그 요구는, 상기 기록을 완료하기 위한 순서로 상기 감시회로(220)에 의해 상기 레지스터 파일(180)에 진행되도록 허가될 수도 있다.2 illustrates one embodiment of a processor core 100 . The processing circuit 160 executes data processing instructions. One of those commands may be used to indicate that a transaction is starting. In response to receiving this instruction, the processing circuitry 160 signals the data preservation circuitry 170 to preserve the subset 190 of registers in the register file 180 . The mask 200 is also updated by the mask control circuit 210 to reveal the subset 190 of the registers. In this example, the subset 190 consists of registers r0, r1 and r2. Thus, the mask contains a value of 11100000, thus indicating that the subset consists of the first three of the eight registers in the register file 180 . Of course, for a register file of a large or different number of registers, it is important to note that the size of the mask is appropriate to reflect which of the registers has a subset of the registers preserved by the data preservation circuitry 170 . you will know In addition, the processor core 100 includes a monitoring circuit 220 (functionally) located between the processing circuit 160 and the register file 180 . The monitoring circuit 220 intercepts write requests issued to the register file 180 by the processing circuit 160 . In other words, when the processing circuitry 160 sends a signal to write to one register in the register file 180, first, this signal is received by the monitoring circuitry 220 . Then, the monitoring circuit 220 converts the mask 9200 by the inverter 230 and compares it with a set of registers not preserved by the data retention circuit. If a write request issued by the processing circuitry 160 and received by the monitoring circuitry 220 is not made to one of the registers reserved by the data retention circuitry 170, the monitoring circuitry responds. For example, in this embodiment, the monitoring circuit sends a warning signal to the processing circuit 160 . However, when a write request (signal) issued by the processing circuit 160 is made to one of the registers saved by the data retention circuit 170, the request is It may be allowed to proceed to the register file 180 by the monitoring circuit 220 .

일부의 다른 실시예에서, 상기 마스크는 비보존될(즉, 보존되지 않는) 레지스터들의 세트를 추가로 식별하여도 된다. 그렇지만, 이러한 레지스터들이 데이터 보존회로(170)에 의해 보존되지 않는 것은 이들 레지스터가 상기 마스크에 의해 그래도 식별되기 때문이고, 상기 감시회로(220)는, 이들 레지스터에 기록되면 반응하지 않는다. 이들 레지스터는, 백업되지 않지만, 일부의 특수한 작용을 실행하는(이를테면, 오류를 불러일으키는, 중단시키는, 또는 재시작하는) 상기 감시회로(170) 없이 기록될 수 있다. 이 때문에, 이 레지스터들은, 예를 들어 외부 세계에 대해 통신하는데 사용되어도 된다. 예를 들면, 중단 트랜잭션은, 왜 그 트랜잭션이 중단 중인지를 통신하기 위해 그 레지스터를 사용하여도 된다.In some other embodiments, the mask may further identify a set of registers to be non-preserved (ie, not preserved). However, the reason these registers are not preserved by the data retention circuitry 170 is that these registers are still identified by the mask, and the monitoring circuitry 220 does not respond when written to these registers. These registers are not backed up, but can be written to without the supervisor circuit 170 performing some special action (eg, causing an error, aborting, or restarting). To this end, these registers may be used, for example, to communicate to the outside world. For example, an aborting transaction may use the register to communicate why the transaction is aborting.

이들 실시예에서, 이 때문에, 하나의 레지스터는 3개의 상이한 경우 중 하나의 경우에 들어갈 수도 있다. 제1의 경우에, 상기 레지스터는 보존될 레지스터로서 상기 마스크에 의해 표시되어도 된다. 이러한 레지스터들은, 필요한 경우 백업되고 롤백될 수 있다. 제2의 경우에, 상기 레지스터는 상기 마스크에 의해 전혀 표시되지 않아도 된다. 이러한 레지스터가 트랜잭션시에 기록되면, 일부의 종류의 특수한 작용은 상기 감시회로(170)에 의해 시작되어도 된다. 예를 들면, 상기 트랜잭션은 중단하여도 되고, 상기 시스템은 재시작하여도 되거나, 오류가 생길 수도 있는 등이다. 제3의 경우에, 상기 레지스터는 비보존 레지스터인 것으로서 상기 마스크에 의해 표시되어도 된다. 이러한 레지스터들은, 백업되지 않고, 롤백될 수 없다. 그렇지만, 이러한 레지스터에 기록되면, 상기 감시회로(170)는 특수한 조치를 취하지 않는다.In these embodiments, because of this, one register may fit in one of three different cases. In the first case, the register may be indicated by the mask as a register to be preserved. These registers can be backed up and rolled back as needed. In the second case, the register need not be marked at all by the mask. When these registers are written in a transaction, some kind of special action may be initiated by the monitoring circuit 170 . For example, the transaction may be aborted, the system may be restarted, an error may occur, and the like. In the third case, the register may be indicated by the mask as being a non-preserved register. These registers are not backed up and cannot be rolled back. However, when these registers are written, the monitoring circuit 170 does not take any special action.

도 3은 프로세서 코어(100)와 로컬 캐시(110)로 이루어진 데이터 처리장치(102)의 일 실시예를 도시한 것이다. 이미 설명된 특징을 나타내는데 동일한 참조부호를 사용하고 있다.FIG. 3 shows an embodiment of a data processing device 102 including a processor core 100 and a local cache 110 . The same reference numerals are used to denote features that have already been described.

상기 설명한 실시예에서, 데이터 보존회로(170)는, 발견적 분석기(240)를 구비한다. 이 발견적 분석기는, 상기 로컬 캐시(110)에 보존 또는 백업되는 상기 레지스터들의 서브세트(190)의 선택에 있어서 상기 데이터 보존회로의 진행 중인 성공 또는 실패를 감시한다. 상기 서브세트(190)를 판정할 때 상기 발견적 분석기(240)에서 고려할 수도 있는 상이한 발견법 또는 통계법은 다수가 있다. 예를 들면, 본 실시예는, 상기 처리회로(160)에 의해 상기 서브세트(190)의 일부가 아닌 상기 레지스터 파일(180)에서의 하나의 레지스터에 기록하려는 시도를 상기 감시회로가 차단하는 횟수에 근거한 발견을 고려한다. 특히, 카운터(250)는, 상기 캐시에 보존되지 않는 상기 레지스터 파일(190)에서의 하나의 레지스터(즉, 상기 서브세트(190)의 일부가 아닌 하나의 레지스터)에 상기 처리회로(160)가 기록하려고 시도할 때마다 증분된다. 상기 데이터 보존회로(170)가 보존되어야 하는 상기 레지스터들을 결정할 때, 상기 카운터(250)의 값이 고려된다. 이렇게 하여, 보존되지 않은 상기 레지스터 파일(180)에서의 레지스터들에 기록하기 위해 상기 처리회로(160)에서 보다 많은 요구를 하기 때문에, 상기 데이터 보존회로(170)는 보다 큰 레지스터들의 서브세트를 보존하여서 응답할 수 있다.In the embodiment described above, the data preservation circuit 170 includes a heuristic analyzer 240 . This heuristic analyzer monitors the ongoing success or failure of the data preservation circuitry in the selection of the subset 190 of the registers to be preserved or backed up in the local cache 110 . There are many different heuristics or statistics that the heuristic analyzer 240 may consider when determining the subset 190 . For example, in this embodiment, the number of times the monitoring circuit blocks an attempt by the processing circuitry 160 to write to a register in the register file 180 that is not part of the subset 190 . Consider findings based on In particular, the counter 250 indicates that the processing circuitry 160 places a register in the register file 190 that is not kept in the cache (ie, a register that is not part of the subset 190). Incremented with each attempt to log. When the data retention circuit 170 determines which registers should be preserved, the value of the counter 250 is considered. In this way, the data preservation circuitry 170 preserves a larger subset of registers, as more requests are made to the processing circuitry 160 to write to the registers in the register file 180 that are not preserved. so you can respond.

또한, 상기 발견적 분석기(240)는, 상기 처리회로(160)에 의해 실행된 명령어들과 관련된 상기 호출 규약 등의 발견법을 생각할 수 있다. 호출 규약은, 함수 호출시에 호출자와 피호출자간에 데이터를 전달하는 방법과 방식을 좌우한다. 예를 들면, 상기 호출 규약은, 특별한 레지스터들의 조합을 사용하거나, 스택을 사용하여 파라미터들을 전달하는 것을 좌우한다. 마찬가지로, 상기 호출 규약은 어떻게 함수 호출의 결과가 되돌려지는지를 나타낼 수도 있다. 이 정보는, 상기 처리회로(160)에 의해 보다 기록될 가능성이 높은 레지스터들을 더 좋게 예측하기 위해서 사용될 수 있다. 예를 들면, 상기 호출 규약은 제1 파라미터가 항상 레지스터 r0을 사용하여 전달되는 것을 나타내는 경우, 상기 처리회로(160)에 의해 일부의 포인트에서 레지스터 r0가 기록될 가능성이 높을 가능성이 보다 높다. 따라서, 상기 발견적 분석기(240)는, 레지스터 r0가 항상 상기 선택된 서브세트의 일부를 형성해야한다고 결정할 수도 있다.In addition, the heuristic analyzer 240 may consider heuristics such as the calling convention associated with instructions executed by the processing circuit 160 . The calling convention governs how and how data is passed between the caller and the callee when a function is called. For example, the calling convention governs passing parameters using a special combination of registers, or using the stack. Likewise, the calling convention may indicate how the result of a function call is returned. This information can be used to better predict which registers are more likely to be written to by the processing circuitry 160 . For example, if the calling convention indicates that the first parameter is always passed using register r0, then it is more likely that register r0 will be written by the processing circuitry 160 at some point. Accordingly, the heuristic analyzer 240 may determine that register r0 should always form part of the selected subset.

상기 발견적 분석기에서 고려한 또 다른 발견의 예는, 소스 코드를 상기 처리회로(160)를 위한 명령어들로 컴파일링시에 상기 컴파일러에 의해 제공된 힌트들일 수도 있다. 상기 컴파일러가 소스 코드의 시인성을 가지므로, 상기 컴파일러는 데이터 보존회로(170)에 의해 보존되어야 하는 레지스터들의 양호한 표시를 제공하는 위치에 있어도 된다. 그렇지만, 이것이 항상 가능한 것이 아닌 것은, 소스 코드가 상기 컴파일러에 시인 가능하지 않은 라이브러리 또는 외부 코드 소스를 참조할 수도 있기 때문이라는 것을 주목한다. 이에 따라, 상기 컴파일러에서 제공한 힌트들은 항상 완전하지 않을 수도 있다.Another example of discovery considered by the heuristic analyzer may be hints provided by the compiler when compiling source code into instructions for the processing circuit 160 . Since the compiler has visibility of the source code, the compiler may be in a position to provide a good representation of the registers that should be preserved by the data retention circuitry 170 . Note, however, that this is not always possible because the source code may refer to a library or external code source that is not visible to the compiler. Accordingly, hints provided by the compiler may not always be complete.

마찬가지로, 컴파일링된 애플리케이션은, 상기 데이터 보존회로(170)에 의해 보존되지 않아야 하는 레지스터들을 표시할 수도 있다. 이것은, 상기 발견적 분석기(240)에 의해 모여진 발견법 또는 통계법을 무효로 하는데 사용되어도 되거나, 상기 데이터 보존회로(170)는 상기 컴파일링된 애플리케이션으로 표시한 것들을 제외한 레지스터 전부를 보존하도록 구성되어도 된다.Similarly, a compiled application may mark registers that should not be preserved by the data preservation circuitry 170 . This may be used to invalidate the heuristics or statistics gathered by the heuristic analyzer 240, or the data preservation circuitry 170 may be configured to preserve all registers except those marked by the compiled application.

여기서 명시적으로 언급되지 않지만 당업자에게 알려진 또 다른 예들을 포함하는 여러 가지의 다른 발견법은, 임의의 조합으로 상기 발견적 분석기(240)에서 생각할 수도 있다는 것을 알아야 한다. 또한, 상기 발견적 분석기(240)는, 보존되는 상기 레지스터들의 서브세트(190)에 관한 최종 결론을 생성하기 위해서 여러 가지의 방식으로 다른 발견법을 조합하여도 된다.It should be noted that many other heuristics are contemplated by the heuristic analyzer 240 in any combination, including still other examples not explicitly mentioned herein but known to those skilled in the art. The heuristic analyzer 240 may also combine different heuristics in a number of ways to produce a final conclusion regarding the subset 190 of the registers that are preserved.

감시 및 금지회로(320)는, 상기 처리회로(160)의 상기 레지스터 파일(180)에의 기록 시도를 감시하도록 제공된다. 상기 감시 및 금지회로(320)는, 상기 처리회로(160)로부터 상기 레지스터 파일(180)에 감시 기록 요구들뿐만 아니라, 상기 데이터 보존회로(170)에 의해 보존(백업)되지 않는 레지스터에 관계하는 상기 레지스터 파일(180)에 상기 처리회로(160)에 의해 보내진 신호도 금지되도록 구성된다. 달리 말하면, 이 신호는 무시되어 상기 레지스터 파일(180)에 보내지지 않는다.A monitoring and inhibiting circuitry 320 is provided to monitor an attempt by the processing circuitry 160 to write to the register file 180 . The monitoring and inhibiting circuitry 320 is configured to monitor and write requests from the processing circuit 160 to the register file 180 as well as registers that are not preserved (backed up) by the data retention circuit 170 . The signal sent by the processing circuit 160 to the register file 180 is also configured to be inhibited. In other words, this signal is ignored and not sent to the register file 180 .

추가로, 데이터 보존회로(170)에 의해 보존되지 않는 상기 레지스터 파일(180)에서의 일 레지스터에의 기록 요구를 검출하는 것에 응답하여, 상기 레지스터 파일(180)내에 유지된 프로그램 카운터(270)는, 갱신기(260)에 의해 갱신된다. 그 프로그램 카운터(270)는, 상기 처리회로(160)가 실행할 다음의 명령어를 표시하는데 사용된다. 이에 따라, 상기 갱신기(260)를 사용하여 프로그램 카운터(270)를 갱신함으로써, 상기 감시 및 금지회로(320)에 의해 상기 처리회로(160)가 상기 서브세트(190)의 일부가 아닌 레지스터에의 기록을 시도 중인 것을 검출하면 일 트랜잭션을 재시작하거나 그 트랜잭션 모두를 건너뛰는 것이 가능하다. 본 실시예에서, 데이터 복원회로(280)도, 상기 서브세트(190)의 일부가 아닌 레지스터에 기록을 시도하는 경우, 보존되어 있는 레지스터들이 상기 캐시로부터 복원되도록 제공된다. 달리 말하면, 백업된 상기 레지스터들은 원래의 값으로 리셋된다. 따라서, 상기 데이터 복원회로(280)와 상기 갱신기(260)에 의해, 롤백을 실시하는 것이 가능하다. 즉, 상기 감시 및 금지회로(320)에 의해 상기 처리회로(160)가 상기 서브세트(190)의 일부가 아닌(즉, 보존되어 있지 않은) 레지스터에의 기록을 시도 중인 것을 검출하는 것에 응답하여, 상기 기록 요구는 상기 감시 및 금지회로(320)에 의해 금지되고, 상기 프로그램 카운터(270)는 상기 갱신기(260)에 의해 상기 트랜잭션이 시작한 명령어의 값으로 리셋되고, 상기 데이터 복원회로(280)는 레지스터들의 서브세트(190)의 값들을, 트랜잭션이 시작한 시간에 그 레지스터들이 가졌던 값들로 복원한다. 달리 말하면, 데이터 처리장치의 상태는 그 트랜잭션이 시작한 포인트에 리셋된다. 다른 실시예에서, 상기 감시 및 금지회로(320)에 의해 상기 처리회로(160)가 상기 서브세트(190)의 일부가 아닌 레지스터에의 기록을 시도 중인 것을 검출하는 것에 응답하여, 상기 프로그램 카운터는 오류 처리 루틴을 참조하도록 갱신되어도 된다. 이러한 오류 처리 루틴은, 상기 서브세트(190)의 일부가 아닌 레지스터에의 기록을 시도할 때 행해지는 특수한 작용을 정의할 수도 있다.Additionally, in response to detecting a write request to a register in the register file 180 that is not preserved by the data retention circuitry 170, the program counter 270 maintained in the register file 180 is , is updated by the updater 260 . The program counter 270 is used to indicate the next instruction to be executed by the processing circuitry 160 . Accordingly, by using the updater 260 to update the program counter 270 , the monitoring and inhibiting circuitry 320 causes the processing circuitry 160 to write to a register that is not part of the subset 190 . It is possible to restart one transaction or skip all of it if it detects that it is trying to write In the present embodiment, the data recovery circuit 280 is also provided so that, when writing is attempted to a register that is not part of the subset 190, saved registers are restored from the cache. In other words, the backed up registers are reset to their original values. Accordingly, it is possible to perform rollback by the data recovery circuit 280 and the updater 260 . That is, in response to detecting by the monitoring and inhibiting circuitry 320 that the processing circuitry 160 is attempting to write to a register that is not part of the subset 190 (ie, not preserved). , the write request is inhibited by the monitoring and inhibiting circuit 320 , the program counter 270 is reset by the updater 260 to the value of the command that started the transaction, and the data recovery circuit 280 ) restores the values of the subset of registers 190 to the values they had at the time the transaction started. In other words, the state of the data processing unit is reset at the point at which the transaction started. In another embodiment, in response to detecting by the monitor and inhibit circuitry 320 that the processing circuitry 160 is attempting to write to a register that is not part of the subset 190, the program counter It may be updated to reference the error handling routine. This error handling routine may define special actions to be taken when an attempt is made to write to a register that is not part of the subset 190 .

도 4는 흐름도 형태로 일 실시예에 따라 트랜잭션들을 실행하는 방법을 도시한 것이다. 단계 S200에서는, 트랜잭션이 시작한다. 이것은, 상기 처리회로(160)가 트랜잭션 시작 명령어를 수신한 결과로서 일어날 수도 있다. 그렇지만, 상기 트랜잭션도, 특별한 조건을 만족하면 하드웨어에 의해 시작될 수도 있다. 단계 S210에서는, 상기 데이터 저장소자의 서브세트가 선택된다. 예를 들면, 상기 데이터 저장소자는, 레지스터 파일(180)에서의 레지스터들이어도 된다. 데이터 저장소자의 상기 세트를 선택할 수도 있는 방식은 많다. 이들을 선택하는 일 방식은, 도 5에 대해 나중에 설명할 발견법의 이용이다. 그렇지만, 상기 데이터 저장소자는 선택되고, 단계 S220에서는 백업을 한다. 일부의 예에서, 상기 백업은 상기 데이터 저장소자들의 값들을 캐시(110)에 기록하여서 이루어질 수도 있다. 그렇지만, 다른 형태의 데이터 저장도 마찬가지로 허용되어도 된다는 것을 알 것이다. 그 후, 마스크(200)는, 단계 S230)에서 보존되어 있는 데이터 저장소자의 서브세트를 반영하기 위해서 갱신된다. 그리고, 트랜잭션은 하나 이상의 명령어를 실행하는 상기 처리회로에 의해 진행된다. 상기 명령어들의 시퀀스 동안에 임의의 스테이지에서 상기 마스크에 의해 표시되지 않은 데이터 저장소자에 기록 또는 기록 시도를 하는 경우, 이를 단계 S240에서 검출하고, 단계 S250의 흐름으로 진행하여 일부의 조치를 행한다. 본 실시예에서는 오류의 신호가 보내진다. 그렇지만, 그 밖의 응답은 그 밖의 실시예에서 적절하거나 이용될 수도 있는 것을 알 것이다. 예를 들면, 프로그램 카운터(270)를 변경하는 것 및/또는 이전에 설명된 것처럼 데이터 저장소자의 서브세트의 값을 복원하는 것을 포함하는 롤백이 행해질 수도 있다. 당업자에 명백한 여러 가지의 다른 변경 또는 교정 조치가 취해질 수도 있다. 이와는 달리, 상기 데이터 처리장치가 상기 마스크에 의해 표시되지 않은 레지스터(즉, 보존 또는 백업되지 않은 레지스터)에의 기록을 검출하지 않으면, 상기 트랜잭션은 단계 S260에서 성공적으로 종료한다.4 illustrates, in the form of a flow diagram, a method of executing transactions according to one embodiment; In step S200, a transaction starts. This may occur as a result of the processing circuitry 160 receiving a transaction start command. However, the transaction may also be initiated by hardware if special conditions are satisfied. In step S210, a subset of the data store members is selected. For example, the data store may be registers in register file 180 . There are many ways in which the set of data store members may be selected. One way to select them is to use a heuristic, which will be described later with respect to FIG. 5 . However, the data storage device is selected, and a backup is performed in step S220. In some examples, the backup may be made by writing the values of the data stores to the cache 110 . However, it will be appreciated that other forms of data storage may likewise be permitted. The mask 200 is then updated to reflect the subset of data storage elements that are preserved in step S230. Then, the transaction proceeds by the processing circuitry executing one or more instructions. If, at any stage during the sequence of instructions, a write or write attempt is made to a data storage element not indicated by the mask, this is detected in step S240, and the flow proceeds to step S250 to perform some action. In this embodiment, an error signal is sent. However, it will be appreciated that other responses may be appropriate or used in other embodiments. A rollback may be done, including, for example, changing the program counter 270 and/or restoring the values of a subset of data stores as previously described. Numerous other changes or corrective actions apparent to those skilled in the art may be made. Alternatively, if the data processing device does not detect a write to a register not indicated by the mask (ie, a register that is not preserved or backed up), the transaction ends successfully in step S260.

도 5는 데이터 저장소자의 상기 서브세트를 선택할 때 발견법의 이용을 흐름도 형태로 도시한 것이다. 본 예에서, 상기 데이터 저장소자는, 레지스터 파일(180)의 일부를 형성하는 레지스터들이라고 생각된다. 상기 프로세서가 트랜잭션 시작 명령어를 실행할 때 단계 S100에서는 처리가 시작한다. 이에 따라 x의 초기값을 초기화 또는 세트시킨다. 본 예에서, x의 초기값은 발견법에 근거한다. 특히, x는, 처리회로(160)에 의해 보존 또는 백업되어 있지 않는 레지스터 파일(180)에서 일 레지스터에 발행되는 기록 요구의 결과로서 오류가 생길 때마다 증분되는 카운터에 관계된다. x의 값을 결정하였으면, x 레지스터들의 세트는 단계 S110에서 보존된다. 예를 들면, x 레지스터들의 세트(190)는 로컬 캐시(110)에 보존되어도 된다. x 레지스터들의 세트(190)는 처리회로(160)에 의해 실행된 명령어들의 호출 규약의 지식을 이용하여서 부분적으로는 결정된다. 특히, 상기 호출 규약은 r0로부터 r8까지의 오름차순으로 레지스터들을 사용하여 파라미터들과 리턴 결과들을 항상 전달하는 것을 나타내는 경우, 상기 발견법은, x 레지스터들의 세트가 레지스터 r0에서 시작하고 추가의 레지스터들은 x레지스터들이 추가될 때까지 순차로 추가된다고 결정할 수도 있다. 그 밖의 실시예에서, 다른 발견법은, 레지스터들의 세트가 어떻게 확장되는지를 판정하는데 사용되어도 된다. 상기 레지스터들이 보존되기 전 또는 후에, 마스크(200)는, 백업되어 있는 레지스터들의 세트를 반영하기 위해서 갱신된다. 단계 S120에서는 트랜잭션이 시작한다. 이 단계 동안에, 명령어들의 시퀀스는, 상기 처리회로(160)에 의해 실행되어도 된다. 그렇지만, 상기 트랜잭션이 위임(즉, 완료)될 때까지 언제라도, 단계 S110에서 보존된 레지스터들은 롤링 백에 의해 복원될 수 있다. 단계 S130에서는, 오류가 일어났는가 아닌가를 판정한다. 특히, 단계 S130은, 트랜잭션 동안에 임의의 스테이지에 있어서, 단계 S110에서 보존되었던 레지스터들의 서브세트(190)의 일부가 아닌 레지스터 파일(180)에서의 레지스터들 중 하나에 상기 처리회로(160)에 의해 기록을 시도하는지를 계속 시험한다. 이러한 오류는 상기 감시회로(220) 또는 상기 감시 및 금지회로(320)에 의해 생길 수도 있다. 상기 트랜잭션 동안에 이러한 시도를 하지 않으면, 상기 트랜잭션은 단계 S160에서 종료한다. 상기 트랜잭션의 종료는, 코드의 일 블록의 종료에 도달한 결과로서 암암리에 일어날 수도 있거나, 종료 트랜잭션 명령어로 명시적으로 일어날 수도 있다. 상기 트랜잭션이 종료할 때, 상기 레지스터들의 값들은, 그 밖의 프로세서 코어들이 새롭게 갱신된 값에 접근하여도 되도록 메인 메모리에 역으로 보존된다. 이와는 달리, 단계 S130에서 오류가 일어나는 경우, 단계 S140의 처리로 진행된다. 단계 S140에서는, x의 값을 1씩 증가시켜서, 비보존된 다음의 최고 레지스터를 보존시킨다.Figure 5 illustrates in flow chart form the use of heuristics in selecting said subset of data repositories. In this example, the data store is considered to be registers that form part of the register file 180 . When the processor executes the transaction start instruction, the process starts in step S100. Accordingly, the initial value of x is initialized or set. In this example, the initial value of x is based on heuristics. In particular, x relates to a counter that is incremented whenever an error occurs as a result of a write request issued to a register in register file 180 that is not saved or backed up by processing circuitry 160 . Having determined the value of x, the set of x registers is preserved in step S110. For example, the set 190 of x registers may be kept in the local cache 110 . The set of x registers 190 is determined in part using knowledge of the calling conventions of instructions executed by the processing circuitry 160 . In particular, if the calling convention indicates always passing parameters and return results using registers in ascending order from r0 to r8, the heuristic is that the set of x registers starts at register r0 and the additional registers are placed in the x register. may be determined to be added sequentially until they are added. In other embodiments, other heuristics may be used to determine how the set of registers is expanded. Before or after the registers are preserved, the mask 200 is updated to reflect the set of registers being backed up. In step S120, a transaction starts. During this phase, a sequence of instructions may be executed by the processing circuitry 160 . However, at any time until the transaction is committed (ie, complete), the registers saved in step S110 can be restored by rolling back. In step S130, it is determined whether or not an error has occurred. In particular, step S130 is performed by the processing circuitry 160 to one of the registers in register file 180 that, at any stage during the transaction, is not part of the subset 190 of registers that were preserved in step S110. Continue testing to see if you try to record. Such an error may be caused by the monitoring circuit 220 or the monitoring and inhibiting circuit 320 . If no such attempt is made during the transaction, the transaction ends in step S160. The end of the transaction may occur implicitly as a result of reaching the end of a block of code, or it may occur explicitly with an end transaction instruction. When the transaction ends, the values of the registers are kept back in main memory so that other processor cores can access the newly updated value. On the other hand, if an error occurs in step S130, the process proceeds to step S140. In step S140, the value of x is incremented by 1 to preserve the next highest register that is not preserved.

그 밖의 실시예에서, x는 1보다 많이 증분되어도 된다. 이것에 의해 상기 루프의 보다 적은 반복을 일으킬 수도 있다. 그렇지만, 그것은, 실제로 필요한 보존중인 보다 많은 레지스터들의 비용을 일으킬 수도 있다.In other embodiments, x may be incremented by more than one. This may result in fewer iterations of the loop. However, it may incur the cost of more registers being preserved, which are actually needed.

일부의 그 밖의 실시예에서, 잘못해서 접근된 레지스터(들)의 아이덴티티는, 다음에 상기 트랜잭션이 시작될 때 레지스터들이 구체적으로 보존되도록 기록되어도 된다. 단계 S140에서, 이것은, 예를 들면, 상기 마스크를 직접 변경하여서 이루어질 수도 있다.In some other embodiments, the identity of the erroneously accessed register(s) may be recorded such that the registers are specifically preserved the next time the transaction begins. In step S140, this may be done, for example, by directly changing the mask.

아무튼, 단계 S150에서는, 상기 트랜잭션이 중단된다. 본 실시예에서, 이것은, 상기 처리회로(160)가 상기 트랜잭션 시작 명령어를 실행하였을 때에 상기 갱신기(260)에 의해 상기 프로그램 카운터의 값으로 상기 프로그램 카운터(270)를 갱신시킨다. 추가로, 상기 레지스터들의 상기 세트(190)는 단계 S110의 이전의 실행에서 보존된 값들로 복원된다. 달리 말하면, 상기 트랜잭션은, 상기 트랜잭션이 처음부터 재시작되고 상기 레지스터들의 서브세트(190)의 값들은 상기 트랜잭션 시작 명령어가 수신되었을 때 레지스터들에 의해 유지된 값들로 복원될 것이라는 점에서, 롤백된다. 그후, 상기 트랜잭션이 다시 시작하는 경우 단계 S110의 흐름으로 진행되고, x 레지스터들의 세트는 한 번 더 보존된다.In any case, in step S150, the transaction is aborted. In this embodiment, this updates the program counter 270 with the value of the program counter by the updater 260 when the processing circuit 160 executes the transaction start instruction. Additionally, the set 190 of the registers is restored to values preserved in the previous execution of step S110. In other words, the transaction is rolled back in that the transaction is restarted from the beginning and the values of the subset of registers 190 will be restored to the values held by the registers when the transaction start command was received. Then, when the transaction starts again, the flow proceeds to step S110, and the set of x registers is preserved once more.

따라서, 전체 요약에서는 x 레지스터들의 세트를 초기에 추정한다는 것을 볼 수 있다. 그 후, 트랜잭션이 진행된다. 그렇지만, 레지스터들의 상기 서브세트(190)의 일부가 아닌 레지스터 파일(180)에서 레지스터에 상기 처리회로(160)에 의한 기록 시도가 이루어진 결과로서, 상기 트랜잭션이 실패하는 경우(즉, 상기 트랜잭션의 시작시에 보존되어 있지 않은 레지스터에 기록 시도가 이루어진 경우), 오류가 일어나고, 그 트랜잭션이 롤백되고, x 레지스터들의 상기 세트가 확장된다. 그 후, 상기 트랜잭션은 이러한 새로운 레지스터들의 세트에서 재시작된다. 이 처리는, 상기 트랜잭션이 단계 S160에서 성공적으로 종료할 때까지 진행되어도 된다. 따라서, 공지되지 않을 수도 있는 보존되어야 하는 레지스터들의 세트를 명시적으로 서술하거나, 구조적 레지스터들의 세트 전부를 보존할 필요는 없다.Thus, it can be seen in the overall summary that we initially estimate the set of x registers. After that, the transaction proceeds. However, if the transaction fails (ie, the start of the transaction) as a result of an attempt to write by the processing circuitry 160 to a register in a register file 180 that is not part of the subset 190 of registers. If an attempt is made to write to a register that is not preserved at time), an error occurs, the transaction is rolled back, and the set of x registers is expanded. The transaction is then restarted in this new set of registers. This processing may proceed until the transaction ends successfully in step S160. Thus, there is no need to explicitly describe the set of registers that should be preserved, which may not be known, or to preserve the entire set of structural registers.

여기에서는 본 발명의 실시예들을 첨부도면을 참조하여 상세히 설명하였지만, 본 발명은 이들의 구체적인 실시예들에 한정되지 않고, 첨부된 청구항에서 기재된 것과 같은 본 발명의 범위와 사상을 벗어나지 않고 당업자가 여러 가지로 변화, 추가 및 변경을 할 수 있다는 것을 알 것이다. 예를 들면, 본 발명의 범위로부터 벗어나지 않고 종속항의 특징들과 독립항의 특징들을 여러 가지로 조합할 수 있다.Although embodiments of the present invention have been described in detail with reference to the accompanying drawings, the present invention is not limited to the specific embodiments thereof, and those skilled in the art can use various methods without departing from the scope and spirit of the present invention as described in the appended claims. You will see that you can make changes, additions, and alterations to the branches. For example, various combinations of the features of the dependent claims and the features of the independent claims may be made without departing from the scope of the present invention.

Claims (22)

데이터를 각각 저장하는 복수의 데이터 저장소자;
마스크를 저장하는 마스크 저장회로;
하나 이상의 명령어를 실행하는 처리회로;
트랜잭션 시작 명령어에 응답하여, 상기 데이터 저장소자의 서브세트를 선택하여 이 서브세트의 백업을 보존하는 데이터 세이버;
상기 데이터 세이버에 의해 선택된 상기 데이터 저장소자의 서브세트를 표시하기 위해 상기 마스크를 갱신하는 마스크 제어회로; 및
상기 마스크에 의해 표시되지 않은 상기 데이터 저장소자 중 하나에의 기록을 검출하는 감시기를 구비하는, 데이터 처리장치.
a plurality of data storage elements each storing data;
a mask storage circuit for storing the mask;
processing circuitry for executing one or more instructions;
a data saver that, in response to a transaction start command, selects a subset of the data store members to keep a backup of the subset;
mask control circuitry for updating the mask to indicate the subset of the data store elements selected by the data saver; and
and a monitor for detecting writes to one of the data storage elements not indicated by the mask.
제 1 항에 있어서,
상기 마스크에 의해 표시되지 않은 데이터 저장소자 중 하나에의 기록을 금지하는 금지회로를 구비하는, 데이터 처리장치.
The method of claim 1,
and an inhibit circuit for inhibiting writing to one of the data storage elements not indicated by the mask.
제 2 항에 있어서,
상기 마스크에 의해 표시된 데이터 저장소자를 백업으로부터 복원하는 복원기를 구비하는, 데이터 처리장치.
3. The method of claim 2,
and a restorer for restoring the data storage element indicated by the mask from the backup.
제 3 항에 있어서,
상기 트랜잭션 시작 명령어나 오류 처리기를 표시하기 위해 프로그램 카운터를 갱신하는 갱신회로를 구비하는, 데이터 처리장치.
4. The method of claim 3,
and update circuitry for updating a program counter to indicate the transaction start command or an error handler.
제 1 항 내지 제 4 항 중 어느 한 항에 있어서,
상기 감시기는, 추가로, 상기 마스크에 의해 표시되지 않은 상기 데이터 저장소자 중 하나에의 기록을 검출하는 것에 응답하여, 오류의 신호를 보내도록 구성되는, 데이터 처리장치.
5. The method according to any one of claims 1 to 4,
wherein the monitor is further configured to signal an error in response to detecting a write to one of the data storage elements not indicated by the mask.
제 1 항 내지 제 4 항 중 어느 한 항에 있어서,
상기 데이터 저장소자는, 상기 데이터 처리장치가 실시한 발견적 분석에 근거하여 상기 데이터 세이버에 의해 선택되는, 데이터 처리장치.
5. The method according to any one of claims 1 to 4,
The data storage device is selected by the data saver based on a heuristic analysis performed by the data processing device.
제 6 항에 있어서,
상기 발견적 분석은, 컴파일러에 의해 부연 설명된 데이터에 의존하는, 데이터 처리장치.
7. The method of claim 6,
wherein the heuristic analysis relies on data amplified by a compiler.
제 6 항에 있어서,
상기 발견적 분석은, 상기 하나 이상의 명령어와 관련된 호출 규약에 의존하는, 데이터 처리장치.
7. The method of claim 6,
wherein the heuristic analysis relies on a calling convention associated with the one or more instructions.
제 6 항에 있어서,
상기 발견적 분석은, 상기 감시기가 상기 마스크에 의해 표시되지 않은 데이터 저장소자 중 하나에의 기록을 검출한 횟수에 의존하는, 데이터 처리장치.
7. The method of claim 6,
wherein the heuristic analysis is dependent on the number of times the monitor has detected a write to one of the data repositories not indicated by the mask.
제 1 항 내지 제 4 항 중 어느 한 항에 있어서,
선택된 상기 데이터 저장소자의 서브세트는, 상기 감시기가 상기 마스크에 의해 표시되지 않은 데이터 저장소자 중 하나에의 기록을 검출하는 것에 응답하여, 증가되는, 데이터 처리장치.
5. The method according to any one of claims 1 to 4,
and the selected subset of data storage elements is incremented in response to the monitor detecting a write to one of the data storage elements not indicated by the mask.
제 1 항 내지 제 4 항 중 어느 한 항에 있어서,
상기 데이터 저장소자의 서브세트는, 서브세트 정의 명령어에 응답하여 상기 데이터 세이버에 의해 선택되는, 데이터 처리장치.
5. The method according to any one of claims 1 to 4,
wherein the subset of data store members is selected by the data saver in response to a subset definition command.
제 1 항 내지 제 4 항 중 어느 한 항에 있어서,
상기 복수의 데이터 저장소자는 복수의 레지스터인, 데이터 처리장치.
5. The method according to any one of claims 1 to 4,
wherein the plurality of data storage elements are a plurality of registers.
제 1 항 내지 제 4 항 중 어느 한 항에 있어서,
상기 감시기는 감시회로를 구비하는, 데이터 처리장치.
5. The method according to any one of claims 1 to 4,
wherein the monitor comprises a monitoring circuit.
제 1 항 내지 제 4 항 중 어느 한 항에 있어서,
상기 감시기는 감시 소프트웨어에 의해 구현되는, 데이터 처리장치.
5. The method according to any one of claims 1 to 4,
wherein the monitor is implemented by monitoring software.
제 1 항 내지 제 4 항 중 어느 한 항에 있어서,
상기 데이터 세이버는 데이터 보존회로를 구비하는, 데이터 처리장치.
5. The method according to any one of claims 1 to 4,
and the data saver includes a data storage circuit.
제 1 항 내지 제 4 항 중 어느 한 항에 있어서,
상기 데이터 세이버는 데이터 보존 소프트웨어에 의해 구현되는, 데이터 처리장치.
5. The method according to any one of claims 1 to 4,
wherein the data saver is implemented by data retention software.
제 1 항 내지 제 4 항 중 어느 한 항에 있어서,
상기 데이터 세이버는 상기 데이터 저장소자의 서브세트의 로컬 캐시에의 백업을 보존하도록 구성되는, 데이터 처리장치.
5. The method according to any one of claims 1 to 4,
and the data saver is configured to maintain a backup to a local cache of a subset of the data store member.
제 1 항 내지 제 4 항 중 어느 한 항에 있어서,
상기 마스크는 보존될 레지스터의 세트와 비보존될 레지스터의 세트와의 양쪽을 표시하고;
상기 데이터 저장소자는, 상기 보존될 레지스터의 세트에서 식별된 저장소자들을 포함하고 상기 비보존될 레지스터의 세트에서 식별된 저장소자들을 제외하여서, 상기 데이터 세이버에 의해 선택되는, 데이터 처리장치.
5. The method according to any one of claims 1 to 4,
the mask indicates both a set of registers to be preserved and a set of registers to be non-preserved;
and the data store elements are selected by the data saver to include stores identified in the set of registers to be preserved and to exclude those identified in the set of registers to be preserved.
복수의 데이터를 저장하는 수단;
마스크를 저장하는 마스크 저장수단;
하나 이상의 명령어를 실행하는 처리수단;
트랜잭션 시작 명령어에 응답하여, 상기 복수의 데이터를 저장하는 수단의 서브세트를 선택하여 상기 복수의 데이터를 저장하는 수단의 상기 서브세트에 의해 저장된 데이터의 백업을 보존하는 데이터 보존수단;
상기 데이터 보존수단에 의해 선택된 상기 복수의 데이터를 저장하는 수단의 상기 서브세트를 표시하기 위해 상기 마스크를 갱신하는 마스크 제어수단; 및
상기 마스크에 의해 표시되지 않은 상기 복수의 데이터를 저장하는 수단 중 하나에의 기록을 검출하는 감시수단을 구비하는, 데이터 처리장치.
means for storing a plurality of data;
mask storage means for storing the mask;
processing means for executing one or more instructions;
data retention means for selecting a subset of means for storing the plurality of data in response to a transaction start command to preserve a backup of data stored by the subset of means for storing the plurality of data;
mask control means for updating said mask to indicate said subset of means for storing said plurality of data selected by said data preservation means; and
and monitoring means for detecting writing to one of said plurality of data storing means not indicated by said mask.
데이터를 저장하는 복수의 데이터 저장소자를 구비한 데이터 처리장치에서의 데이터 처리방법으로서,
트랜잭션 시작 명령어에 응답하여, 상기 데이터 저장소자의 서브세트를 선택하는 단계;
상기 데이터 저장소자의 상기 서브세트에 의해 저장된 데이터의 백업을 보존하는 단계;
상기 데이터 저장소자의 상기 서브세트를 표시하기 위해 마스크를 갱신하는 단계; 및
상기 마스크에 의해 표시되지 않은 상기 데이터 저장소자 중 하나에의 기록을 검출하는 단계를 포함하는, 데이터 처리방법.
A data processing method in a data processing apparatus having a plurality of data storage elements for storing data, the data processing method comprising:
in response to a transaction start command, selecting a subset of the data store members;
maintaining a backup of the data stored by the subset of the data repository;
updating a mask to indicate the subset of the data store members; and
and detecting a write to one of the data storage elements not indicated by the mask.
삭제delete 삭제delete
KR1020177003060A 2014-07-11 2015-06-11 Dynamic saving of registers in transactions KR102284952B1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
GB1412337.6A GB2528115B (en) 2014-07-11 2014-07-11 Dynamic saving of registers in transactions
GB1412337.6 2014-07-11
PCT/GB2015/051715 WO2016005723A1 (en) 2014-07-11 2015-06-11 Dynamic saving of registers in transactions

Publications (2)

Publication Number Publication Date
KR20170032339A KR20170032339A (en) 2017-03-22
KR102284952B1 true KR102284952B1 (en) 2021-08-03

Family

ID=51453986

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020177003060A KR102284952B1 (en) 2014-07-11 2015-06-11 Dynamic saving of registers in transactions

Country Status (8)

Country Link
US (1) US10678595B2 (en)
EP (1) EP3167367A1 (en)
JP (1) JP6637450B2 (en)
KR (1) KR102284952B1 (en)
CN (1) CN106537342B (en)
GB (1) GB2528115B (en)
IL (1) IL249563B (en)
WO (1) WO2016005723A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984457B (en) 2019-05-23 2022-09-02 华为技术有限公司 Method and device for updating storage information

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030028755A1 (en) 2001-07-12 2003-02-06 Nec Corporation Interprocessor register succession method and device therefor
US20070245099A1 (en) 2005-12-07 2007-10-18 Microsoft Corporation Cache metadata for implementing bounded transactional memory
JP2012064086A (en) 2010-09-17 2012-03-29 Fujitsu Ltd Information processor, and control method and control program for the same
US20130339688A1 (en) 2012-06-15 2013-12-19 International Business Machines Corporation Management of multiple nested transactions
US20130339642A1 (en) 2012-06-15 2013-12-19 International Business Machines Corporation Saving/restoring selected registers in transactional processing
US20140047205A1 (en) 2012-08-10 2014-02-13 International Business Machines Corporation Interaction of transactional storage accesses with other atomic semantics

Family Cites Families (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5210874A (en) * 1988-03-22 1993-05-11 Digital Equipment Corporation Cross-domain call system in a capability based digital data processing system
US5319395A (en) * 1990-05-16 1994-06-07 International Business Machines Corporation Pixel depth converter for a computer video display
US6006311A (en) * 1997-04-14 1999-12-21 Internatinal Business Machines Corporation Dynamic updating of repair mask used for cache defect avoidance
US6249824B1 (en) * 1998-12-12 2001-06-19 Joseph Reid Henrichs Magnetic data storage fixed hard disk drive using stationary microhead array chips in place of flying-heads and rotary voice-coil actuators
US6553443B1 (en) * 1999-09-28 2003-04-22 Legerity, Inc. Method and apparatus for prioritizing interrupts in a communication system
US6877089B2 (en) * 2000-12-27 2005-04-05 International Business Machines Corporation Branch prediction apparatus and process for restoring replaced branch history for use in future branch predictions for an executing program
US7050317B1 (en) * 2002-03-15 2006-05-23 Integrated Device Technology, Inc. Content addressable memory (CAM) devices that support power saving longest prefix match operations and methods of operating same
US6920532B2 (en) * 2002-11-05 2005-07-19 Newisys, Inc. Cache coherence directory eviction mechanisms for modified copies of memory lines in multiprocessor systems
KR100532325B1 (en) * 2002-11-23 2005-11-29 삼성전자주식회사 Input control method and apparatus for turbo decoder
US7500055B1 (en) * 2003-06-27 2009-03-03 Beach Unlimited Llc Adaptable cache for dynamic digital media
US20050120185A1 (en) * 2003-12-01 2005-06-02 Sony Computer Entertainment Inc. Methods and apparatus for efficient multi-tasking
US8549513B2 (en) * 2005-06-29 2013-10-01 Microsoft Corporation Model-based virtual system provisioning
US9529592B2 (en) * 2007-12-27 2016-12-27 Intel Corporation Vector mask memory access instructions to perform individual and sequential memory access operations if an exception occurs during a full width memory access operation
US8433883B2 (en) * 2009-06-11 2013-04-30 Cray Inc. Inclusive “OR” bit matrix compare resolution of vector update conflict masks
US9569254B2 (en) * 2009-07-28 2017-02-14 International Business Machines Corporation Automatic checkpointing and partial rollback in software transaction memory
GB2474522B (en) 2009-10-19 2014-09-03 Advanced Risc Mach Ltd Register state saving and restoring
US9081501B2 (en) * 2010-01-08 2015-07-14 International Business Machines Corporation Multi-petascale highly efficient parallel supercomputer
US9235251B2 (en) * 2010-01-11 2016-01-12 Qualcomm Incorporated Dynamic low power mode implementation for computing devices
US8756377B2 (en) * 2010-02-02 2014-06-17 Arm Limited Area and power efficient data coherency maintenance
US9002911B2 (en) * 2010-07-30 2015-04-07 International Business Machines Corporation Fileset masks to cluster inodes for efficient fileset management
JP5926373B2 (en) * 2012-05-07 2016-05-25 株式会社日立製作所 Computer system, storage management computer, and storage management method
US9400650B2 (en) * 2012-09-28 2016-07-26 Intel Corporation Read and write masks update instruction for vectorization of recursive computations over interdependent data
US9251073B2 (en) * 2012-12-31 2016-02-02 Intel Corporation Update mask for handling interaction between fills and updates
US9330026B2 (en) * 2013-03-05 2016-05-03 Qualcomm Incorporated Method and apparatus for preventing unauthorized access to contents of a register under certain conditions when performing a hardware table walk (HWTW)
US9223701B2 (en) * 2013-04-12 2015-12-29 Arm Limited Data processing apparatus and method for performing load-exclusive and store-exclusive operations
US9135984B2 (en) * 2013-12-18 2015-09-15 Micron Technology, Inc. Apparatuses and methods for writing masked data to a buffer
WO2015145190A1 (en) * 2014-03-27 2015-10-01 Intel Corporation Processors, methods, systems, and instructions to store consecutive source elements to unmasked result elements with propagation to masked result elements
CN105247618B (en) * 2014-04-30 2017-12-15 华为技术有限公司 A kind of hard disk performs the method and device of application code
CN104410849B (en) * 2014-10-21 2016-06-29 深圳市华星光电技术有限公司 Image processing method and device
US9804842B2 (en) * 2014-12-23 2017-10-31 Intel Corporation Method and apparatus for efficiently managing architectural register state of a processor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030028755A1 (en) 2001-07-12 2003-02-06 Nec Corporation Interprocessor register succession method and device therefor
US20070245099A1 (en) 2005-12-07 2007-10-18 Microsoft Corporation Cache metadata for implementing bounded transactional memory
JP2012064086A (en) 2010-09-17 2012-03-29 Fujitsu Ltd Information processor, and control method and control program for the same
US20130339688A1 (en) 2012-06-15 2013-12-19 International Business Machines Corporation Management of multiple nested transactions
US20130339642A1 (en) 2012-06-15 2013-12-19 International Business Machines Corporation Saving/restoring selected registers in transactional processing
US20140047205A1 (en) 2012-08-10 2014-02-13 International Business Machines Corporation Interaction of transactional storage accesses with other atomic semantics

Also Published As

Publication number Publication date
IL249563B (en) 2021-08-31
GB2528115A (en) 2016-01-13
CN106537342B (en) 2021-04-30
US10678595B2 (en) 2020-06-09
JP2017520851A (en) 2017-07-27
EP3167367A1 (en) 2017-05-17
CN106537342A (en) 2017-03-22
IL249563A0 (en) 2017-02-28
GB201412337D0 (en) 2014-08-27
US20170161112A1 (en) 2017-06-08
WO2016005723A1 (en) 2016-01-14
JP6637450B2 (en) 2020-01-29
KR20170032339A (en) 2017-03-22
GB2528115B (en) 2021-05-19

Similar Documents

Publication Publication Date Title
US10853071B2 (en) Simulation of exclusive instructions
US9513959B2 (en) Contention management for a hardware transactional memory
US8468526B2 (en) Concurrent thread execution using user-level asynchronous signaling
US7774636B2 (en) Method and system for kernel panic recovery
US20150154045A1 (en) Contention management for a hardware transactional memory
US8539465B2 (en) Accelerating unbounded memory transactions using nested cache resident transactions
CN106030522B (en) It is omitted using the lock of the processor based on binary translation
CN111133418B (en) Allowing non-aborted transactions after exception mask update instructions
CN104750459A (en) Processor With Transactional Capability and Logging Circuitry To Report Transactional Operations
GB2554096A (en) Handling of inter-element address hazards for vector instructions
KR20170031708A (en) Call stack maintenance for a transactional data processing execution mode
CN107003897B (en) Monitoring utilization of transaction processing resources
CN112334874A (en) Transaction compare and discard instructions
US8893137B2 (en) Transaction-based shared memory protection for high availability environments
TWI801603B (en) Data processing apparatus, method and computer program for handling load-exclusive instructions
US10671400B2 (en) Enhanced managed runtime environments that support deterministic record and replay
KR102284952B1 (en) Dynamic saving of registers in transactions
US11347539B2 (en) Checking lock variables for transactions in a system with transactional memory support
JP2022510763A (en) Equipment and data processing methods for transactional memory
JP2009230479A (en) Microprocessor
KR20200106915A (en) Commit window move element
Volckaert et al. Multi-Variant Execution of Parallel Programs

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant