Method and apparatus for implementing virtual threads

Electrical computers and digital processing systems: multicomput – Computer-to-computer data routing – Least weight routing

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C709S241000

Reexamination Certificate

active

06240440

ABSTRACT:

FIELD OF THE INVENTION
This application relates to a method and apparatus for spreading execution of a computer program among available computer resources and, particularly, to a method and apparatus for implementing virtual programming threads in the Java programming language.
BACKGROUND OF THE INVENTION
Many computing environments have resources that are not being completely used at all times. For example, a large corporation may have many PCs (personal computers), NCs (network computers), or other types of computers, computing devices, or computing resources that are networked together. These computing resources often sit idle for long periods of time (such as at night). What is needed is a way to use these available computing resources to solve computationally intensive problems, such as higher level mathematics functions or calculating a previous day's financial activity for the company.
The Java programming language is an object-oriented programming language. This means that all data and activity in a Java program are organized around the concept of “classes” and “interfaces”. A class contains data and methods that operate on that data. When a class implements an interface, the class defines the methods of the interface. Objects are created by creating instances of classes. Further details of Java, and of object-oriented programs in general, can be found in the following publications, both of which are herein incorporated by reference:
The Java Tutorial: Object
-
Oriented Programming for the Internet
by Mary Campione and Kathy Walrath, which is available in printed form and is also available at http://java.sun.com:80/docs/books /tutorial/index.html; and
The Java Language Specification
by James Gosling, Bill Joy, and Guy Steele, which is available in printed form and is also available at http://java.sun.com:80/docs/books/jls/html/index.html.
One class that exists in the Java programming language is the java.lang.Thread class. Threads are independent pieces of logic within a Java application or applet. (In this document, the term application is used for both applications and applets). Each thread executes in a single Java virtual machine. Although, more than one thread can be active at any one time in a virtual machine, a virtual machine generally is resident on one computer. Threads are described in more detail in Chapter 17 of the
Java Language Specification
, cited above. Conventional Java classes are discussed in more detail in the Java Development Toolkit (JDK), which is available in printed form and is also available at:
http:llwww.javasoft.com/products/jdk/1.1/docs/index.html.
The JDK is herein incorporated by reference.
SUMMARY OF THE INVENTION
The present invention overcomes the problems and disadvantages of the prior art by implementing a new class of objects: the virtual thread. A virtual thread can execute on the same computer as the application program that creates it or can execute on a different computing resource that is coupled to the computer executing the application program. A virtual thread acts just like a conventional thread and an application program generally accesses a virtual thread in the same way as it does a conventional thread. The virtual thread class uses a “remote thread” class that mimics the methods of the conventional java.lang.Thread class.
In a preferred embodiment of the present invention, a Virtual Thread Server object (VTS) maintains a list of available computing resources in a computing system. These computing resources represent the available PCs, NCs, etc. of the system that have registered themselves as having spare computer resources. Alternately, computing resources can also include resources such as extra printers, memory, etc. During execution of an application program, the application program instantiates a virtual thread in virtual thread class
112
. A resource request method requests a computing resource from the VTS. Once a resource is identified to the resource request method, the application program (more specifically, the current instance of the virtual thread) establishes a binding between itself and the available resource and passes an instance of a virtual runnable object to the available resource via a Remote Method Invocation (RMI) technique of Java. The computing resource then executes the virtual runnable object.
During the program design phase, whenever the designer would normally use a thread, he would instead use a virtual thread. Although the virtual runnable object associated with the thread executes on the system that was identified as an available resource, this fact is completely transparent to the application program. From the perspective of the application program, the virtual thread acts identically to a conventional thread. Application programs, however, must understand their environment and must be aware that not all computing resources are the same. For example, some computing resources may have disks or differing amounts of memory. Thus, while application programs cannot necessarily assume that all computing resources are the same, any application program that would normally use threads can make use of idle system resources by using the virtual thread class instead of the conventional thread class.
In accordance with the purpose of the invention, as embodied and broadly described herein, the invention relates to a method of implementing a virtual thread in a data processing system having at least a first virtual machine and a second virtual machine, comprising the steps, performed by at least one processor, of: instantiating, by an application program in the first virtual machine, a virtual thread as a virtual thread object; requesting, by a requesting method in the first virtual machine, a next available computing resource; receiving, by the requesting method, an identity of a next available computing resource; copying a virtual runnable object for the virtual thread to the next available computing resource; and executing the virtual runnable object on the second virtual machine, thus implementing the virtual thread.
In further accordance with the purpose of the invention, as embodied and broadly described herein, the invention relates to an apparatus that implements a virtual thread in a data processing system having at least a first computer and a second computer, comprising: a portion, in an application program in the first computer, configured to instantiate a virtual thread as a virtual thread object; a portion, in the virtual thread object in the first computer, configured to request a next available computing resource; a portion of the virtual thread object, configured to receive an identity of a next available computing resource; a portion configured to copy a virtual runnable object for the virtual thread to the next available computing resource; and a portion, on the second computer, configured to execute the virtual runnable object, thus implementing the virtual thread.
Advantages of the invention will be set forth in part in the description which follows and in part will be obvious from the description or may be learned by practice of the invention. The objects and advantages of the invention will be realized and attained by using the elements and combinations particularly pointed out in the appended claims and equivalents.


REFERENCES:
patent: 5179702 (1993-01-01), Spix et al.
patent: 5687373 (1997-11-01), Holmes et al.
patent: 5692193 (1997-11-01), Jagannathan et al.
patent: 5848293 (1998-12-01), Gentry
patent: 5899990 (1999-05-01), Maritzen et al.
patent: 6003065 (1999-12-01), Yan et al.
patent: 6052711 (2000-04-01), Gish
Glenn Krasner, “The Smalltalk-80 Virtual Machine”, BYTE Publications Inc., Aug. 1991, pp. 300, 302, 304, 306, 308, 310, 312, 314, 316, 317, 318, 320.
Ronald L. Johnston, “The Dynamic Incremental Compiler of APL/3000,” apl79 conference proceedings Part 1, APL Quote Quad, vol. 9, No. 4-Part 1, May 30 -Jun. 1, 1979, Rochester, New York, U.S.A., pp. 82-87.
Leo J. Guibas and Douglas K. Wyatt, “Compilation and Delayed Evaluation in APL,” Fifth Annual ACM

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method and apparatus for implementing virtual threads does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method and apparatus for implementing virtual threads, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and apparatus for implementing virtual threads will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2500851

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.