Methods and apparatus for context switching

US12288091B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-12288091-B2
Application numberUS-202117474568-A
CountryUS
Kind codeB2
Filing dateSep 14, 2021
Priority dateSep 14, 2021
Publication dateApr 29, 2025
Grant dateApr 29, 2025

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Aspects of the present disclosure relate to apparatus comprising execution circuitry comprising at least one execution unit to execute program instructions, and control circuitry. The control circuitry receives a stream of processing instructions, and issues each received instruction to one of said at least one execution unit. Responsive to determining that a first type of context switch is to be performed from an initial context to a new context, issuing continues until a pre-emption point in the stream of processing instructions is reached. Responsive to reaching the pre-emption point, state information is stored, and the new context is switched to. Responsive to determining that a context switch is to be performed to return from the new context to the initial context, the processing status is restored from the state information, and the stream of processing instructions is continued.

First claim

Opening claim text (preview).

We claim: 1. An apparatus comprising: execution circuitry comprising at least one execution unit to execute program instructions; and control circuitry configured to: receive a stream of processing instructions of an initial context; and issue each received instruction to one of said at least one execution unit, responsive to determining that a first type of context switch is to be performed from the initial context to a new context: continue issuing received instructions until a pre-emption point in the stream of processing instructions is reached; and responsive to reaching the pre-emption point: store state information associated with a current status of processing the stream of processing instructions; and switch to the new context, and responsive to determining that a further context switch is to be performed to return from the new context to the initial context: restore the processing status from the state information; and continue issuing the stream of processing instructions, wherein the control circuitry is: responsive to determining that a second type of context switch is to be performed from the initial context to the new context to: abort the issuing of the stream of processing instructions; and switch to the new context, responsive to determining that the further context switch is to be performed subsequent to the second type of context switch to return from the new context to the initial context: to begin issuing the stream of processing instructions, starting at an instruction corresponding to a safe restart point, wherein the safe restart point is a point from which the stream of processing instructions can be safely restarted; and configured to determine whether to perform the first type of context switch or the second type of context switch based on a magnitude of a difference between priority values of the initial context and the new context. 2. An apparatus according to claim 1 , wherein: the initial context is associated with a first processing task; and the new context is associated with a second processing task, the second processing task having a higher priority than the first processing task. 3. An apparatus according to claim 1 , wherein the control circuitry is configured to identify said pre-emption point by a pre-emption tag in the stream of processing instructions. 4. An apparatus according to claim 3 , wherein the pre-emption tag identifies a point in the stream of processing instructions with associated state information having a size below an average state information size. 5. An apparatus according to claim 1 , wherein the state information comprises at least one of: active data associated with the initial context; and a current state of the control circuitry. 6. An apparatus according to claim 1 , wherein the control circuitry is configured to store the state information as a state vector. 7. An apparatus according to claim 1 , wherein the safe restart point corresponds to a point having no pending processing results, corresponding to the stream, to be output to a storage. 8. An apparatus according to claim 7 , wherein the safe restart point is identified in the stream of instructions by a compiler annotation. 9. An apparatus according to claim 7 , wherein the safe restart point corresponds to the end of a processing subtask. 10. An apparatus according to claim 1 , wherein the control circuitry is configured to: determine that the context switch is to be performed from the initial context to the new context; and determine whether to perform the first type of context switch or the second type of context switch based on at least one of: a relative priority of the initial context and the new context; an expected time to completion of the initial context; and an expected execution time of the new context. 11. An apparatus according to claim 1 , wherein the control circuitry is configured to: determine that the context switch is to be performed from the initial context to the new context; determine a priority of the initial context; determine a priority of the new context; based on the difference between the priority of the new context and the priority of the initial context is less than a threshold, determine whether to perform the first type of context switch or the second type of context switch; and responsive to a time period passing without the context switch being performed, increase the priority of the new context. 12. An apparatus according to claim 1 , wherein the control circuitry is: responsive to determining that a third type of context switch is to be performed from the initial context to the new context to: continue issuing received instructions until a current processing subtask is completed; and responsive to completing the current processing subtask: store state information associated with a current status of processing the stream of processing instructions; and switch to the new context, and responsive to determining that a context switch is to be performed to return from the new context to the initial context: restore the processing status from the state information; and continue issuing the stream of processing instructions. 13. An apparatus according to claim 12 , wherein the control circuitry is configured to: determine that the context switch is to be performed from the initial context to the new context; and determine whether to perform the first type of context switch or the third type of context switch based on at least one of: a relative priority of the initial context and the new context; the magnitude of the difference between priority values of the initial context and the new context; an expected time to completion of the initial context; and an expected execution time of the new context. 14. An apparatus according to claim 12 , wherein the control circuitry is configured to: determine that the context switch is to be performed from the initial context to the new context; determine a priority of the initial context; determine a priority of the new context; based on the difference between the priority of the new context and the priority of the initial context is less than a threshold, determine whether to perform the first type of context switch or the third type of context switch; and responsive to a time period passing without the context switch being performed, increase the priority of the new context. 15. An apparatus according to claim 1 , comprising a storage, wherein the control circuitry is configured to store the state information in the storage. 16. An apparatus according to claim 1 , wherein the control circuitry is configured to determine that the context switch is to be performed based on a received context switch command. 17. A method comprising: receiving a stream of processing instructions of an initial context; issuing each received instruction to an execution unit; responsive to determining that a first type of context switch is to be performed from the initial context to a new context: continuing issuing received instructions until a pre-emption point in the stream of processing instructions is reached; and responsive to reaching the pre-emption point: storing state information associated with a current status of processing the stream of processing instructions; and switching to the new context; and responsive to determining that a further context switch is to be performed returning from the new context to the initial context: restoring the processing status from the state information; and con

Assignees

Inventors

Classifications

  • G06F9/3851Primary

    from multiple instruction streams, e.g. multistreaming · CPC title

  • Task life-cycle, e.g. stopping, restarting, resuming execution (G06F9/4881 takes precedence) · CPC title

  • Executing subprograms · CPC title

  • with instruction modification, e.g. store into instruction stream · CPC title

  • Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US12288091B2 cover?
Aspects of the present disclosure relate to apparatus comprising execution circuitry comprising at least one execution unit to execute program instructions, and control circuitry. The control circuitry receives a stream of processing instructions, and issues each received instruction to one of said at least one execution unit. Responsive to determining that a first type of context switch is to …
Who is the assignee on this patent?
Advanced Risc Mach Ltd
What technology area does this patent fall under?
Primary CPC classification G06F9/3851. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Apr 29 2025 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 3 related publications on this page (citations in our corpus or others sharing the same primary CPC).