I want to convert a JAVA based Thread Pool system designed for DSM(Distributed shared memory) into an agent based Thread Pool System to gain power of Agents. My Java based Thread Pool system design is as under. The DSM thread pool is designed to actually increase the efficiency when it comes to the execution of threads in a DSM environment.
The underlying system configuration is exploited to fetch the information regarding various application threads and allotting them to certain processors with fewer loads for their execution. This allocation is done in a hierarchical fashion by employing a binary tree to fetch the least load processor. The thread then executes on that processor and proceeds to completion. The various incoming application threads are first collected in a Non- Blocking Queue data structure. These threads are then sorted according to their priority thus adhering to priority scheduling mechanism for threads. Now the non- blocking queue consists of application threads sorted according to priority from head to tail in decreasing order i.e. the highest priority thread is at the head position and the least priority thread at the tail position. Execution of threads follows insertion, but for which the threads have to be first deleted from the queue to indicate that the thread has done with its execution. So we first check for the state of the thread, in case the thread is in the blocked state, then it is retained in the queue and not deleted. On the other hand, if it is ready to run, then the thread is deleted and sent for execution. By execution we mean invoking the run method of the concerned thread class. The DSM thread pool is actually intended to be deployed at the application layer on a shared memory environment with a shared address space. But since this is a simulation of the actual implementation, the design simply addresses a single memory space on a single computer system.
Simulation:i have simulated the cluster environment using MinHeap tree which stores current system information at each at node of the cluster configuration. The three step process of the placing the thread can be as follows: (1). Sort the non blocking queue based on the thread priority and ready state (2). Obtain the dynamic load (3). Place the thread on the minimum load node In the first step a nonblocking queue which contains thread information is sorted on priory field. In the second step the system load is obtained dynamically using Linux system calls, whenever a thread is placed on a node. This information is then sent to the other nodes in the cluster to update their MinHeap tree. The simulation is done by allocating different loads to different nodes. The node with minimum load is obtained by the traversal algorithm on MinHeap of all nodes. In the final step, we place the thread on the system for execution.
The there are three overhead involved with this scheme.
1st is “Obtaining system loads dynamically using Linux system calls.” and 2nd is whenever a thread is placed on a node the information is then sent to the other nodes in the cluster to update their MinHeap tree. 3rd is “The node with minimum load is obtained by the traversal algorithm on MinHeap of all nodes”.
Now my question is “can an agent based system give me an improved performance over this DSM thread pool?”. Can an agent migrate itself to minimum load node automatically as agents are self-autonomous. Would I still need to update the minheap tree by using agents. I want to remove traversal algorithm to obtain minimum load node. Is it possible to convert this DSM thread pool into an agent based system. Can an agent based system would be more performance than this DSM Thread pool system. Kindly give me proper suggestions as I am DUMMY in Agent based system.