IP Library Granted Patent US 10,120,712
Granted Patent B2
US 10,120,712 · App. 15/202,105 · Granted Nov 6, 2018

Instruction pre-fetching

Inventors: Stefan Singer (Vaterstetten, DE); Jochen M Gerster (Stuttgart, DE); Michael Rohleder (Unterschleissheim, DE)
Assignee: NXP USA, Inc.
G06F9/4881G06F9/38G06F9/3802G06F9/3814G06F9/3842G06F9/46G06F9/48G06F9/4806G06F9/4843G06F12/08G06F12/0862G06F9/461
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,120,712
App. No.
15/202,105
Granted
Nov 6, 2018
Kind
B2
Abstract

Pre-fetching instructions for tasks of an operating system (OS) is provided by calling a task scheduler that determines a load start time for a set of instructions for a particular task corresponding to a task switch condition. The OS calls, and in response to the load start time, a loader entity module that generates a pre-fetch request that loads the set of instructions for the particular task from a non-volatile memory circuit into a random access memory circuit. The OS calls the task scheduler to switch to the particular task.

Claims (37)

1. A method for pre-fetching instructions for tasks under the control of an operating system (OS), the method comprising:

calling, by the OS, a task scheduler in response to a task scheduler event, the task scheduler:

identifying a future task switch condition corresponding to a particular task and a task switch time;

accessing, in response to identifying the task switch condition, a task information queue to retrieve task information for the particular task; and

determining, based upon the task information and the task switch time, a load start time for a set of instructions for the particular task based on a load anticipation time for the set of instructions;

calling, by the task scheduler in response to the load start time, a loader entity module, the loader entity module generating, a pre-fetch request to load the set of instructions for the particular task from a non-volatile memory circuit into a random access memory circuit,

wherein the set of instructions includes less than all instructions in the particular task and less than all constant data for the particular task, and

wherein the loader entity module generates additional load anticipation times for additional sets of instructions for the particular task; and

switching, by the task scheduler and in response to the task switch time, to the particular task.

2. The method of claim 1 , wherein identifying the future task switch condition further comprises determining that a priority for the particular task is higher than a priority for other tasks in the task information queue.

3. The method of claim 1 , wherein identifying the future task switch condition further comprises: identifying an expiration time for a time slice; and determining that the particular task is assigned to a subsequent time slice.

4. The method of claim 1 , wherein determining, based upon the task information, the load start time for the particular task further comprises: determining an entire load anticipation time for the particular task as a function of a size of all instructions in the particular task and access time for the non-volatile memory circuit; and subtracting the entire load anticipation time from the task switch time to result in the load start time.

5. The method of claim 4 , further comprising determining the task switch time by selecting, as the task switch time, an earliest start time from a range of potential start times for the particular task.

6. The method of claim 5 , wherein the entire load anticipation time for the particular task includes the load anticipation time of the set of instructions for the particular task and the additional load anticipation times for additional sets of instructions for the particular task.

7. The method of claim 1 , wherein the OS is a real time OS that is executing on a processor core of an integrated circuit (IC) die and wherein the non-volatile memory circuit is a programmable read-only memory that is external to the IC die.

8. The method of claim 7 , wherein the task information queue includes task entries that specify a start address location and an end address location for the set of instructions in the non-volatile memory circuit, and task information used by the operating system.

9. The method of claim 1 , further comprising evicting, in response to the pre-fetch request, a resident set of instructions for another task from a first memory space within the random access memory circuit, and wherein the OS reserves a second memory space within the random access memory circuit for instructions that the loader entity module is not allowed to evict.

10. The method of claim 9 , wherein the instructions in the second memory space includes instructions for interrupt service routines.

11. The method of claim 1 , wherein the loader entity module is further configured to generate an additional pre-fetch request for each of the additional sets of instructions for the particular task.

12. A system comprising:

a computer processor circuit that is configured for pre-fetching instructions for tasks under the control of an operating system (OS) by executing code that causes the computer processor circuit to:

call, by the OS, a task scheduler in response to task scheduler events, the task scheduler configured to:

identify a future task switch condition corresponding to a particular task and a task switch time;

access, in response to identifying the task switch condition, a task information queue to retrieve task information for the particular task;

determine, based upon the task information and the task switch time, a load start time for a set of instructions for the particular task based on a load anticipation time for the set of instructions;

switch, in response to the task switch time, to the particular task; and

call, in response to the load start time, a loader entity module, the loader entity module configured to generate a pre-fetch request to load the set of instructions for the particular task from a non-volatile memory circuit into a random access memory circuit,

wherein the set of instructions includes less than all instructions in the particular task and less than all constant data for the particular task, and

wherein the loader entity module generates additional loan anticipation times for additional sets of instructions for the particular task.

13. The system of claim 12 , wherein the task scheduler is further configured to identify the future task switch condition by determining that a priority for the particular task is higher than other tasks in the task information queue.

14. The system of claim 12 , wherein the task scheduler is further configured to identify the future task switch condition by: identifying an expiration time for a time slice; and determining that the particular task is assigned to a subsequent time slice.

15. The system of claim 12 , wherein the task scheduler is further configured to determine the load start time for the particular task by: determining an entire load anticipation time for the particular task as a function of a size of all instructions in the particular task and access time for the non-volatile memory circuit; and subtracting the entire load anticipation time from the task switch time to result in the load start time.

16. The system of claim 15 , wherein the task scheduler is further configured to determine the load start time by selecting, as the task switch time, an earliest start time from a range of potential start times for the particular task.

17. The system of claim 12 , wherein the OS is a real time OS executing on a system on a chip (SoC) and wherein the non-volatile memory circuit is a programmable read-only memory that is external to the SoC.

18. The system of claim 17 , wherein the task information queue includes task entries that specify a start address location and an end address location for the set of instructions in the non-volatile memory circuit and task information used by the operating system.

19. The system of claim 12 , wherein the loader entity module is further configured to evict a resident set of instructions for another task from a first memory space within the random access memory circuit, and wherein the loader entity reserves a second memory space within of the random access memory circuit for a set of instructions that cannot be evicted by the loader entity module.

20. The system of claim 19 , wherein the set of instructions that cannot be evicted include instructions for interrupt service routines.

Assignments (3)
CORRECTIVE ASSIGNMENT TO CORRECT THE NATURE OF CONVEYANCE PREVIOUSLY RECORDED AT REEL: 040626 FRAME: 0683. ASSIGNOR(S) HEREBY CONFIRMS THE MERGER AND CHANGE OF NAME EFFECTIVE NOVEMBER 7, 2016. Recorded Jan 12, 2017
From: NXP SEMICONDUCTORS USA, INC. (MERGED INTO); FREESCALE SEMICONDUCTOR, INC. (UNDER)
To: NXP USA, INC.
Reel/Frame 041414/0883 →
CHANGE OF NAME Recorded Nov 16, 2016
From: FREESCALE SEMICONDUCTOR INC.
To: NXP USA, INC.
Reel/Frame 040626/0683 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 5, 2016
From: SINGER, STEFAN; ROHLEDER, MICHAEL; GERSTER, JOCHEN
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 039075/0979 →
Continuity (1)
Related Publication 20180011735A1 · Jan 11, 2018
Cited By (1)
US 12,503,741