Computer multi-tasking via virtual threading using an interpreter
First Claim
1. A method for operating a computer, comprising:
- storing in a computer memory a plurality of pseudocode instructions, at least some of said pseudocode instructions comprising a plurality of machine code instructions;
for each of a plurality of tasks or jobs to be performed by the computer, automatically creating a respective virtual thread of execution context data including (a) a memory location of a next one of said pseudocode instructions to be executed in carrying out the respective task or job and (b) the values of any local variables required for carrying out the respective task or job, a plurality of said tasks or jobs each entailing execution of a respective one of said pseudocode instructions comprising a plurality of machine language instructions;
processing each of said tasks or jobs in a respective series of time slices or processing slots under the control of the respective virtual thread; and
in every context switch between different virtual threads, undertaking such context switch only after completed execution of a currently executing one of said pseudocode instructions,wherein the creating of the virtual threads, the processing of said tasks or jobs in respective series of time slices or processing slots, and the undertaking of context switches all include the operating of the computer under an interpreter program.
6 Assignments
0 Petitions
Accused Products
Abstract
In the operation of a computer, a plurality of bytecode or pseudocode instructions, at least some of the pseudocode instructions comprising a plurality of machine code instructions, are stored in a computer memory. For each of a plurality of tasks or jobs to be performed by the computer, a respective virtual thread of execution context data is automatically created. The virtual threads each include (a) a memory location of a next one of the pseudocode instructions to be executed in carrying out the respective task or job and (b) the values of any local variables required for carrying out the respective task or job. At least some of the tasks or jobs each entails execution of a respective one of the pseudocode instructions comprising a plurality of machine language instructions. Each of the tasks or jobs are processed in a respective series of time slices or processing slots under the control of the respective virtual thread, and, in every context switch between different virtual threads, such context switch is undertaken only after completed execution of a currently executing one of the pseudocode instructions.
101 Citations
29 Claims
-
1. A method for operating a computer, comprising:
-
storing in a computer memory a plurality of pseudocode instructions, at least some of said pseudocode instructions comprising a plurality of machine code instructions; for each of a plurality of tasks or jobs to be performed by the computer, automatically creating a respective virtual thread of execution context data including (a) a memory location of a next one of said pseudocode instructions to be executed in carrying out the respective task or job and (b) the values of any local variables required for carrying out the respective task or job, a plurality of said tasks or jobs each entailing execution of a respective one of said pseudocode instructions comprising a plurality of machine language instructions; processing each of said tasks or jobs in a respective series of time slices or processing slots under the control of the respective virtual thread; and in every context switch between different virtual threads, undertaking such context switch only after completed execution of a currently executing one of said pseudocode instructions, wherein the creating of the virtual threads, the processing of said tasks or jobs in respective series of time slices or processing slots, and the undertaking of context switches all include the operating of the computer under an interpreter program. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. A method for operating a computer, comprising:
-
storing in a computer memory a plurality of pseudocode instructions, at least some of said pseudocode instructions comprising a plurality of machine code instructions; for each of a plurality of tasks or jobs to be performed by the computer, automatically creating a respective virtual thread of execution context data including (a) a memory location of a next one of said pseudocode instructions to be executed in carrying out the respective task or job and (b) the values of any local variables required for carrying out the respective task or job, a plurality of said tasks or jobs each entailing execution of a respective one of said pseudocode instructions comprising a plurality of machine language instructions; processing each of said tasks or jobs in a respective series of time slices or processing slots under the control of the respective virtual thread; and in every context switch between different virtual threads, undertaking such context switch only after completed execution of a currently executing one of said pseudocode instructions, wherein each of said virtual threads additionally includes a mutex, further comprising; setting the mutex of a selected one of said virtual threads; subsequently modifying data in said selected one of said virtual threads; and thereafter resetting or releasing the mutex to enable access to said selected one of said virtual threads. - View Dependent Claims (17, 18)
-
-
19. A method for operating a computer, comprising:
-
storing in a computer memory a plurality of pseudocode instructions, at least some of said pseudocode instructions comprising a plurality of machine code instructions; for each of a plurality of tasks or jobs to be performed by the computer, automatically creating a respective virtual thread of execution context data including (a) a memory location of a next one of said pseudocode instructions to be executed in carrying out the respective task or job and (b) the values of any local variables required for carrying out the respective task or job, a plurality of said tasks or jobs each entailing execution of a respective one of said pseudocode instructions comprising a plurality of machine language instructions; processing each of said tasks or jobs in a respective series of time slices or processing slots under the control of the respective virtual thread; and in every context switch between different virtual threads, undertaking such context switch only after completed execution of a currently executing one of said pseudocode instructions, wherein the tasks or jobs processed in respective series of time slices or processing slots under the control of the respective virtual threads include; controlling objects imaged on a computer display, each of said objects constituting a separate task or job assigned a respective one of said virtual threads; and monitoring actuation of keys on a computer keyboard, each of said keys constituting a separate task or job assigned a respective one of said virtual threads.
-
-
20. A multi-tasking computer comprising:
-
a memory; a display; an input peripheral; at least one processor operatively connected to said memory, said display, and said input peripheral, said processor having; a compiler for converting operator-entered source code instructions into bytecode or pseudocode instructions, said compiler being operatively linked to said memory for enabling the storage of said bytecode or pseudocode instructions therein; and an interpreter for executing said bytecode or pseudocode instructions, said memory storing a first linked list of idle virtual threads, a second linked list of active virtual threads, and a third linked list of queued or waiting virtual threads, each given one of said threads including context or state data, a mutex and a pointer to a next thread in the respective list in which said given one of said threads is listed, said interpreter being operatively connected to said input peripheral for recognizing an event generated by said input peripheral, said interpreter being operatively connected to said memory (a) for shifting at least one of said idle virtual threads from said first linked list to said third linked list, (b) for shifting queued or waiting virtual threads from said third linked list to said second linked list, (c) for executing said bytecode or pseudocode instructions according to context and state data of different virtual threads in said second linked list in successive time slices or processing slots pursuant to a predetermined priority schedule, for executing said bytecode or pseudocode instructions according to context and state data of different virtual threads in said second linked list in successive time slices or processing slots pursuant to a predetermined priority schedule, said interpreter being operatively connected to said display in part for modifying an object on said display in response to instructions specified by a respective active virtual thread in said second linked list associated with or assigned to said object. - View Dependent Claims (21, 22, 23, 24, 25, 26, 27, 28, 29)
-
Specification