Abstract:
A system including a method employed by a dedicated processor for allocating resources to other processors with a multi-processor computing environment. The dedicated processor is dedicated only to providing resource allocation to the other processors. Specifically, a script file is provided to the dedicated processor, the script containing information related to the resources required by the other processors. The script file is parsed by the dedicated processor to determine the resources required by the second processor. Thereafter, the dedicated processor dynamically allocates the resources and synchronizes resource allocation at the time needed by the other processors.

Description:
COPYRIGHT NOTICE  
         [0001]    A portion of the disclosure recited in this application contains material which is subject to copyright protection. Specifically, a “computer program listing appendix” in accordance with 37 CFR Section 1.96 is included that lists source code instructions for a process by which the present invention is practiced in a computer system. The copyright owner has no objection to the facsimile reproduction of the specification as filed in the Patent and Trademark Office. Otherwise all copyright rights are reserved.  
         BACKGROUND OF THE INVENTION  
         [0002]    The present invention relates generally to the field of computer and information processing and more specifically to a system for predictably allocating computing resources within a multi-processor (as opposed to a single processor) computing environment.  
           [0003]    Conventional systems for allocating resources are generally known. Resource allocation issues arise in a broad range of industrial and technological areas such as routing of data in communication channels, inventory control and operation management for example. As used herein, resource allocation refers to allocation of memory and other processor resources within a multi-processor computing environment in order to optimize data transfer.  
           [0004]    The importance of resource allocation in multi-processor environments cannot be overemphasized. A demand for increased processing power provided by multiple-processor systems currently exists. In parallel computing for example, a plurality of processors are utilized for increased processing power. However, because availability is limited, the plurality of processors must share the limited computing resources. Without resource allocation between the various processors, problems of resource contention and deadlock could arise, virtually shutting down the computing system.  
           [0005]    Conventional systems for allocating memory in multi-processor systems are generally known to follow the paradigm in single processor environments. In an IRQ/ISR model for example, resource allocation is reactive. A task requiring a resource must request the resource before it is allocated. By way of example, a program desiring 100 k of memory buffer must typically request the memory from a processor. The request is then granted by the processor in conjunction with a memory controller. Disadvantageously, the processor must stop its current activity to service the request such that a bottleneck for data transfer is created. This static memory allocation scheme may significantly degrade performance in a multi-processor computing environment.  
           [0006]    This paradigm makes little or no sense in a multi-processor computing environment where tasks are executed in parallel such that a first process and a second process are run simultaneously by a first and a second processor, respectively. Sometimes the second processor may need to wait for results from the first processor in order to continue processing. At other times however, resource allocation occurs in a manner wherein although the first and second processors are independent of each other, each processor must request and thereafter await receipt of computing resources. Each processor is inhibited from beginning or continuing processing if there are no resources when needed. Only after the computing resources are allocated can further processing continue.  
           [0007]    Another disadvantage of conventional systems is that computing resources are typically allocated in advance of execution of the task that requests the computing resource. If memory space is required by the first processor, the memory space is immediately allocated even though it not needed until sometime later. In so far as the memory space is occupied prior to need and after execution, such prior resource allocation is wasteful as the space cannot be allocated to other processes. The memory space is only needed during execution of the program not before or after.  
           [0008]    A further disadvantage of conventional multi-processor system is that all of the processors in the system perform resource allocation services. This provides for inefficiency since in addition to other tasks to be performed, each processor is burdened with the responsibility of resource allocation.  
           [0009]    Therefore, there is a need to resolve the aforementioned disadvantages specific to multi-processor computing environments and the present invention meets this need.  
         BRIEF SUMMARY OF THE INVENTION  
         [0010]    According to a first aspect of the present invention, a system for allocating computing resources to other processors with a multi-processor computing environment is disclosed. A processor is dedicated to providing resource allocation services to the other processors within the multi-processor computing environment. A script file is provided to the dedicated processor, the script containing information related to the computing resources required by the other processors. Among other information, the script file is parsed by the dedicated processor to determine the resources required by the other processors and when the resources are required. Thereafter, the dedicated processor dynamically allocates the resources at the time needed by the other processors. Because the script file is provided, multiple processes can be synchronized, and each processor knows ahead of time which tasks can be performed without having to wait for another processor. Not only are resources dynamically allocated, resource allocation is synchronized with the time such resources are needed by the other processors.  
           [0011]    According to another aspect of the present invention, in a multi-processor computing environment, a method by a first processor for allocating resources for use by a second processor is disclosed. The method includes: (1) providing a script to the first processor, the script containing information related to the resources required by the second processor; (2) parsing the script to determine the resources required by the second processor; and (3) dynamically allocating the resources at the time needed by the second processor.  
           [0012]    According to another aspect of the present invention, the script further comprises information related to resources required by a third processor; and dynamically allocates the resources at the time needed by the third processor.  
           [0013]    According to another aspect of the present invention, a method by a processor for allocating resources for use by one or more tasks in a multi-processor computing environment is taught. The method includes the following: (1) providing a script to the processor, the script containing a map of sequences that will occur during execution of the one or more tasks; (2) parsing the script to determine resources required based on the map of sequences; and (3) allocating the resources immediately prior to execution of the task.  
           [0014]    According to another aspect of the present invention, a predictive resource allocation system for a multi-processor computing environment having two or more processors is disclosed. Among other components, the system includes a first processor; a dedicated processor dedicated to providing resource allocation to the first processor; a script file containing information related to the resources required by the second processor; a script engine for running the script file; the dedicated processor in conjunction with the script engine parses the script file to determine the resources required by the second processor; and the dedicated processor dynamically allocating the resources at the time needed by each processor.  
           [0015]    According to another aspect of the present invention, the script further comprises information related to resources required by a third processor; and the dedicated processor dynamically allocating the resources at the time needed by the third processor.  
           [0016]    According to another aspect of the present invention, a method by a processor for allocating resources for use by two or more tasks in a multi-processor computing environment is disclosed. The method includes: (1) providing a script to the processor, the script containing a map of sequences that will occur during execution of the tasks; (2) parsing the script to determine the map of sequences for the tasks and to determine the resources required by the tasks; and (3) allocating the resources to the tasks such that resource allocation is synchronized with when the resources are needed by tasks.  
           [0017]    Advantageously, unlike conventional multi-processor systems wherein all processors may undertake resource allocation, a dedicated processor is solely dedicated to resource allocation and to the task of parsing and interpreting the contents of the script file. Because a script file is provided, multiple processes can be coordinated, and each processor knows which task can be performed without having to wait for the another processor. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0018]    [0018]FIG. 1 is a multi-processor environment in which predictive allocation of resources may be employed in accordance with a first embodiment of the present invention.  
         [0019]    [0019]FIG. 2 is a flow chart of a method employed by a dedicated processor for allocating resources for use by other processors within the multi-processor computing environment of FIG. 1 in accordance with one embodiment of the present invention.  
         [0020]    A further understanding of the nature and advantages of the present invention herein may be realized by reference to the remaining portions of the specification and the attached drawings. Further features and advantages of the present invention, as well as the structure and operation of various embodiments of the present invention, are described in detail below with respect to the accompanying drawings. In the drawings, the same reference numbers indicate identical or functionally similar elements. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0021]    [0021]FIG. 1 is a multi-processor environment  100  in which predictive allocation of resources may be implemented in accordance with a first embodiment of the present invention.  
         [0022]    As implied by its name, multi-processor environment  100  includes, among other components, one or more processors namely a dedicated processor  102  for controlling a script engine  104 ; the script engine  104  for processing a script file  106 ; a first processor  110  for executing two processes namely process  110 A and process  116 A; and a second processor  114  for executing a process  114 A. Processes  110 A,  114 A and  116 A are part of a single application for execution within multi-processor environment  100 .  
         [0023]    Other components of multi-processor environment  100  includes a memory  108  which is an example of a resource which may be allocated and a communication bus  116 . Although not shown, one of ordinary skill in the art will realize that various other resources such as matrix configuration, queue length, priority, etc may be allocated as proves necessary according to the precepts and principles of the present invention.  
         [0024]    In operation, a programmer wishing to allocate resources related to the application initially provides a script file  106  to dedicated processor  102 . Advantageously, unlike conventional multi-processor systems wherein all processors may undertake resource allocation, dedicated processor  102  is solely dedicated to resource allocation and to the task of parsing and interpreting the contents of script file  106 . In one embodiment, script file  106  contains a description of the execution sequence of the application and a list of its corresponding resources, when they are required and when such resources are releasable. On parsing script file  106 , dedicated processor  102  becomes privy to the execution sequence and list of resources of the application ahead of its execution. In this manner, the present invention, permits assignment of resources ahead of need and releases them when no longer in use. Although not shown, one of ordinary skill in the art will realize that techniques other than a script file for predictably determining the needs of the multiple processors can be employed. For example, an object-oriented data structure may be provided to dedicated processor  102 .  
         [0025]    By way of example, an exemplary script file  106  is provided below. In FIG. 1, process  110 A and process  116 A are executed on processor  110  while process  114 A is run by processor  114 . Process  116 A cannot executed until process  114 A is completed. Process  110 A requires a 100 Kbyte buffer and process  116 A requires a 200 Kbyte buffer. Processor  110 A can surrender its 100 Kbyte buffer only when process  114 A is complete. This allows dedicated processor  102  to reuse the space for processor  116 &#39;s 200 Kbyte buffer. Script file  106  is as follows:  
         [0026]    PROCESS  110 A EXECUTES ON PROCESSOR  110 ; NEEDS: BUFFER 100K REF BB  
         [0027]    PROCESS  114 A EXECUTES ON PROCESSOR  114   
         [0028]    PROCESS  116 A EXECUTES ON PROCESSOR  110 ; WAIT FOR PROCESS  114 A; NEEDS BUFFER 200K; FREE BB  
         [0029]    Therefore, optimization of memory allocation is decided far in advance of need because dedicated processor  102  possesses a road map for the execution sequence prior to actual execution of the application. It should be observed that actual execution of the application will cause the request for execution of processes  11 A,  114 A,  116 A as well as their requests for buffers. Further, one of ordinary skill in the art will realize that the present invention can be implemented by way of software, hardware e.g. as part of ASIC (application specific integrated circuit) or a combination of both.  
         [0030]    According to another embodiment of the present invention, script file  106  is an I/O script having a description of the sequence of I/O operations, resource requirements that will be issued for a given task or thread. For example, the sequence of operations provided for a read sequence may be as follows:  
         [0031]    INITIATE READ with—maximum block=2 KB, source device=1, destination=3  
         [0032]    READ BLOCK will repeat  
         [0033]    CLOSE READ terminates Read sequence  
         [0034]    The I/O script does not actually execute the I/O sequence—it informs dedicated processor  102  of future events when the I/O sequence is actually issued so that resources can be assigned when that I/O sequence is activated by the application.  
         [0035]    As noted, dedicated processor  102  is solely dedicated to resource allocation and to the task of parsing the contents of script file  106  so it knows in advance the execution sequence of the application. It is for this reason that dedicated processor  102  is able to synchronize exactly when the resources should be allocated. For example, the time to allocate the resource may be 2 milliseconds prior to use by the application. Therefore, in addition to dynamic allocation, the allocation is synchronized for utilization when needed by the other processors. In this manner, the present invention improves overall performance of the multi-processor computing environment.  
         [0036]    [0036]FIG. 2 is a flow chart of a method  200  employed by dedicated processor  102  for allocating resources to processors  110  and  114  within multi-processor computing environment  100  of FIG. 1 in accordance with one embodiment of the present invention.  
         [0037]    In FIG. 2, at step  202 , dedicated processor  102  (FIG. 1) is awaiting the receipt of script file  106 . Script file  106  contains information related to the resources required by processors  110  and  114 .  
         [0038]    At block  204 , script file  106  is received by dedicated processor  102 .  
         [0039]    At block  206 , after the script file is received, method  200  comprises parsing by dedicated processor  102 , script file  106  to determine the resources required by the processors.  
         [0040]    At block  208 , the resources are dynamically allocated at the time needed by processors  110  and  114 . Because script file  106  is provided, multiple processes can be coordinated, and each processor knows which task can be performed without having to wait for the another processor. Dedicated processor  102  knows the what and when certain resources required by processors  110  and  114 . For example, if processor  114  requires some memory, it is assigned while processor  110  is busy so that the memory is ready for processor  114  when needed.  
         [0041]    In this fashion, the present invention and its embodiments provide a predictive resource allocation system for a multi-processor computing environment. While the above is a complete description of exemplary specific embodiments of the invention, additional embodiments are also possible. Thus, the above description should not be taken as limiting the scope of the invention, which is defined by the appended claims along with their full scope of equivalents.