Create API which can execute 2 process at time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kirubagari
    New Member
    • Jun 2007
    • 158

    Create API which can execute 2 process at time

    Hi Expert,
    I'm seeking for help to create process of creating a new processor that could execute 2 processes at a time. Currently i'm using eclipse.Is this feasible in Eclipse? Any other software i need to install like java swing or java fx. Appreciate your advice .Thanks in advance
  • chaarmann
    Recognized Expert Contributor
    • Nov 2007
    • 785

    #2
    Are you developing hardware or OS? (processor)

    All new hardware and OS can already execute more than one processes in parallel, so please clarify.

    Comment

    • kirubagari
      New Member
      • Jun 2007
      • 158

      #3
      Hi Chaarman,

      Thanks for the response.Im writting a common API for executing process that conform to the interface. Im writing api which create
      a new processor that could execute 2 processes at a time in Java.Im trying to extend my current API to create the job scheduler as well.
      Need some advice on this.

      Comment

      • chaarmann
        Recognized Expert Contributor
        • Nov 2007
        • 785

        #4
        Sorry, I am not getting it, it seem to be no answer to my question. What do you mean with processor? A CPU? Then you need circuit board layouting software. Or do you mean developing machine language for a new CPU? Or do you mean a code instance (scheduler) that controls processes (or threads)?

        If that's the case, then I assume your scheduler java program will start some processes via Runtime.execute ("shell-command"). That's OS-dependent. In Unix or Windows or IOS? Which shell?
        I am not sure, but maybe Java9 has already native support for that.

        Comment

        • kirubagari
          New Member
          • Jun 2007
          • 158

          #5
          Hi Chaarman,

          I'm developing code instance (scheduler) that controls processes in Java.Can i do that in Java example eclipse itself. i'm writing code in window and it will be executed in my window. i wana execute 2 process at one time and setup the job scheduler as well.

          For Eg:
          Code:
          package amz;
          
          import java.util.Random;
          import net.NetworkingTask;
          import graph.SearchGraph;
          import matrix.MatrixMultiplication;
          import io.IOTask;
          
          public class SerialProcessing {
          	
          	public void run(){
          		
          		NetworkingTask nt = new NetworkingTask();
          		int ntProcessingTime = getEstimateProcessingTime(nt);
          		nt.accessSiteXYZ(ntProcessingTime);
          		
          		SearchGraph sg = new SearchGraph();
          		int sgProcessingTime = getEstimateProcessingTime(sg);
          		sg.search();
          		
          		MatrixMultiplication mm = new MatrixMultiplication();
          		int mmProcessingTime = getEstimateProcessingTime(mm);
          		mm.execute();
          		
          		IOTask io = new IOTask();
          		int iomProcessingTime = getEstimateProcessingTime(io);
          		io.readWrite();
          		
          	}
          	
          	public int getEstimateProcessingTime(Object task){
          		
          		Random randomValGenerator = new Random();
          		return randomValGenerator.nextInt(100);
          		
          	}

          Comment

          Working...