IP Library Patent Application 11820422
Patent Application
App. No. 11/820,422

Switching user mode thread context

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 None
App. No.
11/820,422
Abstract

Various technologies and techniques are disclosed for switching user mode thread context. A user mode portion of a thread can be switched without entering a kernel by using execution context directly based on registers. Upon receiving a request to switch a user mode part of a thread to a new thread, user mode register contexts are switched, as well as a user mode thread block by changing an appropriate register to point at the user mode thread block of the new thread. Switching is available in environments using segment registers with offsets. Each user mode thread block in a process has a descriptor in a local descriptor table. When switching a user mode thread context to a new thread, a descriptor is located for a user mode thread block of the new thread. A shadow register is updated with a descriptor base address of the new thread.

Claims (28)

1 . A computer-readable medium having computer-executable instructions for causing a computer to perform steps comprising:

switch a user mode portion of a thread without entering a kernel by using an execution context that is directly based on a plurality of registers, with the switch comprising switching a user mode register context and a user mode thread block to a new thread.

2 . The computer-readable medium of claim 1 , wherein each particular user mode thread block in a particular process is given a descriptor in a local descriptor table.

3 . The computer-readable medium of claim 1 , further having computer-executable instructions for causing a computer to perform steps comprising: provide kernel fix-ups that ensure running kernel code has a consistent view of a currently active user mode thread block.

4 . The computer-readable medium of claim 3 , wherein a base address of the currently active user mode thread block is compared to a saved user mode thread block address.

5 . The computer-readable medium of claim 4 , wherein if the base address does not match the saved user mode thread block address, then a correct user mode thread block pointer for the currently active user mode thread block is inserted into a kernel mode data structure.

6 . The computer-readable medium of claim 1 , wherein the switching is performed upon receiving a request to switch the user mode part of the thread to the new thread.

7 . The computer-readable medium of claim 1 , wherein at least one of the registers is a segment register.

8 . The computer-readable medium of claim 1 , wherein the segment register uses offsets.

9 . A method for switching a user mode part of a thread comprising the steps of:

receiving a request to switch a user mode part of a thread to a new thread;

switching a plurality of user mode register contexts; and

switching a user mode thread block by changing an appropriate register to point at the user mode thread block of the new thread.

10 . The method of claim 9 , wherein the appropriate register is a segment register with offsets.

11 . The method of claim 10 , wherein the switching the user mode thread block stage comprises locating a descriptor for the user mode thread block of the new thread and updating a shadow register with a base address of the descriptor.

12 . The method of claim 11 , wherein after the switching the user mode thread block stage, any references will use the base address of the new thread.

13 . The method of claim 12 , wherein kernel fix-ups are applied to ensure any running kernel code has a consistent view of a currently active user mode thread block.

14 . The method of claim 13 , wherein a base address of the currently active user mode thread block is compared to a saved user mode thread block address.

15 . The method of claim 14 , wherein if the base address does not match the saved user mode thread block address, then a correct user mode thread block pointer for the currently active user mode thread block is inserted into a kernel mode data structure.

16 . A computer-readable medium having computer-executable instructions for causing a computer to perform the steps recited in claim 9 .

17 . A method for switching a user mode part of a thread in environments using segment registers with offsets comprising the steps of:

giving each user mode thread block in a process a descriptor in a local descriptor table;

receiving a request to switch a user mode part of a particular thread to a new thread;

locating a descriptor for a user mode thread block of the new thread; and

updating a shadow register with a descriptor base address of the new thread.

18 . The method of claim 17 , wherein each user mode scheduler process has a separate local descriptor table.

19 . The method of claim 17 , wherein by updating the shadow register, any references will use the base address of the new thread.

20 . A computer-readable medium having computer-executable instructions for causing a computer to perform the steps recited in claim 17 .

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 15, 2015
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034766/0509 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 27, 2007
From: KLEIN, MATTHEW D.; ENGLAND, PAUL
To: MICROSOFT CORPORATION
Reel/Frame 020290/0929 →